From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 0061C1F5AE for ; Tue, 8 Jun 2021 08:56:47 +0000 (UTC) Received: from localhost ([::1]:42868 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqXXS-00022U-Tp for normalperson@yhbt.net; Tue, 08 Jun 2021 04:56:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41022) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqXXM-0001yr-ED for bug-gnulib@gnu.org; Tue, 08 Jun 2021 04:56:40 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([85.215.255.23]:30777) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqXXJ-0007pF-TT for bug-gnulib@gnu.org; Tue, 08 Jun 2021 04:56:40 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1623142594; cv=none; d=strato.com; s=strato-dkim-0002; b=c92A6fO/chcf1whwobhFgCjfIvnSys3QKx5Fj5XXcX/TLFkM6AiDxLyM5xAJcBeDri qOWnaYsRWe4At8bfISGZ6MYyLNVNK29wexM24ZbdvY5KqHg7vo4NbOQT8SdOAjTld+rI nF3KRkLOmSLqhRwRKSfDTt2Edv4TVo6+hjIA9Dw2XUAhzkpxfvznJ3aqiMaOHuO+xlIU v6Lsq/ruWMtk5JZDXO9vAWHW5tEX1rnsPquOhIgtrdpLWbNV6IPm4qbmkL5g5M2nKEEw gl6XvYOo4WVk0QkXZou+oIY0+A+JZ4MwUvn00VPbXsj06XslpBvnSCB7EIQDng+/UsMl t5XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1623142594; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=dw+L7lQgKDXqprOV0+FrD88PA+H+Bd6hkK5Uq2HnYFo=; b=cGixVqST+IXTkSMDKYZmktLgQvPK6HLGu+786jaYCnTBpRvQrq2pYanOaQUNvAHiNw q9whHaVRXCtKR1T4peO12kvpWGtzyKYB60PIHUPd2LRy+mJghTvg87NwfWNtgP2fu3EJ +CeoIWBOh7s9f/vnvYDYvCz4DO1I0MJ/gtjgYalwqWE3Y+3ZYePHlncs5hebvHmoVX7c xdY6vpkfXAw8LDZNc+EmJP0pZTpxSS4fNt6r1mBwJNpzBxhvjauCq/X+bG7IdGzgGqNk XXNHsmfLF3RPVJKu625KKjFh5gEMcXy5TZUwrDhoMsNa91HSTx3eWga01p4vfEqOz0gB qmJQ== ARC-Authentication-Results: i=1; strato.com; dkim=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1623142594; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=dw+L7lQgKDXqprOV0+FrD88PA+H+Bd6hkK5Uq2HnYFo=; b=j22PUeqrC0E0R3dYPgPyQFqjzjxRMYkThv6TjeYHBgjKuvnx48qFJ6Zf5MPiNt4v3O Qx06oY+xSXEQjN25d80buxxtCwSctiRIG9hsaNwDcK32TV/jhLVrQTEavqq+uTrUJFFU h3lrCwxkT7txMXswwZETdeIHbOSm/Jjwm4nmj8M11Icj0xI4fCC0GvQHqwAawkDW6Av/ RzPjFjLRIY0/EAmMA5IIK4xCsE9N4eGeEHzSf7aX5ndAUgzKBmspczZy5YXaSUf2piAJ BGFR0Ymvd40ANDg9L40oa/9aYAzudaTNtT5c0CjYsHODbChhuwoth9KFIGMFfdGUH4Zl 1llw== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOHqf3z5NW" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 47.27.2 DYNA|AUTH) with ESMTPSA id q0869dx588uYSRy (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Tue, 8 Jun 2021 10:56:34 +0200 (CEST) From: Bruno Haible To: Jim Meyering Subject: Re: warnings in unit tests Date: Tue, 08 Jun 2021 10:56:33 +0200 Message-ID: <2086778.xA2Ij3oMRU@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-210-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: References: <15897619.AQZsorJ5YP@omega> <2113844.jgEgOJX5uS@omega> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Received-SPF: none client-ip=85.215.255.23; envelope-from=bruno@clisp.org; helo=mo4-p00-ob.smtp.rzone.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: bug-gnulib@gnu.org Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" Jim Meyering wrote: > I can live without -Wmissing-prototypes in gnulib tests, but I still > remember times where using that option exposed a real bug. -Wmissing-prototypes typically exposes real bugs when a program is composed of several compilation units. Unit tests are typically a single compilation unit plus libtests.a, and libtests.a being built from modules with .h / .c combinations it does not have the kind of bug that -Wmissing-prototypes can detect. Anyway, the main point is that I, as the author of 75% of the Gnulib tests and maintainer of the Gnulib tests, trust a certain set of GCC warnings (namely, '-Wall -ftrapv'), as they have proven useful for these tests. If a maintainer of a different package trusts a different set of GCC warnings or clang warnings or the warnings of some other tool, they are welcome to report bugs that they found this way. But they are not welcome to force their preferred set of warning options onto the Gnulib tests, because that means additional maintenance costs, which goes against the goal of having a high test coverage. > My point about the cost/benefit was regarding that 3-line addition for > a single, deliberate NULL-deref. > That one really does not deserve to quash -Wnull-dereference for all tests. Compilers are getting more and more knowledge about POSIX functions. Over time, they will warn about more and more of the corner cases that the Gnulib test suite exercises. So, it's not only about the deliberate pointer access here. Jeffrey Walton is doing sanitizer-enabled testing of Gnulib. This has proven to be more useful than listening to large amounts of GCC or clang warning options. Bruno