Skip to contentSkip to conversation

setresuid04.c: add tmpdir and leaving rgid, sgid unchanged

PATCH In review Avinesh Kumar 2 participants 2 messages Dec 8, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 setresuid04.c: add tmpdir and leaving rgid, sgid unchanged

---
 testcases/kernel/syscalls/setresuid/setresuid04.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
testcases/kernel/syscalls/setresuid/setresuid04.c +2 -1
index 886ecdd0b..833aee91d 100644
@@ -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(0, 0, 0);
+	SAFE_SETRESUID(-1, 0, -1);
 	TST_EXP_FD(open(TEMP_FILE, O_RDWR));
 	SAFE_CLOSE(TST_RET);
 }
@@ -68,5 +68,6 @@ static struct tst_test test = {
 	.test_all = run,
 	.cleanup = cleanup,
 	.needs_root = 1,
+	.needs_tmpdir = 1,
 	.forks_child = 1
 };
Signature · 5 lines
2.38.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#1 lore raw

Thanks, merged!!

Signature · 6 lines
Regards,
Li Wang


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp