https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82233

--- Comment #12 from Christophe Lyon <clyon at gcc dot gnu.org> ---
I am running the GCC tests under proot + qemu.
proot is similar to chroot but does not require root privileges,
qemu is a well known emulator that enables me to run validations for
arm/aarch64 on x86 hosts.

I use proot to make sure the simulated process only sees the filesystem part it
needs; in particular this is mandatory when simulating armeb (big-endian) to
prevent the test from trying to parse the host's /etc/ld.so.cache and
crashing...

Back to the problem: if I run the testcase using qemu only (no proot), I get:
$ qemu-wrapper.sh ./execute_command_line_3.exe
sh: 1: notthere: not found
sh: 1: notthere: not found
sh: 1: notthere: not found

sh: 1: notthere: not found
sh: 1: notthere: not found
$ echo $?
0

If I use proot, I get:
$ qemu-wrapper.sh ./execute_command_line_3.exe

$ echo $?
0

In both cases, stdout contains 257 white spaces followed by a newline.

So it seems the output is the same. Does the test care about stderr?

When I use proot, command-line execution fails earlier because there is no
/bin/sh, but the return-code of execve is still 127 (command not found), so the
behaviour should still be the same.

Reply via email to