selftests/exec: Check if the syscall exists and bail if not
authorMichael Ellerman <mpe@ellerman.id.au>
Tue, 3 Feb 2015 03:53:08 +0000 (14:53 +1100)
committerShuah Khan <shuahkh@osg.samsung.com>
Wed, 11 Mar 2015 16:15:19 +0000 (10:15 -0600)
commit9a0b57451ae8142c74d65bddb6d7765818babbed
tree39b95b227b7a917319267520370381c77edb9e4c
parent9eccca0843205f87c00404b663188b88eb248051
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>
tools/testing/selftests/exec/execveat.c