[LTP] [PATCH 2/2] syscalls/geteuid02: Convert into new api

Petr Vorel pvorel@suse.cz
Mon Jul 3 06:57:39 CEST 2023


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