diff mbox series

setreuid01: Use SETREUID() instead of setreuid() to check 32bit syscall

Message ID 20230110130711.29274-1-akumar@suse.de
State Accepted
Headers show
Series setreuid01: Use SETREUID() instead of setreuid() to check 32bit syscall | expand

Commit Message

Avinesh Kumar Jan. 10, 2023, 1:07 p.m. UTC
Signed-off-by: Avinesh Kumar <akumar@suse.de>
---
 testcases/kernel/syscalls/setreuid/setreuid01.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Comments

Richard Palethorpe Jan. 10, 2023, 2:20 p.m. UTC | #1
Hello,

Merged, thanks!

Avinesh Kumar <akumar@suse.de> writes:

> Signed-off-by: Avinesh Kumar <akumar@suse.de>
> ---
>  testcases/kernel/syscalls/setreuid/setreuid01.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/testcases/kernel/syscalls/setreuid/setreuid01.c b/testcases/kernel/syscalls/setreuid/setreuid01.c
> index bbf29d360..7c2b6d589 100644
> --- a/testcases/kernel/syscalls/setreuid/setreuid01.c
> +++ b/testcases/kernel/syscalls/setreuid/setreuid01.c
> @@ -26,13 +26,13 @@ static void run(void)
>  	euid = geteuid();
>  	UID16_CHECK(euid, setreuid);
>  
> -	TST_EXP_PASS(setreuid(-1, -1));
> -	TST_EXP_PASS(setreuid(-1, euid));
> -	TST_EXP_PASS(setreuid(ruid, -1));
> -	TST_EXP_PASS(setreuid(-1, ruid));
> -	TST_EXP_PASS(setreuid(euid, -1));
> -	TST_EXP_PASS(setreuid(euid, euid));
> -	TST_EXP_PASS(setreuid(ruid, ruid));
> +	TST_EXP_PASS(SETREUID(-1, -1));
> +	TST_EXP_PASS(SETREUID(-1, euid));
> +	TST_EXP_PASS(SETREUID(ruid, -1));
> +	TST_EXP_PASS(SETREUID(-1, ruid));
> +	TST_EXP_PASS(SETREUID(euid, -1));
> +	TST_EXP_PASS(SETREUID(euid, euid));
> +	TST_EXP_PASS(SETREUID(ruid, ruid));
>  }
>  
>  static struct tst_test test = {
> -- 
> 2.39.0
diff mbox series

Patch

diff --git a/testcases/kernel/syscalls/setreuid/setreuid01.c b/testcases/kernel/syscalls/setreuid/setreuid01.c
index bbf29d360..7c2b6d589 100644
--- a/testcases/kernel/syscalls/setreuid/setreuid01.c
+++ b/testcases/kernel/syscalls/setreuid/setreuid01.c
@@ -26,13 +26,13 @@  static void run(void)
 	euid = geteuid();
 	UID16_CHECK(euid, setreuid);
 
-	TST_EXP_PASS(setreuid(-1, -1));
-	TST_EXP_PASS(setreuid(-1, euid));
-	TST_EXP_PASS(setreuid(ruid, -1));
-	TST_EXP_PASS(setreuid(-1, ruid));
-	TST_EXP_PASS(setreuid(euid, -1));
-	TST_EXP_PASS(setreuid(euid, euid));
-	TST_EXP_PASS(setreuid(ruid, ruid));
+	TST_EXP_PASS(SETREUID(-1, -1));
+	TST_EXP_PASS(SETREUID(-1, euid));
+	TST_EXP_PASS(SETREUID(ruid, -1));
+	TST_EXP_PASS(SETREUID(-1, ruid));
+	TST_EXP_PASS(SETREUID(euid, -1));
+	TST_EXP_PASS(SETREUID(euid, euid));
+	TST_EXP_PASS(SETREUID(ruid, ruid));
 }
 
 static struct tst_test test = {