On Wed, Oct 30, 2024 at 02:37:32PM -0600, Tycho Andersen wrote: > From: Tycho Andersen <tandersen@xxxxxxxxxxx> > > In the previous patch we've defined a couple behaviors: > > 1. execveat(fd, AT_EMPTY_PATH, {"foo"}, ...) should render argv[0] as > /proc/pid/comm > 2. execveat(fd, AT_EMPTY_PATH, {NULL}, ...) should keep the old behavior of > rendering the fd as /proc/pid/comm > > and just to be sure keeps working with symlinks, which was a concern in > [1], I've added a test for that as well. > > The test itself is a bit ugly, because the existing check_execveat_fail() > helpers use a hardcoded envp and argv, and we want to "pass" things via the > environment to test various argument values, but it seemed cleaner than > passing one in everywhere in all the existing tests. This test doesn't pass in my CI, running on an i.MX8MP Verdin board. This is an arm64 system and I'm running the tests on NFS. > Output looks like: > ok 51 Check success of execveat(6, 'home/tycho/packages/...yyyyyyyyyyyyyyyyyyyy', 0)... > # Check execveat(AT_EMPTY_PATH)'s comm is sentinel > ok 52 Check success of execveat(9, '', 4096)... > # Check execveat(AT_EMPTY_PATH)'s comm is sentinel > ok 53 Check success of execveat(11, '', 4096)... > # Check execveat(AT_EMPTY_PATH)'s comm is 9 > [ 25.579272] process 'execveat' launched '/dev/fd/9' with NULL argv: empty string added > ok 54 Check success of execveat(9, '', 4096)... The output when things fail is: # # Check execveat(AT_EMPTY_PATH)'s comm is sentinel # # bad comm, got: 11 expected: sentinel# child 8257 exited with 1 neither 0 nor 0 # not ok 52 Check success of execveat(11, '', 4096)... # # Check execveat(AT_EMPTY_PATH)'s comm is sentinel # # bad comm, got: 13 expected: sentinel# child 8258 exited with 1 neither 0 nor 0 # not ok 53 Check success of execveat(13, '', 4096)... Full log from a failing job at: https://lava.sirena.org.uk/scheduler/job/993508 I didn't do any investigation beyond this.
Attachment:
signature.asc
Description: PGP signature