[LTP] [PATCH 5/5] syscalls/pidfd_getfd02: add basic error test
Petr Vorel
pvorel@suse.cz
Fri Feb 18 11:58:50 CET 2022
Hi Xu,
...
> >> + TST_EXP_FD_SILENT(pidfd_open(getpid(), 0), "pidfd_open");
> > If you wait for Cyril's patch adding auto stringification
> > https://lore.kernel.org/ltp/20220217142730.19726-1-chrubis@suse.cz/
> > you can use just:
> > TST_EXP_FD_SILENT(pidfd_open(getpid(), 0));
> > and get more info.
> I will look Cyril's patch and wait.
FYI Cyril is not planning to merge that patch, replaced by
https://lore.kernel.org/ltp/20220218103413.18540-1-chrubis@suse.cz/
But I'd still drop "pidfd_open", because
pidfd_getfd02.c:55: TFAIL: pidfd_open(getpid(), -9) failed: EINVAL (22)
is better than:
pidfd_getfd02.c:55: TFAIL: pidfd_open failed: EINVAL (22)
But as fanotify21.c also needs SAFE_PIDFD_OPEN() (and more tests will come in
the future I'd vote for adding SAFE_PIDFD_OPEN() as you suggested.
Kind regards,
Petr
More information about the ltp
mailing list