<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/testing/selftests/pidfd, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-07-24T08:53:13+00:00</updated>
<entry>
<title>pidfs: add selftests for new namespace ioctls</title>
<updated>2024-07-24T08:53:13+00:00</updated>
<author>
<name>Christian Brauner</name>
<email>brauner@kernel.org</email>
</author>
<published>2024-07-22T13:13:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1bb8dce5dfa9d11ff83a683fab2cda2916384c12'/>
<id>urn:sha1:1bb8dce5dfa9d11ff83a683fab2cda2916384c12</id>
<content type='text'>
Add selftests to verify that deriving namespace file descriptors from
pidfd file descriptors works correctly.

Link: https://lore.kernel.org/r/20240722-work-pidfs-69dbea91edab@brauner
Signed-off-by: Christian Brauner &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'linux_kselftest-next-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest</title>
<updated>2024-05-14T18:36:54+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2024-05-14T18:36:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4b95dc87362aa57bdd0dcbad109ca5e5ef3cbb6c'/>
<id>urn:sha1:4b95dc87362aa57bdd0dcbad109ca5e5ef3cbb6c</id>
<content type='text'>
Pull kselftest updates from Shuah Khan:

 - make framework and tests reporting KTAP compliant

 - make ktap_helpers and power_supply test POSIX compliant

 - add ksft_exit_fail_perror() to include errono in string form

 - avoid clang reporting false positive static analysis errors about
   functions that exit and never return. ksft_exit* functions are marked
   __noreturn to address this problem

 - add mechanism for reporting a KSFT_ result code

 - fix build warnings related missing headers and unused variables

 - fix clang build failures

 - cleanups to resctrl test

 - add host arch for LLVM builds

* tag 'linux_kselftest-next-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (44 commits)
  selftests/sgx: Include KHDR_INCLUDES in Makefile
  selftests: Compile kselftest headers with -D_GNU_SOURCE
  selftests/resctrl: fix clang build warnings related to abs(), labs() calls
  selftests/ftrace: Fix checkbashisms errors
  selftests/ftrace: Fix BTFARG testcase to check fprobe is enabled correctly
  selftests/capabilities: fix warn_unused_result build warnings
  selftests: filesystems: add missing stddef header
  selftests: kselftest_deps: fix l5_test() empty variable
  selftests: default to host arch for LLVM builds
  selftests/resctrl: fix clang build failure: use LOCAL_HDRS
  selftests/binderfs: use the Makefile's rules, not Make's implicit rules
  Documentation: kselftest: fix codeblock
  selftests: kselftest: Make ksft_exit functions return void instead of int
  selftests: x86: ksft_exit_pass() does not return
  selftests: timers: ksft_exit functions do not return
  selftests: sync: ksft_exit_pass() does not return
  selftests/resctrl: ksft_exit_skip() does not return
  selftests: pidfd: ksft_exit functions do not return
  selftests/mm: ksft_exit functions do not return
  selftests: membarrier: ksft_exit_pass() does not return
  ...
</content>
</entry>
<entry>
<title>selftests/pidfd: Fix wrong expectation</title>
<updated>2024-05-11T17:18:46+00:00</updated>
<author>
<name>Mickaël Salaün</name>
<email>mic@digikod.net</email>
</author>
<published>2024-05-11T17:14:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=821bc4a8fd2454ff6d719aae7cac93f60567fe65'/>
<id>urn:sha1:821bc4a8fd2454ff6d719aae7cac93f60567fe65</id>
<content type='text'>
Replace a wrong EXPECT_GT(self-&gt;child_pid_exited, 0) with EXPECT_GE(),
which will be actually tested on the parent and child sides with a
following commit.

Cc: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: Christian Brauner &lt;brauner@kernel.org&gt;
Link: https://lore.kernel.org/r/20240511171445.904356-8-mic@digikod.net
Signed-off-by: Mickaël Salaün &lt;mic@digikod.net&gt;
</content>
</entry>
<entry>
<title>selftests/pidfd: Fix config for pidfd_setns_test</title>
<updated>2024-05-11T17:18:39+00:00</updated>
<author>
<name>Mickaël Salaün</name>
<email>mic@digikod.net</email>
</author>
<published>2024-05-11T17:14:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=37dc2e0d38d6eb690ee043b43ee6f7cdf2994bf6'/>
<id>urn:sha1:37dc2e0d38d6eb690ee043b43ee6f7cdf2994bf6</id>
<content type='text'>
Required by switch_timens() to open /proc/self/ns/time_for_children.

CONFIG_GENERIC_VDSO_TIME_NS is not available on UML, so pidfd_setns_test
cannot be run successfully on this architecture.

Cc: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Fixes: 2b40c5db73e2 ("selftests/pidfd: add pidfd setns tests")
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: Christian Brauner &lt;brauner@kernel.org&gt;
Link: https://lore.kernel.org/r/20240511171445.904356-2-mic@digikod.net
Signed-off-by: Mickaël Salaün &lt;mic@digikod.net&gt;
</content>
</entry>
<entry>
<title>selftests: pidfd: ksft_exit functions do not return</title>
<updated>2024-05-06T19:57:20+00:00</updated>
<author>
<name>Nathan Chancellor</name>
<email>nathan@kernel.org</email>
</author>
<published>2024-04-24T17:24:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a3bf0755f01568493e1f2e83ff98284c8c12e35d'/>
<id>urn:sha1:a3bf0755f01568493e1f2e83ff98284c8c12e35d</id>
<content type='text'>
After commit f7d5bcd35d42 ("selftests: kselftest: Mark functions that
unconditionally call exit() as __noreturn"), ksft_exit_...() functions
are marked as __noreturn, which means the return type should not be
'int' but 'void' because they are not returning anything (and never were
since exit() has always been called).

To facilitate updating the return type of these functions, remove
'return' before the calls to ksft_exit_{pass,fail}(), as __noreturn
prevents the compiler from warning that a caller of the ksft_exit
functions does not return a value because the program will terminate
upon calling these functions.

Just removing 'return' would have resulted in

  !ret ? ksft_exit_pass() : ksft_exit_fail();

so convert that into the more idiomatic

  if (ret)
    ksft_exit_fail();
  ksft_exit_pass();

Reviewed-by: Muhammad Usama Anjum &lt;usama.anjum@collabora.com&gt;
Reviewed-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: add ESRCH tests for pidfd_getfd()</title>
<updated>2024-02-07T14:48:31+00:00</updated>
<author>
<name>Tycho Andersen</name>
<email>tandersen@netflix.com</email>
</author>
<published>2024-02-07T09:19:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f0ece18e994144b7daa025b68ead97de26a2df1f'/>
<id>urn:sha1:f0ece18e994144b7daa025b68ead97de26a2df1f</id>
<content type='text'>
Ensure that pidfd_getfd() reports -ESRCH if the task is already exiting.

Signed-off-by: Tycho Andersen &lt;tandersen@netflix.com&gt;
Link: https://lore.kernel.org/r/20240206192357.81942-1-tycho@tycho.pizza
Signed-off-by: Christian Brauner &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/pidfd: Fix ksft print formats</title>
<updated>2023-10-13T20:08:21+00:00</updated>
<author>
<name>Maciej Wieczor-Retman</name>
<email>maciej.wieczor-retman@intel.com</email>
</author>
<published>2023-10-13T11:36:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4d7f4e8158b62f63031510cdc24acc520956c091'/>
<id>urn:sha1:4d7f4e8158b62f63031510cdc24acc520956c091</id>
<content type='text'>
Compiling pidfd selftest after adding a __printf() attribute to
ksft_print_msg() and ksft_test_result_pass() exposes -Wformat warnings
in error_report(), test_pidfd_poll_exec_thread(),
child_poll_exec_test(), test_pidfd_poll_leader_exit_thread(),
child_poll_leader_exit_test().

The ksft_test_result_pass() in error_report() expects a string but
doesn't provide any argument after the format string. All the other
calls to ksft_print_msg() in the functions mentioned above have format
strings that don't match with other passed arguments.

Fix format specifiers so they match the passed variables.

Add a missing variable to ksft_test_result_pass() inside
error_report() so it matches other cases in the switch statement.

Fixes: 2def297ec7fb ("pidfd: add tests for NSpid info in fdinfo")

Signed-off-by: Maciej Wieczor-Retman &lt;maciej.wieczor-retman@intel.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftest: pidfd: Omit long and repeating outputs</title>
<updated>2023-06-12T22:39:11+00:00</updated>
<author>
<name>Ziqi Zhao</name>
<email>astrajoan@yahoo.com</email>
</author>
<published>2023-05-23T23:22:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bcda4c863efdd038c4f8ade63ff435ed663cc286'/>
<id>urn:sha1:bcda4c863efdd038c4f8ade63ff435ed663cc286</id>
<content type='text'>
An output message:

&gt; # # waitpid WEXITSTATUS=0

will be printed for 30,000+ times in the `pidfd_test` selftest, which
does not seem ideal. This patch removes the print logic in the
`wait_for_pid` function, so each call to this function does not output
a line by default. Any existing call sites where the extra line might
be beneficial have been modified to include extra print statements
outside of the function calls.

Signed-off-by: Ziqi Zhao &lt;astrajoan@yahoo.com&gt;
Reviewed-by: Christian Brauner &lt;brauner@kernel.org&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: pidfd: Fix incorrect kernel headers search path</title>
<updated>2023-02-13T16:09:45+00:00</updated>
<author>
<name>Mathieu Desnoyers</name>
<email>mathieu.desnoyers@efficios.com</email>
</author>
<published>2023-01-27T13:57:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3f7d71768795c386019f2295c1986d00035c9f0f'/>
<id>urn:sha1:3f7d71768795c386019f2295c1986d00035c9f0f</id>
<content type='text'>
Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents
building against kernel headers from the build environment in scenarios
where kernel headers are installed into a specific output directory
(O=...).

Signed-off-by: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Cc: Shuah Khan &lt;shuah@kernel.org&gt;
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; # 5.18+
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests/pidfd_test: Remove the erroneous ','</title>
<updated>2022-11-02T09:09:57+00:00</updated>
<author>
<name>Zhao Gongyi</name>
<email>zhaogongyi@huawei.com</email>
</author>
<published>2022-11-01T03:56:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=89c1017aac67ca81973b7c8eac5d021315811a93'/>
<id>urn:sha1:89c1017aac67ca81973b7c8eac5d021315811a93</id>
<content type='text'>
Remove the erroneous ',', otherwise it might result in wrong output
and report:
 ...
 Bail out! (errno %d)
  test: Unexpected epoll_wait result (c=4208480, events=2)
 ...

Fixes: 740378dc7834 ("pidfd: add polling selftests")
Signed-off-by: Zhao Gongyi &lt;zhaogongyi@huawei.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
</feed>
