[LTP] [PATCH v2] set_tid_address01: refactor with new LTP API
Petr Vorel
pvorel@suse.cz
Thu Jan 9 10:42:35 CET 2025
Hi Ma Xinjian, Avinesh,
...
> + TEST(tst_syscall(__NR_set_tid_address, &newtid));
> + if (TST_RET == getpid())
> + tst_res(TPASS, "set_tid_address call succeeded: as expected %ld", TST_RET);
> + else
> + tst_res(TFAIL | TTERRNO, "set_tid_address call failed: expected %d, but got %ld", getpid(), TST_RET);
I wanted to replace this with:
TST_EXP_EQ_LI(tst_syscall(__NR_set_tid_address, &newtid), getpid());
But that TST_EXP_EQ_LI() not use TTERRNO.
Maybe use this?
TST_EXP_PID(tst_syscall(__NR_set_tid_address, &newtid));
TST_EXP_EQ_LI(TST_RET, getpid());
Kind regards,
Petr
More information about the ltp
mailing list