]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf/test_lirc_mode2.sh: Exit with proper code
authorHangbin Liu <liuhangbin@gmail.com>
Mon, 21 Mar 2022 02:41:49 +0000 (10:41 +0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 21 Mar 2022 13:48:06 +0000 (14:48 +0100)
commitc4da54778100556962b0194bcaf37feb86f28b21
tree0d94dd846cb0de105812f7d8688179ae025f7cc2
parentcfdda9faaf4964b63dbbb85f1f93d04a4e7e101a
selftests/bpf/test_lirc_mode2.sh: Exit with proper code

When test_lirc_mode2_user exec failed, the test report failed but still
exit with 0. Fix it by exiting with an error code.

Another issue is for the LIRCDEV checking. With bash -n, we need to quote
the variable, or it will always be true. So if test_lirc_mode2_user was
not run, just exit with skip code.

Fixes: 24e849f1277a ("bpf: add selftest for lirc_mode2 type program")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20220321024149.157861-1-liuhangbin@gmail.com
tools/testing/selftests/bpf/test_lirc_mode2.sh