[PATCH 4/4] stdlib: Move tst-system to tests-container
Adam Sampson
ats@offog.org
Wed Mar 25 12:03:36 GMT 2020
Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org> writes:
> Fix some issues with different shell and error messages.
[...]
> + char *returnerr = xasprintf ("%s: execing %s failed: "
> + "No such file or directory",
> basename(_PATH_BSHELL), cmd);
> TEST_COMPARE_STRING (result.err.buffer, returnerr);
Yesterday's cherry-pick of this new test to the 2.31 branch breaks the
test suite for me with bash 5.0.11 as /bin/sh. Here's tst-system.out,
trimmed a bit:
| tst-system.c:93: error: string comparison failed
| left string: 279 bytes
| right string: 274 bytes
| left (evaluated from result.err.buffer):
| "sh: aaa...aaaaaa: command not found\n"
| right (evaluated from returnerr):
| "sh: 1: aaa...aaaaaa: not found\n"
| tst-system.c:111: error: string comparison failed
| left string: 280 bytes
| right string: 284 bytes
| left (evaluated from result.err.buffer):
| "sh: aaa...aaaaaaa: command not found\n"
| right (evaluated from returnerr):
| "sh: 1: aaa...aaaaaaa: File name too long\n"
| error: 2 test failures
I don't think that trying to match against the shell error message here
is a good idea, since it'll depend on what /bin/sh the user has:
$ bash -c blargh
bash: blargh: command not found
$ dash -c blargh
dash: 1: blargh: not found
$ mksh -c blargh
mksh: blargh: inaccessible or not found
Thanks,
--
Adam Sampson <ats@offog.org> <http://offog.org/>
More information about the Libc-alpha
mailing list