From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from crocodile.ash.relay.mailchannels.net (crocodile.ash.relay.mailchannels.net [23.83.222.45]) by sourceware.org (Postfix) with ESMTPS id EC5B8385840D for ; Thu, 1 Jun 2023 16:42:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EC5B8385840D 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 1B2675C1948; Thu, 1 Jun 2023 16:42:52 +0000 (UTC) Received: from pdx1-sub0-mail-a202.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 9C2845C186D; Thu, 1 Jun 2023 16:42:51 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1685637771; a=rsa-sha256; cv=none; b=o28P1m5DdSa+bQHT0eDOy0Acm4m41sGwX1HphFdh53E+QYGFGheSABkhxUULWU+m5s1BtQ IfflE3ROn4qa5uXYo8rIEHlWIVq2LVzmzNZVxyRd6loESBHfogAlbVnBr/UJFa+06mdpUR uUAz/46ggaqQ0X1fa/ug7LSKC4UHKgS2wj2iUxQr13RTr6RGeAoj5IYqcY45wekws9xzi9 7Ihhj2K2phdNI3umFMG6CjeyJhgj5oo5bZ2wosOFnHuCTYM4GxHJ7ZdpoT32g0BI7ZeeRt ab04DPq6hzv3jRO4TFLdh0UhsOSD9xWPEJnma3udetYcPLzSz3B1HOnqQGwOBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1685637771; 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=H8d3SZeNAcpHmo4gEM0d+/XGy50kc6bsBGEyKZkLkRA=; b=iHqbjAnn+Mz4+wrmirXnFGRGcwkWdE9HzuvMCIiAodpkO1I+IAZA7kLN0EsUBtma9z9kI+ RkxYcdEQCKbv0Pf66wO5BKvUEEGBW0w2hzeYzMe4VDM7o2GDjiDPQCT0ZFISFiDShGqojf 6G0FrNDnc+ECWJJJnwaY99zYu1XNl66MFvhw9iGk/o+NLtrzFdRlg50Lwyi5oYwv6bnR9H NqvGev5fCIfpOpUHLXI304wRhqs0OC/81e9jTj6mzDE3e8mHF4j3mGWeGMFI4R7FwRTBMn 8H/Jcrz9ECejpW+5C27HDc9XiCkn+SoZyhkP17twRMFZw2YWf4WSKW4YVB/7fg== ARC-Authentication-Results: i=1; rspamd-6d9fc76ff9-99bkf; 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-Wide-Eyed-Illegal: 4450a4a8037161dd_1685637771920_285472689 X-MC-Loop-Signature: 1685637771920:3853629949 X-MC-Ingress-Time: 1685637771919 Received: from pdx1-sub0-mail-a202.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.127.59.37 (trex/6.8.1); Thu, 01 Jun 2023 16:42:51 +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 (2048 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a202.dreamhost.com (Postfix) with ESMTPSA id 4QXBkz1Y2PzWH; Thu, 1 Jun 2023 09:42:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gotplt.org; s=dreamhost; t=1685637771; bh=H8d3SZeNAcpHmo4gEM0d+/XGy50kc6bsBGEyKZkLkRA=; h=Date:Subject:From:To:Content-Type:Content-Transfer-Encoding; b=HMCm+sMB3HwaZ1JLPvfydQd8RdeqGCaCi2h1BjqEsNkgi8VlHUoFCGD/9yGdfE6W6 n8f3oix2XrqjyBasvjDNY2IeN3UQhHTR6PIAYPU4sarvbBLpF9lr9UMN5N6xnLStKo DfvnMg0s8BXIK+r41MkiYYPGyAAO/Rv/GOcJiIfCF/IQACM6qzfr4H6C/5pp2OooMX js+ZB8tSH/lykTT0SwVBKZb7D5LV3wRSXufafcyh8jzHUeNns4sGXRsADRPiAiPs2J B7fa2fhx2KCZdIu4CoB87DeQ2cSO3luFHowxoS8cVrLTrrj1c2hIr+TCt6RjuqG/Pr XInWnE1BFa8Aw== Message-ID: <5c9d9b52-9b96-46c7-ed37-67ef127cf970@gotplt.org> Date: Thu, 1 Jun 2023 12:42:49 -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 From: Siddhesh Poyarekar To: =?UTF-8?B?RnLDqWTDqXJpYyBCw6lyYXQ=?= , libc-alpha@sourceware.org References: <20230428122142.928135-1-fberat@redhat.com> <20230428122142.928135-13-fberat@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3035.9 required=5.0 tests=BAYES_00,BODY_8BITS,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-05-24 21:25, Siddhesh Poyarekar wrote: > > > 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(-) Reviewed-by: Siddhesh Poyarekar Some tests need to be ported to test-driver.c but that could become a separate exercise. Thanks, Sid >> >> 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) >>       { >