From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id A2E163857829 for ; Tue, 23 Mar 2021 20:41:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A2E163857829 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 3A492335D61; Tue, 23 Mar 2021 20:41:27 +0000 (UTC) Date: Tue, 23 Mar 2021 16:41:26 -0400 From: Mike Frysinger To: Peng Yu Cc: libc-help Subject: Re: Does glibc has complete test coverage? Message-ID: Mail-Followup-To: Peng Yu , 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=-5.2 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham 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: Tue, 23 Mar 2021 20:41:32 -0000 On 23 Mar 2021 11:39, Peng Yu via Libc-help wrote: > https://www.kernel.org/doc/man-pages/missing_pages.html > > "... quite a few kernel and glibc bugs have been uncovered while > writing test programs during the preparation of man pages. " > > I see the above text. It doesn't make too much sense, as it indicates > that glibc does not have complete test coverage. > > Why not taking an approach of always accompanying each line of source > code with appopriate test cases? If this approach is taken, then most > bugs should have been eliminated beforehand? ignoring the legacy aspect (code that's in the tree now but lacks tests), you have diminishing returns when it comes to writing unittests, and, as can be seen in a recent discussion, glibc is pretty tightly coupled to the runtime environment (i.e. the host kernel). so getting an env that matches all the different code paths is challenging. plus it comes down a bit to this being an open source project for many of us, not a job, and you have to be respectful of balancing quality and developer time with any requests you make on other volunteers. along those lines, this is an open source project where "patches are welcome", so if you wanted to spend your time improving the frameworks and coverage of our tests, we'd welcome you. also try googling for "100% test coverage" and reading the variety of opinions the wider world has on the topic. -mike