History log of /external/linux-kselftest/tools/testing/selftests/exec/execveat.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
860cea0bba7f78cf4cbb78251849e6ef159e6914 10-Oct-2017 Steve Muckle <smuckle@google.com> selftests/exec: use /system/bin/sh

The Android shell is located at /system/bin/sh.

Bug: 67016227
Test: run vts-kernel -m VtsKernelLinuxKselftestStaging
Change-Id: I1b33f382325011f507c7a0bb2120e5ff70c2534c
Signed-off-by: Steve Muckle <smuckle@google.com>
/external/linux-kselftest/tools/testing/selftests/exec/execveat.c
95e8aad6260e79f8c8f6afc52c5b6b0bb447342f 07-Oct-2017 Steve Muckle <smuckle@google.com> selftests/exec: include cwd in long path calculation

When creating a pathname close to PATH_MAX to test execveat, factor in
the current working directory path otherwise we end up with an absolute
path that is longer than PATH_MAX. While execveat() may succeed, subsequent
calls to the kernel from the runtime environment which are required to
successfully execute the test binary/script may fail because of this.

To keep the semantics of the test the same, rework the relative pathname
part of the test to be relative to the root directory so it isn't
decreased by the length of the current working directory path.

Bug: 67016227
Test: run vts-kernel -m VtsKernelLinuxKselftestStaging
Change-Id: Ib407d1afc52de7e58cb208fd41ade6e8c38d8bfd
Signed-off-by: Steve Muckle <smuckle@google.com>
/external/linux-kselftest/tools/testing/selftests/exec/execveat.c
9a0b57451ae8142c74d65bddb6d7765818babbed 03-Feb-2015 Michael Ellerman <mpe@ellerman.id.au> selftests/exec: Check if the syscall exists and bail if not

On systems which don't implement sys_execveat(), this test produces a
lot of output.

Add a check at the beginning to see if the syscall is present, and if
not just note one error and return.

When we run on a system that doesn't implement the syscall we will get
ENOSYS back from the kernel, so change the logic that handles
__NR_execveat not being defined to also use ENOSYS rather than -ENOSYS.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Acked-by: David Drysdale <drysdale@google.com>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
/external/linux-kselftest/tools/testing/selftests/exec/execveat.c
cd805f367633f6540aa287751c270973b7e4cdc9 06-Jan-2015 David Drysdale <drysdale@google.com> selftests/exec: allow shell return code of 126

When the shell fails to invoke a script because its path name
is too long (ENAMETOOLONG), most shells return 127 to indicate
command not found. However, some systems report 126 (which POSIX
suggests should indicate a non-executable file) for this case,
so allow that too.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David Drysdale <drysdale@google.com>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
/external/linux-kselftest/tools/testing/selftests/exec/execveat.c
6898b627aab6ba553e6d8b40a0b1ddc43c48d42f 21-Dec-2014 Geert Uytterhoeven <geert@linux-m68k.org> selftests/exec: Use %zu to format size_t

On 32-bit:

execveat.c: In function 'check_execveat_pathmax':
execveat.c:183: warning: format '%lu' expects type 'long unsigned int', but argument 3 has type 'size_t'
execveat.c:187: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'size_t'

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
/external/linux-kselftest/tools/testing/selftests/exec/execveat.c
c9b26b81af9c3296685b5dbcbcd415400ab400dc 13-Dec-2014 David Drysdale <drysdale@google.com> syscalls: add selftest for execveat(2)

Signed-off-by: David Drysdale <drysdale@google.com>
Cc: Meredydd Luff <meredydd@senatehouse.org>
Cc: Shuah Khan <shuah.kh@samsung.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Rich Felker <dalias@aerifal.cx>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/external/linux-kselftest/tools/testing/selftests/exec/execveat.c