selftests: check that execveat returns negative values in case of errors
Subsystems (2)
PATCH 1/1 selftests: check that execveat returns negative values in case of errors
Currently we check that execveat returns non-positive value when an error is expected. But we need to check that execveat() doesn't return zero in such cases too.
Cc Shuah Khan <[email protected]>
Signed-off-by Andrey Vagin <[email protected]>
--- tools/testing/selftests/exec/execveat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/exec/execveat.c +1 -1
@@ -47,7 +47,7 @@ static int _check_execveat_fail(int fd, const char *path, int flags, fd, path?:"(null)", flags, errno_str); rc =execveat_ (fd, path, argv, envp, flags); -if (rc >0 ) { +if (rc >=0 ) {printf ("[FAIL] (unexpected success from execveat(2))\n" );return 1 ; }
Signature · 1 line
2.1.0