Re: [LTP] [PATCH v2] set_tid_address01: refactor with new LTP API

Petr Vorel
2025-01-09T09:42:57Z

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());