diff mbox series

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

Message ID 20221208074551.22342-1-akumar@suse.de
State Accepted
Headers show
Series setresuid04.c: add tmpdir and leaving rgid, sgid unchanged | expand

Commit Message

Avinesh Kumar Dec. 8, 2022, 7:45 a.m. UTC
Signed-off-by: Avinesh Kumar <akumar@suse.de>
---
 testcases/kernel/syscalls/setresuid/setresuid04.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Li Wang Dec. 8, 2022, 7:50 a.m. UTC | #1
Thanks, merged!!
diff mbox series

Patch

diff --git a/testcases/kernel/syscalls/setresuid/setresuid04.c b/testcases/kernel/syscalls/setresuid/setresuid04.c
index 886ecdd0b..833aee91d 100644
--- a/testcases/kernel/syscalls/setresuid/setresuid04.c
+++ b/testcases/kernel/syscalls/setresuid/setresuid04.c
@@ -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
 };