t4153: stop redirecting input from /dev/zero
Commitmaint852a171018(am: let command-line options override saved options, 2015-08-04) redirected a few "git am" invocations from /dev/zero, even though it did not expect "am" to read the input. This was necessary at the time because those tests used test_terminal, and as described in18d8c26930(test_terminal: redirect child process' stdin to a pty, 2015-08-04): Note that due to the way the code is structured, the child's stdin pseudo-tty will be closed when we finish reading from our stdin. This means that in the common case, where our stdin is attached to /dev/null, the child's stdin pseudo-tty will be closed immediately. Some operations like isatty(), which git-am uses, require the file descriptor to be open, and hence if the success of the command depends on such functions, test_terminal's stdin should be redirected to a source with large amount of data to ensure that the child's stdin is not closed, e.g. test_terminal git am --3way </dev/zero But we later dropped the use of test_terminal in53ce2e3f0a(am: add explicit "--retry" option, 2024-06-06). That commit dropped one of the redirections from /dev/zero but not the other. In theory the remaining one should not cause any problems, but it turns out that at least one platform (NonStop) does not have /dev/zero at all. We never noticed before because it also did not pass the TTY prereq, meaning these tests were not run at all there until53ce2e3f0a. So let's drop the useless /dev/zero mention. There are others in the test suite, but they are run only for tests marked with EXPENSIVE (so not typically by default). Reported-by: Randall S. Becker <rsbecker@nexbridge.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
parent
62c71ace44
commit
2a959ec21a
|
|
@ -98,7 +98,7 @@ 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 &&
|
||||
test_must_fail git am --retry --reject &&
|
||||
test_path_is_dir .git/rebase-apply &&
|
||||
test_path_is_file file.rej
|
||||
'
|
||||
|
|
|
|||
Loading…
Reference in New Issue