From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id B38DD3857829 for ; Wed, 24 Mar 2021 01:17:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B38DD3857829 Received: from vapier (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E97EB33CEF2; Wed, 24 Mar 2021 01:17:09 +0000 (UTC) Date: Tue, 23 Mar 2021 21:17:09 -0400 From: Mike Frysinger To: Peng Yu Cc: noloader@gmail.com, libc-help Subject: Re: Does glibc has complete test coverage? Message-ID: Mail-Followup-To: Peng Yu , noloader@gmail.com, libc-help References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-help@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-help mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Mar 2021 01:17:12 -0000 On 23 Mar 2021 18:09, Peng Yu wrote: > On Tue, Mar 23, 2021 at 4:02 PM Jeffrey Walton wrote: > > On Tue, Mar 23, 2021 at 4:43 PM Mike Frysinger wrote: > > > also try googling for "100% test coverage" and reading the variety of > > > opinions the wider world has on the topic. > > https://blog.ndepend.com/aim-100-percent-test-coverage/ > > I don't think the so-called "The Diminishing Returns Argument" is > valid. When you have too many branches to test which rarely occurs in > practice, this just indicates the code is badly structured. To have > complete coverage, if the testing code is much more complex than the > real code, this means that the real code should be restructured to > make testing code simpler. there are software ideals, and there's the real world. glibc occupies the latter. you are welcome to submit patches to try and simplify the code, but you will have to also not regress on performance, or overall maintainability. software engineering is about balancing all of these conflicting requirements. -mike