All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Yang Xu <xuyang2018.jy@fujitsu.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 2/2] syscalls/geteuid02: Convert into new api
Date: Mon, 3 Jul 2023 06:57:39 +0200	[thread overview]
Message-ID: <20230703045739.GB363557@pevik> (raw)
In-Reply-To: <1688352041-4945-2-git-send-email-xuyang2018.jy@fujitsu.com>

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

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

  reply	other threads:[~2023-07-03  4:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-03  2:40 [LTP] [PATCH 1/2] syscalls/geteuid01: Convert into new api Yang Xu
2023-07-03  2:40 ` [LTP] [PATCH 2/2] syscalls/geteuid02: " Yang Xu
2023-07-03  4:57   ` Petr Vorel [this message]
2023-07-04 10:40     ` Yang Xu (Fujitsu)
2023-07-03  4:31 ` [LTP] [PATCH 1/2] syscalls/geteuid01: " Petr Vorel
2023-07-04 10:39   ` Yang Xu (Fujitsu)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230703045739.GB363557@pevik \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=xuyang2018.jy@fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.