public inbox for ltp@lists.linux.it
 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 v2 2/2] syscalls/geteuid02: Convert into new api
Date: Fri, 7 Jul 2023 11:01:48 +0200	[thread overview]
Message-ID: <20230707090148.GC571797@pevik> (raw)
In-Reply-To: <1688637954-17765-2-git-send-email-xuyang2018.jy@fujitsu.com>

Hi Xu,

> -		if (pwent == NULL)
> -			tst_resm(TFAIL | TERRNO, "getpwuid failed");
> -
> -		UID16_CHECK(pwent->pw_uid, geteuid, cleanup);
Don't we need to use UID16_CHECK()? In the new API version from
compat_tst_16.h

Kind regards,
Petr

> -		if (pwent->pw_uid != TEST_RETURN)
> -			tst_resm(TFAIL, "getpwuid value, %d, "
> -				 "does not match geteuid "
> -				 "value, %ld", pwent->pw_uid,
> -				 TEST_RETURN);
> -		else
> -			tst_resm(TPASS, "values from geteuid "
> -				 "and getpwuid match");
> -	}
...
> +	TST_EXP_EXPR(TST_RET == uid[1],
> +		     "geteuid() ret %ld == /proc/self/status EUID: %ld",
> +		     TST_RET, uid[1]);
>  }

> +static struct tst_test test = {
> +	.test_all = verify_geteuid,
> +};

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

  reply	other threads:[~2023-07-07  9:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-06 10:05 [LTP] [PATCH v2 1/2] syscalls/geteuid01: Convert into new api Yang Xu
2023-07-06 10:05 ` [LTP] [PATCH v2 2/2] syscalls/geteuid02: " Yang Xu
2023-07-07  9:01   ` Petr Vorel [this message]
2023-07-12  2:01     ` Yang Xu (Fujitsu)
2023-07-17 10:42       ` Yang Xu (Fujitsu)
2023-07-17 13:11         ` Petr Vorel
2023-07-10 13:46 ` [LTP] [PATCH v2 1/2] syscalls/geteuid01: " Petr Vorel
2023-07-17 14:56   ` Yang Xu (Fujitsu)
2023-07-18 10:02     ` Petr Vorel

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=20230707090148.GC571797@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox