From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bird.elm.relay.mailchannels.net (bird.elm.relay.mailchannels.net [23.83.212.17]) by sourceware.org (Postfix) with ESMTPS id 092383858D20 for ; Thu, 25 May 2023 01:25:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 092383858D20 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 E543F3E0FDF; Thu, 25 May 2023 01:25:57 +0000 (UTC) Received: from pdx1-sub0-mail-a305.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 8127F3E08B8; Thu, 25 May 2023 01:25:57 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1684977957; a=rsa-sha256; cv=none; b=VNHlGJzP5GiiUEgwbcn6jpbRj9fOlZip4nTcQDNNQF9/Zm41Xvd8kuEbqSy99VOSBjTvwa U7z1v4K/1H/BZcOylVE2fthvRiCGBvtlxBZg7YjwbxB35lEzMEJumpXSOFV80Agy9C/O5v H1WPG2H+X8nPLayOeZMjnUj8Sxa0bcScaIRb+e78M3eJk2RZxElHvR+g0Bou+2/XZdm2rj 5qwfeZzYKGwss4OyPoixdd0bUvwIU6OhORfAPGH0zoPMqosWw3SXGKrLkcy3SjlSMrjVj2 rNuFtZTZzW7AgygQEpxZuA95SLpaotW+1WcdNnp51WIDQ3nMoLfyIit/ud+bJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1684977957; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to: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=LziTfvuCfUoo/H+BQyPPmTGs4qkovoFWrcGUMY7reIw=; b=E3QZUTHFgT0DNxAJsj8RN+p8s+lp+VxezKsPLacYrsKaPh4n+YXZGA1BP7o0j6Z+qsT9lP 1mgT+WBhJveIK+NIFIQ3KQW4TtI1H6WhymLTESszScNyKS77A8e3wCZW4nZgqH0H4++y5y vzl6azXJn+ChNmqUHmNT3+i/E0VtsRnM3g5mmETDaZ2PGeCTacrJRtfJ4s7YbhnZkL0Eml TgPMT8yT77J/0Pj8vdeMh6baa84S+Pbx33RzUCQEXZMSYj3rQMR0RLC090uVOocwg+FhxN t2rdsMQSBBFR7a3N8k0jjD8GT58QQ2quCZMlafnfoaQ3J8tNClr/9rJ+qdth6w== ARC-Authentication-Results: i=1; rspamd-79bb5575d7-mq7l8; 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-Continue-Tasty: 1e226e7560372cd2_1684977957753_3851437073 X-MC-Loop-Signature: 1684977957753:2803304542 X-MC-Ingress-Time: 1684977957753 Received: from pdx1-sub0-mail-a305.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.123.193.157 (trex/6.8.1); Thu, 25 May 2023 01:25:57 +0000 Received: from [192.168.0.182] (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 (4096 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a305.dreamhost.com (Postfix) with ESMTPSA id 4QRVkF16Blz1M; Wed, 24 May 2023 18:25:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gotplt.org; s=dreamhost; t=1684977957; bh=LziTfvuCfUoo/H+BQyPPmTGs4qkovoFWrcGUMY7reIw=; h=Date:Subject:To:From:Content-Type:Content-Transfer-Encoding; b=pzNqtzvive0jfyiAdWLYfOwe6yLxYzjFhI2TL+8gemUGpkL4jigMOW0gWg4cI9wOX 7wtW6ZmkCRq+pfBDJRtMHKNqWgyX3l6QrX0dNywx3TRkGJ6ezdeRYtqsGMXR6shEjG XwgjQy3gqPoHmcGkGgQF9FPy3LOl0Ksv8P577gr4IITmjSgWHRzTzcrJMmYxd8kuph MhtH0/xGDt4jKCjdyChdLkNRCB0Z5yfLfAckR7xlRubFm4A/+fjNE8FjPMqQQVAEo1 TWdFRNuzdRgPK1bPqTovsBtLnad5TpNcFS4pTR5rgj9TmSQHAuaXEHGzza5Oqf7bqZ QdDBjEyzEpG4Q== Message-ID: Date: Wed, 24 May 2023 21:25:55 -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 v4 12/15] tests: replace ftruncate by xftruncate Content-Language: en-US To: =?UTF-8?B?RnLDqWTDqXJpYyBCw6lyYXQ=?= , libc-alpha@sourceware.org References: <20230428122142.928135-1-fberat@redhat.com> <20230428122142.928135-13-fberat@redhat.com> From: Siddhesh Poyarekar In-Reply-To: <20230428122142.928135-13-fberat@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3037.5 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,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-04-28 08:21, Frédéric Bérat wrote: > With fortification enabled, ftruncate calls return result needs to be > checked, has it gets the __wur macro enabled. > --- > io/tst-copy_file_range.c | 2 +- > posix/tst-getopt-cancel.c | 3 ++- > stdio-common/tst-perror.c | 3 ++- > 3 files changed, 5 insertions(+), 3 deletions(-) > > diff --git a/io/tst-copy_file_range.c b/io/tst-copy_file_range.c > index d1f3aaa5a9..bd64e9c42b 100644 > --- a/io/tst-copy_file_range.c > +++ b/io/tst-copy_file_range.c > @@ -166,7 +166,7 @@ short_copy (void) > inoff = 3; > xlseek (infd, shift, SEEK_SET); > } > - ftruncate (outfd, 0); > + xftruncate (outfd, 0); > xlseek (outfd, 0, SEEK_SET); > outoff = 0; > > diff --git a/posix/tst-getopt-cancel.c b/posix/tst-getopt-cancel.c > index 7167d1a914..6f49391690 100644 > --- a/posix/tst-getopt-cancel.c > +++ b/posix/tst-getopt-cancel.c > @@ -33,6 +33,7 @@ > #include > #include > #include > +#include > > static bool > check_stderr (bool expect_errmsg, FILE *stderr_trapped) > @@ -48,7 +49,7 @@ check_stderr (bool expect_errmsg, FILE *stderr_trapped) > fputs (lineptr, stdout); > } > rewind (stderr_trapped); > - ftruncate (fileno (stderr_trapped), 0); > + xftruncate (fileno (stderr_trapped), 0); > return got_errmsg == expect_errmsg; > } > > diff --git a/stdio-common/tst-perror.c b/stdio-common/tst-perror.c > index 57835e0c59..b4ab583462 100644 > --- a/stdio-common/tst-perror.c > +++ b/stdio-common/tst-perror.c This one needs to be ported to use support/test-driver. The patch is OK otherwise. > @@ -9,6 +9,7 @@ > #include > #include > > +#include > > #define MB_EXP \ > "null mode test 1: Invalid or incomplete multibyte or wide character\n" \ > @@ -94,7 +95,7 @@ do_test (void) > puts ("multibyte test succeeded"); > > lseek (fd, 0, SEEK_SET); > - ftruncate (fd, 0); > + xftruncate (fd, 0); > > if (dup2 (fd, 2) == -1) > {