From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 81E7B6DE0AAB for ; Tue, 21 May 2019 18:41:55 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.174 X-Spam-Level: X-Spam-Status: No, score=-0.174 tagged_above=-999 required=5 tests=[AWL=0.027, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gvtz30K6iUsk for ; Tue, 21 May 2019 18:41:54 -0700 (PDT) Received: from che.mayfirst.org (che.mayfirst.org [162.247.75.118]) by arlo.cworth.org (Postfix) with ESMTPS id 6E9296DE09CD for ; Tue, 21 May 2019 18:41:54 -0700 (PDT) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019; t=1558489310; h=from : to : subject : in-reply-to : references : date : message-id : mime-version : content-type : from; bh=e0aOaq9Hu85zQPDCVpeJ/piu1uNTG4KhMFM9h6fpl5g=; b=9kK5hyzLyn8+IHQXXNFnmr49/Cy5DepBHmclo+OvqU/vZU/iM7i5ebsj gBojI6h2I/HfciODGweAHBjdAOsQAQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019rsa; t=1558489310; h=from : to : subject : in-reply-to : references : date : message-id : mime-version : content-type : from; bh=e0aOaq9Hu85zQPDCVpeJ/piu1uNTG4KhMFM9h6fpl5g=; b=ImYFp1r/HzhV3foBkw6SPV8irpIxp7Ma7xDf4PJoK5BeM1WSfPqiQxkT Z4j78etaQOe5JcBtcNYmOBku6EzCORw6PvDvu+i3OI15AXsIj9FrqFjjWu JvUZxR/CvVpFhdo6BmmsVU/Jv6fZq4II/yZRZTbbkUV5Q3h0DAsAnXnY/3 /05odGysJycH7w9UnDk+sizXf8xYJsF/HQbHz/PEdS8Q3jrty+OHPxXzaL YangkLfDV+q12JFdZP75+b5B1B9HVksKrzr+qz9bGwpJ9pz5rMrcxvwfkj ws+tKQp77Oej4obecDq9I8cnQbkh0bTksWNIdyMiJP1PfskDyQI/Nw== Received: from fifthhorseman.net (unknown [38.109.115.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by che.mayfirst.org (Postfix) with ESMTPSA id 8E981F9A0; Tue, 21 May 2019 21:41:49 -0400 (EDT) Received: by fifthhorseman.net (Postfix, from userid 1000) id 2AC2C20133; Tue, 21 May 2019 21:24:25 -0400 (EDT) From: Daniel Kahn Gillmor To: Tomi Ollila , notmuch@notmuchmail.org Subject: Re: [PATCH] test: redirect STDIN from /dev/tty In-Reply-To: <20190521201702.28754-1-tomi.ollila@iki.fi> References: <20190521201702.28754-1-tomi.ollila@iki.fi> Autocrypt: addr=dkg@fifthhorseman.net; prefer-encrypt=mutual; keydata= mDMEXEK/AhYJKwYBBAHaRw8BAQdAr/gSROcn+6m8ijTN0DV9AahoHGafy52RRkhCZVwxhEe0K0Rh bmllbCBLYWhuIEdpbGxtb3IgPGRrZ0BmaWZ0aGhvcnNlbWFuLm5ldD6ImQQTFggAQQIbAQUJA8Jn AAULCQgHAgYVCgkICwIEFgIDAQIeAQIXgBYhBMS8Lds4zOlkhevpwvIGkReQOOXGBQJcQsbzAhkB AAoJEPIGkReQOOXG4fkBAO1joRxqAZY57PjdzGieXLpluk9RkWa3ufkt3YUVEpH/AP9c+pgIxtyW +FwMQRjlqljuj8amdN4zuEqaCy4hhz/1DbgzBFxCv4sWCSsGAQQB2kcPAQEHQERSZxSPmgtdw6nN u7uxY7bzb9TnPrGAOp9kClBLRwGfiPUEGBYIACYWIQTEvC3bOMzpZIXr6cLyBpEXkDjlxgUCXEK/ iwIbAgUJAeEzgACBCRDyBpEXkDjlxnYgBBkWCAAdFiEEyQ5tNiAKG5IqFQnndhgZZSmuX/gFAlxC v4sACgkQdhgZZSmuX/iVWgD/fCU4ONzgy8w8UCHGmrmIZfDvdhg512NIBfx+Mz9ls5kA/Rq97vz4 z48MFuBdCuu0W/fVqVjnY7LN5n+CQJwGC0MIA7QA/RyY7Sz2gFIOcrns0RpoHr+3WI+won3xCD8+ sVXSHZvCAP98HCjDnw/b0lGuCR7coTXKLIM44/LFWgXAdZjm1wjODbg4BFxCv50SCisGAQQBl1UB BQEBB0BG4iXnHX/fs35NWKMWQTQoRI7oiAUt0wJHFFJbomxXbAMBCAeIfgQYFggAJhYhBMS8Lds4 zOlkhevpwvIGkReQOOXGBQJcQr+dAhsMBQkB4TOAAAoJEPIGkReQOOXGe/cBAPlek5d9xzcXUn/D kY6jKmxe26CTws3ZkbK6Aa5Ey/qKAP0VuPQSCRxA7RKfcB/XrEphfUFkraL06Xn/xGwJ+D0hCw== Date: Tue, 21 May 2019 21:24:24 -0400 Message-ID: <87sgt78enr.fsf@fifthhorseman.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2019 01:41:55 -0000 --=-=-= Content-Type: text/plain On Tue 2019-05-21 23:17:02 +0300, Tomi Ollila wrote: > Without this stdin may be anything that parent process provided for it. I'm fine with this change -- i can confirm that it avoids the hanging problem on debian stable for me. please merge either this, or id:20190521010304.417-1-dkg@fifthhorseman.net . i don't think we need both. Tomi's step here is a "big hammer" approach by comparison with my patch targeting gdb itself, but it's also simple and elegant -- stdin from outside the test suite has no business interfering with the tests. > Test processes might have tried to read something from it, which would > have caused undeterministic behavior. My only (weak, nagging) concern is that this change may err on the side of "too much determinism", in the sense that different stdin setups might more accurately represent "real world" use cases of notmuch than stdin being mapped to /dev/null. However, if those different configurations that we happen to get from random people invoking the test suite in different ways are actually important, then the test suite should probably try to explicitly enumerate those cases, and test them regardless of the environment in which the test suite is run. > E.g. gdb(1) tries to do tty related ioctls on fd 0 (and fd 1 and fd 2, > but those are redirected to 'test.output' before test runs). For the record, these problems were only with moreutils parallel when used in combination with a specific version of gdb. if gdb (or some other subprocess (gpg, i'm looking at you)) were to try to monkey around with /dev/tty, i think even with this "big hammer" fix, it could do so, because we haven't isolated the tests from the "controlling terminal" (see tty(4)). But again, if we run into that, that is probably worth an independent fix (with "setsid --wait" or something like that, ugh). --dkg PS if we merge this change, does it mean that we can/should remove the -tty /dev/null stuff from T380-atomicity.sh? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQTJDm02IAobkioVCed2GBllKa5f+AUCXOSkyAAKCRB2GBllKa5f +DSjAQCkEH/cJp6snF9EnptsV5SHAcgl0nuaBm08UfeFyCKpvQEA4CqyVEu8B23R xzISfGLZiApCduO0ytLo6UDWG7YmKAs= =A7t+ -----END PGP SIGNATURE----- --=-=-=--