[LTP] [PATCH v1 1/1] ioctl_pidfd06: expect EREMOTE for PIDFD_GET_INFO across pidns
Andrea Cervesato
andrea.cervesato@suse.com
Thu Feb 19 09:49:20 CET 2026
Hi!
> We are usually not that strict and accept both errnos (i.e. using
> TST_EXP_FAIL_ARR()) without bothering kernel version checking if it's kind of
> new feature. Sometimes it's even complicated to check the kernel version,
> see a2ab37459a in bind03.c (FYI if it's required to check kernel version,
> we usually detect it in the setup, e.g. 2d066ead3d).
>
This is a tricky situation where we might use both approaches.
TST_EXP_FAIL_ARR() would be my first go, but it's also true that the
syscall should not fail with EREMOTE for un-patched kernels. We should
expect that kernel fails with ESRCH. And we don't want to hide bugs.
Anyway..
We also don't have ways to verify if the underlying kernel has been
patched or not, so we should assume that any kernel might receive this
backported patch and TST_EXP_FAIL_ARR() remains the only logical
solution for this test.
> Your approach (single errno) is used if the change is a real fix, which is
> *intended* to be backported to the stable kernels (patch usually has Cc: stable
> version, unlike other commits backported to stable due Fixes:). But in this case
> it should use "linux-git" tag record [3].
>
> .tags = (const struct tst_tag[]) {
> {"linux-git", "ab89060fbc92e"},
> {}
> }
>
> Here I'm not sure myself how severe it is. I suppose it will be backported to
> stable as a fix, maybe really just add linux-git.
>
> Kind regards,
> Petr
>
> [1] https://news.ycombinator.com/item?id=34979591
> [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=05a5f51ca566
> [3] https://github.com/linux-test-project/ltp/blob/master/doc/old/C-Test-API.asciidoc#140-test-tags
>
> > exit(0);
> > }
Also, since this is a new feature which has not been merged yet,
we should tag the patch with [STAGING] tag in the git commit subject as
per:
https://linux-test-project.readthedocs.io/en/latest/developers/ground_rules.html#kernel-features-and-rcs
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
More information about the ltp
mailing list