selftests/exec: Check if the syscall exists and bail if not
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 <864f124608374e06e4da1fa5d2e47ed839b95411@ellerman.id.au>
Acked-by: David Drysdale <3df90f5a773b5a2cefcd5ea3d3f28279dde29483@google.com>
Signed-off-by: Shuah Khan <c62751f8c6ce7eb0639cab80a821801931863a4b@osg.samsung.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs