]> git.ipfire.org Git - thirdparty/linux.git/commit
proc: test "Kthread:" field
authorAlexey Dobriyan <adobriyan@gmail.com>
Fri, 7 Jun 2024 15:14:29 +0000 (18:14 +0300)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 25 Jun 2024 05:25:08 +0000 (22:25 -0700)
commite7679a5c820d0865d0900931a7341048d830917d
tree6416dcc8e74010544e16616ad1c6d48c044b9655
parentd0bff054053f7a46a3819aba55ad803aa639ed7e
proc: test "Kthread:" field

/proc/${pid}/status got Kthread field recently.

Test that userspace program is not reported as kernel thread.

Test that kernel thread is reported as kernel thread.
Use kthreadd with pid 2 for this.

Link: https://lkml.kernel.org/r/818c4c41-8668-4566-97a9-7254abf819ee@p183
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Chunguang Wu <fullspring2018@gmail.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/proc/.gitignore
tools/testing/selftests/proc/Makefile
tools/testing/selftests/proc/proc-2-is-kthread.c [new file with mode: 0644]
tools/testing/selftests/proc/proc-self-isnt-kthread.c [new file with mode: 0644]