git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <rsbecker@nexbridge.com>
To: "'Jeff King'" <peff@peff.net>, "'Junio C Hamano'" <gitster@pobox.com>
Cc: <git@vger.kernel.org>
Subject: RE: [PATCH] t4153: stop redirecting input from /dev/zero
Date: Wed, 17 Jul 2024 09:11:53 -0400	[thread overview]
Message-ID: <01f501dad84a$e8e014f0$baa03ed0$@nexbridge.com> (raw)
In-Reply-To: <20240717070050.GG547635@coredump.intra.peff.net>

On Wednesday, July 17, 2024 3:01 AM, Jeff King wrote:
>On Sun, Jul 14, 2024 at 03:05:58AM -0400, Jeff King wrote:
>
>> With --retry I think we would not actually read stdin at all, so we
>> could just remove the mention of /dev/zero entirely. But if we wanted
>> to be sure it did not read and choke on any input provided, I think just:
>>
>> diff --git a/t/t4153-am-resume-override-opts.sh
>> b/t/t4153-am-resume-override-opts.sh
>> index a4d0c03ca6..76783bdd67 100755
>> --- a/t/t4153-am-resume-override-opts.sh
>> +++ b/t/t4153-am-resume-override-opts.sh
>> @@ -45,6 +45,7 @@ test_expect_success '--3way overrides --no-3way' '
>>
>>  	# Applying side1 with am --3way will succeed due to the threeway-merge.
>>  	# Applying side2 will fail as --3way does not apply to it.
>> +	echo garbage |
>>  	test_must_fail git am --retry --3way &&
>>  	test_path_is_dir .git/rebase-apply &&
>>  	test side1 = "$(cat file2)"
>> @@ -99,7 +100,8 @@ test_expect_success '--reject overrides --no-reject' '
>>  	test_path_is_dir .git/rebase-apply &&
>>  	test_path_is_missing file.rej &&
>>
>> -	test_must_fail git am --retry --reject </dev/zero &&
>> +	echo garbage |
>> +	test_must_fail git am --retry --reject &&
>>  	test_path_is_dir .git/rebase-apply &&
>>  	test_path_is_file file.rej
>>  '
>
>Looking at the history, the use of /dev/zero was not here to simulate garbage on
>stdin. It really was just meant to be a descriptor which never ran out of input, as a
>workaround for test_terminal. This is described in the commit mentioned below.
>
>So I think we should just do this, which can go on top of jk/am-retry. I still do not
>think it is super-urgent, but given the simplicity of the fix is probably worth doing
>for the upcoming v2.46, which exposes these tests to more platforms.

Might not be urgent but without this we cannot pass this test on NonStop and I'm assuming other non-linux systems.
Thanks,
--Randall


  reply	other threads:[~2024-07-17 13:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-13 16:41 [Test Breakage 2.46.0-rc0] Test t4135.06 fails on NonStop rsbecker
2024-07-14  2:23 ` Junio C Hamano
2024-07-14  7:05   ` Jeff King
2024-07-14 13:36     ` rsbecker
2024-07-17  7:00     ` [PATCH] t4153: stop redirecting input from /dev/zero Jeff King
2024-07-17 13:11       ` rsbecker [this message]
2024-07-17 15:35       ` Junio C Hamano
2024-07-14 13:25   ` [Test Breakage 2.46.0-rc0] Test t4135.06 fails on NonStop rsbecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='01f501dad84a$e8e014f0$baa03ed0$@nexbridge.com' \
    --to=rsbecker@nexbridge.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).