From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from fossa.birch.relay.mailchannels.net (fossa.birch.relay.mailchannels.net [23.83.209.62]) by sourceware.org (Postfix) with ESMTPS id 071B93858D20 for ; Mon, 12 Jun 2023 14:22:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 071B93858D20 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 0AECF261692; Mon, 12 Jun 2023 14:22:56 +0000 (UTC) Received: from pdx1-sub0-mail-a287.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 8CB0C2625B0; Mon, 12 Jun 2023 14:22:55 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1686579775; a=rsa-sha256; cv=none; b=3OEprTavDERKsOP4LagpjrETtAkUJktmCvcnKwaHg/u513UJUD7F2sKeryM+xEhpTT9riM tgZg4LukypsSD+qxVFefl9VM6GQMA2A8cnnbsaVL7JnBbs5VltiB7g5x8T3tDynjfaQd0z c57Zd7dPKxySSB3Z1U3yXnjMnasU+I2z+HvU15fnZrj/l9RGjk+8PEgbHy8uV5jZBs6QAY Oq1BNleuOIw0yP4iD0QFKHkYBxt2pnUIZRh8Jr1kEJ/woev2iPr+L7cjIrFz5QjruYXCKl spa/s81BM9Mq1QlDO14e85xYXZyBvfQhPyn9ycy9nzvce2bkxM4OKEO0uJGHmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1686579775; 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=yrMzO6frLrFjaBT0B6QkTKVDi2nCeB3AcdjUoLp/Vzg=; b=YictiGgo6tbefvBSYf7ehrmtIDpnY0mWZWMb5HenlC2cqLBCGhR05iZK4Wfsdw1XBMMZPu aaXzvz/HOAuPdc2sUvEzWaoBGczHN6qjm8u6EXLwD7oZvz8/g46ySZG/6R70wQccSRq6+n sw8tDpq/qzvTwCVRFFRdyulK4dbUgvEN0wNqN/V09MsQUvVziUzblvQ+GJEGqdCCMk2Yk/ Bkmsf+3YEeHB0dgOv1WoZH7qgB4SeH5IuTw1PnOOUdvlxLAQ5NA9gTL2h1SmAPMwihsIZM b2LAuhL/bSps9CwCnej06+l2NvrHYJ6rKvliAfN/hNy+XnbTICuQ751ZPZzmIQ== ARC-Authentication-Results: i=1; rspamd-6c69b8658d-x5df5; 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-Hysterical-Shade: 1b1c45993c182288_1686579775823_2936847217 X-MC-Loop-Signature: 1686579775823:3397773382 X-MC-Ingress-Time: 1686579775822 Received: from pdx1-sub0-mail-a287.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.103.24.98 (trex/6.8.1); Mon, 12 Jun 2023 14:22:55 +0000 Received: from [192.168.98.119] (unknown [72.136.99.35]) (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-a287.dreamhost.com (Postfix) with ESMTPSA id 4Qfv6Q62H3z5B; Mon, 12 Jun 2023 07:22:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gotplt.org; s=dreamhost; t=1686579775; bh=yrMzO6frLrFjaBT0B6QkTKVDi2nCeB3AcdjUoLp/Vzg=; h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding; b=VjWWmGBBfgKC0Wcv51DI1SAU+r/Cy+dHbLl6lTQvkLZ3Bl6kfCmd7aC5KzFx37AZU 3gg73lpUu333/QjkcENMIuzeF9YEsmYPNEcZ012kJe5rhbaHutTFw+fkyD7bZrAY5r LiHOzkuDx6miV1iA6AmsLjRjPzSM1LqzCKgbqtMqXo05F6WsV5shCzEZ0Xsg8Z6h7/ hITzK0jZ7m0bbvx0LUFKZgZxodcYMLPzirDjBjyzBBcNL5JWZ75TfRXvDBLOZ/iy/b uA9+L+NoEmqGwkjHJBTkwkKYAWPhLwt6+CtnS2nKCaGfaJJ0nWYxfX+shNBBNrMudA +h8zrDOOMgSnQ== Message-ID: <47d4cf5c-c2ff-aa28-4055-b54e907c050d@gotplt.org> Date: Mon, 12 Jun 2023 10:22: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 v6 2/7] tests: replace read by xread Content-Language: en-US To: Frederic Berat Cc: libc-alpha@sourceware.org References: <20230602152812.108497-1-fberat@redhat.com> <20230602152812.108497-3-fberat@redhat.com> From: Siddhesh Poyarekar In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3030.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,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-06 04:00, Frederic Berat wrote: >>> - read (fd[0], &c, 1); >>> - >> >> No replacement for this read call? > > On my original change, I couldn't find any reason for this call to exist. > As far as I understand, pipes are open blocking by default, which > means read(fd[2]) should block until anything is written to fd[3]. > Since there is no write, "read(fd[0])" should never be executed, and > cancellation should hit on "read(fd[2])". > > If the first read succeeds, the test should fail. > If the thread isn't marked as cancelled and simply continues its > execution, the test should fail. > > Since the potential race between the close and the cancel got fixed by > d0e3ffb7a58854248f1d5e737610d50cd0a60f46, I assume the second read is > superfluous. > > Yet, I may have misunderstood the intent on this second read, in which > case some comment would be useful. Sounds reasonable. Please note this in your git commit log in the next version. Thanks, Sid