[LTP] [PATCH 5/5] syscalls/pidfd_getfd02: add basic error test

xuyang2018.jy@fujitsu.com xuyang2018.jy@fujitsu.com
Fri Feb 18 08:03:09 CET 2022


Hi Petr
> Hi Xu,
>
>>> and get more info.
>> I will look Cyril's patch and wait.
> Thx!
The Cyril's patch seems only a single patch and doesn't affect the other 
TST_TEST macros. So how I just only use 
TST_EXP_FD_SILENT(pidfd_open(getpid(), 0));?


>
>>>> +	if (!TST_PASS)
>>>> +		tst_brk(TFAIL | TTERRNO, "pidfd_open failed");
>
>>> @Cyril: would it be possible to to allow using also tst_brk() in macros in
>>> tst_test_macros.h?
>
>> Maybe can add SAFE_PIDFD_OPEN.
> I was thinking about it. But you use TFAIL - part of testing.
> But using just SAFE_PIDFD_OPEN() even it's using TBROK might be best.
My v2 just keep this.

ps: I also remove useless static expire_pidfd because we can use TST_RET 
as pidfd when tesing ESRCH error.

Best Regards
Yang Xu
>
> Kind regards,
> Petr
>
>>> Having TST_*_BRK() (i.e. TST_EXP_FD_SILENT_BRK()) looks too complicated


More information about the ltp mailing list