lkml.org 
[lkml]   [2015]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] selftests/exec: take into account that zero is a success code
Date
Cc: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Andrey Vagin <avagin@openvz.org>
---
tools/testing/selftests/exec/execveat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/exec/execveat.c b/tools/testing/selftests/exec/execveat.c
index e238c95..6747a3f 100644
--- a/tools/testing/selftests/exec/execveat.c
+++ b/tools/testing/selftests/exec/execveat.c
@@ -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;
}
--
2.1.0


\
 
 \ /
  Last update: 2015-03-13 17:21    [W:0.020 / U:6.888 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site