[LTP] [PATCH 2/2] syscalls/geteuid02: Convert into new api
Yang Xu (Fujitsu)
xuyang2018.jy@fujitsu.com
Tue Jul 4 12:40:39 CEST 2023
Hi Petr,
Thanks for you review, merged with your suggestion.
Best Regards
Yang Xu
-----Original Message-----
From: Petr Vorel <pvorel@suse.cz>
Sent: Monday, July 3, 2023 12:58 PM
To: Xu, Yang/徐 杨 <xuyang2018.jy@fujitsu.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 2/2] syscalls/geteuid02: Convert into new api
Hi Xu,
again, wrong formatting:
geteuid02.c:1: WARNING: Missing or malformed SPDX-License-Identifier tag in line 1
geteuid02.c:20: ERROR: space required after that ',' (ctx:VxV)
geteuid02.c:22: ERROR: space required before the open parenthesis '('
geteuid02.c:25: ERROR: space required after that ',' (ctx:VxV)
geteuid02.c:25: ERROR: space required after that ',' (ctx:VxO)
geteuid02.c:25: ERROR: space required before that '&' (ctx:OxV)
geteuid02.c:25: ERROR: space required after that ',' (ctx:VxO)
geteuid02.c:25: ERROR: space required before that '&' (ctx:OxV)
geteuid02.c:25: ERROR: space required after that ',' (ctx:VxO)
geteuid02.c:25: ERROR: space required before that '&' (ctx:OxV)
geteuid02.c:25: ERROR: space required after that ',' (ctx:VxO)
geteuid02.c:25: ERROR: space required before that '&' (ctx:OxV)
geteuid02.c:27: ERROR: space required before the open brace '{'
geteuid02.c:27: ERROR: space required before the open parenthesis '('
geteuid02.c:30: ERROR: space required after that ',' (ctx:VxV)
geteuid02.c:31: ERROR: space required before the open brace '{'
geteuid02.c:31: ERROR: space required after that close brace '}'
geteuid02.c:33: ERROR: space required after that ',' (ctx:VxV)
...
> --- a/testcases/kernel/syscalls/geteuid/geteuid02.c
...
> +/*
+ Again:
/*\
* [Description]
> + *[Description]
> + *
> + * Check that geteuid() return value matches value from /proc/self/status.
> + */
> + TST_EXP_POSITIVE(GETEUID(),"geteuid");
...
> + if(TST_RET != uid[1]){
> + tst_res(TFAIL,
> + "geteuid() ret %ld != /proc/self/status Euid: %ld",
> + TST_RET,uid[1]);
> + }else{
> + tst_res(TPASS,
> + "geteuid() ret == /proc/self/status Euid: %ld",uid[1]);
Besides missing space around brackets (reported by make check) this could be simplified by some of our macros:
TST_EXP_EXPR(TST_RET == uid[1],
"geteuid() ret %ld != /proc/self/status EUID: %ld",
TST_RET, uid[1]);
Kind regards,
Petr
More information about the ltp
mailing list