[LTP] [PATCH v2 2/2] syscalls/geteuid02: Convert into new api
Petr Vorel
pvorel@suse.cz
Fri Jul 7 11:01:48 CEST 2023
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,
> +};
More information about the ltp
mailing list