]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 27 Apr 2022 09:57:59 +0000 (11:57 +0200)
commitf33dd06b788d948d4c46c5845bb7e357ec1ca828
tree123dad48f86afdc3ec96b3a8ceeb9737712f629b
parentf26eb38b3a6cd8174d61d2d1014723a9f706a87a
selftests/bpf/test_lirc_mode2.sh: Exit with proper code

BugLink: https://bugs.launchpad.net/bugs/1969110
[ Upstream commit ec80906b0fbd7be11e3e960813b977b1ffe5f8fe ]

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: 6bdd533cee9a ("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
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit dd1043342e453913760b088e58a780e968674ace)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
tools/testing/selftests/bpf/test_lirc_mode2.sh