[LTP] [PATCH] syscalls/setresuid04: Use SETRESUID instead of SAFE_SETRESUID to check 16bit syscall

Yang Xu xuyang2018.jy@fujitsu.com
Thu Dec 15 05:47:46 CET 2022


Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
---
 testcases/kernel/syscalls/setresuid/setresuid04.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testcases/kernel/syscalls/setresuid/setresuid04.c b/testcases/kernel/syscalls/setresuid/setresuid04.c
index 833aee91d..57b290f37 100644
--- a/testcases/kernel/syscalls/setresuid/setresuid04.c
+++ b/testcases/kernel/syscalls/setresuid/setresuid04.c
@@ -40,7 +40,7 @@ static void run(void)
 	pid_t pid;
 	int status;
 
-	SAFE_SETRESUID(-1, ltpuser->pw_uid, -1);
+	TST_EXP_PASS_SILENT(SETRESUID(-1, ltpuser->pw_uid, -1));
 	TST_EXP_FAIL2(open(TEMP_FILE, O_RDWR), EACCES);
 
 	pid = SAFE_FORK();
@@ -52,7 +52,7 @@ static void run(void)
 	if (WIFEXITED(status) && WEXITSTATUS(status) != 0)
 		tst_res(TFAIL, "child process exited with status: %d", status);
 
-	SAFE_SETRESUID(-1, 0, -1);
+	TST_EXP_PASS_SILENT(SETRESUID(-1, 0, -1));
 	TST_EXP_FD(open(TEMP_FILE, O_RDWR));
 	SAFE_CLOSE(TST_RET);
 }
-- 
2.27.0



More information about the ltp mailing list