]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/sched_ext: Fix unused-result warning for read()
authorCheng-Yang Chou <yphbchou0911@gmail.com>
Sun, 22 Feb 2026 08:25:22 +0000 (16:25 +0800)
committerTejun Heo <tj@kernel.org>
Mon, 23 Feb 2026 17:45:10 +0000 (07:45 -1000)
commit1f0638604f65dae9fc8b6ce937907daf5f0132d0
treec09a627827116cd8d1a7d31253d087d091af5a2f
parent9d851afa482680bdd7c158cc8720284dc9ecb5fe
selftests/sched_ext: Fix unused-result warning for read()

The read() call in run_test() triggers a warn_unused_result compiler
warning, which breaks the build under -Werror.

Check the return value of read() and exit the child process on failure to
satisfy the compiler and handle pipe read errors.

Reviewed-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
tools/testing/selftests/sched_ext/init_enable_count.c