From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bumble.birch.relay.mailchannels.net (bumble.birch.relay.mailchannels.net [23.83.209.25]) by sourceware.org (Postfix) with ESMTPS id 5E1D53858D38 for ; Tue, 13 Jun 2023 23:57:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5E1D53858D38 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gotplt.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 7B03C3C24D4; Tue, 13 Jun 2023 23:57:00 +0000 (UTC) Received: from pdx1-sub0-mail-a316.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id DE12F3C2355; Tue, 13 Jun 2023 23:56:59 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1686700619; a=rsa-sha256; cv=none; b=bRGm1UXJfWua74Ye8+fR1vLdeS4GBQ1U7rMRlZigLF2r7yYHoiFxJ9M/j2+5kspuzrUZBa mhj/PDf9BgWLIdsm25iEzOHXJ3JMl1FozOnxAWSXyrcIKi7v5PYgr8oBBZgAy6wmkheuP3 YwlMIwCYNPwsMsl1J8YfImAgDba+wopBJRb0WxxXr4hKGZBclPLxarauLCBEiyLUXWGWd0 pS6OKuXC5qgYZ5iclW81zXsxN2M5ALAgGN3MfnBhQ7OxJr/5zuHgV8Z83MRzlOcIHVlaF1 D7loMdVnajU2xA8ib4wiKdiZTQlzEMWoQxN/U0N53Th9gHHwb8CB9/LOM80rtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1686700619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=3b/iJ/BaEqH9phU67Qu4oKXSUU4AWqj3nTP/eevXi7Q=; b=2TiLdDSSr1CWFnd1rTbjPTpRCfN6o7SsAbbhoKexNc1UwB+MxC5nbpAaU2jSOukYiaALed u2WdS2Q2lg8P/VSNLg9guL+E7aUD/ymKcJENhOW9KVNl1HGyDDUBQrLDx5iZiWQnqs7s6h Vl39M09ExD09aXMNA6j1rUgZIktoGrDmNV8rKofqfQzFmBp4h3FJvXbpcIypLQ/5+jrYD9 OcY+G7IZlJlLM2JiOsfFStOz1st2GCh8QkNI6QXrYiH7F1+hZ1Ozfp+dFSVQrAqlz8ZacK J0DYsMhBztYxyQcfagPHk0EqGwYUAQN5l4njRBXuRklGLzoJ22FaFdysg8++jg== ARC-Authentication-Results: i=1; rspamd-7c78575475-5ndmc; auth=pass smtp.auth=dreamhost smtp.mailfrom=siddhesh@gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Battle-Share: 71b1ee7f156005a6_1686700620302_3298655837 X-MC-Loop-Signature: 1686700620302:2064259766 X-MC-Ingress-Time: 1686700620302 Received: from pdx1-sub0-mail-a316.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.106.146.242 (trex/6.9.1); Tue, 13 Jun 2023 23:57:00 +0000 Received: from [192.168.2.12] (bras-vprn-toroon4834w-lp130-02-142-113-138-85.dsl.bell.ca [142.113.138.85]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a316.dreamhost.com (Postfix) with ESMTPSA id 4QglpM3B2gzGm; Tue, 13 Jun 2023 16:56:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gotplt.org; s=dreamhost; t=1686700619; bh=3b/iJ/BaEqH9phU67Qu4oKXSUU4AWqj3nTP/eevXi7Q=; h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding; b=aLjymLoBmvBB3jAR3eW6Zto8bqSp772cLuvMd3NOcExMZu61cJeoWX3SQ8EDVvQdD ue2F2fPxEeVAulNOY2uYcXN/5xcFCmb/rZjXRJB4i6m5gGKZWLpIaPkHH8QlPx8GaV iqKHJHBWISx9iIzrGY0yxmzloKfuhtQ7si+Q+7SjMqUgFjiEO3+bB8wBU2sJNsN7Jz MfxVFMhc+B11QnE4wAV2yKhXgPjQcDMrMnf6I6koVWwf8/ktf7BoJ2Gxw7s8cFtIP1 hrPE4LoCZephiA+NZEigCFkMkWxrqg9DemZ9AlRXOG0WpFkIY6qQzkZFxYEsFfOZv4 OKT8sOhuqEHjw== Message-ID: Date: Tue, 13 Jun 2023 19:56:52 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v7 4/4] tests: replace fgets by xfgets Content-Language: en-US To: Joseph Myers Cc: =?UTF-8?B?RnLDqWTDqXJpYyBCw6lyYXQ=?= , libc-alpha@sourceware.org References: <20230612151821.199003-1-fberat@redhat.com> <20230612151821.199003-5-fberat@redhat.com> <60698ba8-3981-480e-1171-6f93e10b7251@gotplt.org> <5c7bfb62-a359-e9e2-327b-dcefc877ab22@codesourcery.com> From: Siddhesh Poyarekar In-Reply-To: <5c7bfb62-a359-e9e2-327b-dcefc877ab22@codesourcery.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3037.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2023-06-13 14:25, Joseph Myers wrote: > On Tue, 13 Jun 2023, Siddhesh Poyarekar wrote: > >>> diff --git a/assert/test-assert-perr.c b/assert/test-assert-perr.c >>> index 8496db6ffd..09a4fcb6ef 100644 >>> --- a/assert/test-assert-perr.c >>> +++ b/assert/test-assert-perr.c >>> @@ -11,6 +11,8 @@ >>> #include >>> #include >>> +#include >>> + >>> jmp_buf rec; >>> char buf[160]; >>> @@ -70,15 +72,15 @@ main(void) >>> failed = 1; /* should not happen */ >>> rewind (stderr); >>> - fgets (buf, 160, stderr); >>> + xfgets (buf, 160, stderr); >> >> Joseph, would you apply the same rationale for these tests too, i.e. since the >> test involves interaction with stdio and signals, would you avoid adding an >> xstdio abstraction here to test stdio directly? > > I think this test is using fgets to check file contents rather than > testing particular things about how fgets behaves. > >> Likewise for the stdio-common test here and in patch 3/4, what do you think? > > And those look they are using fread to check contents while testing some > other stdio functions. OK, in that case, LGTM. Reviewed-by: Siddhesh Poyarekar