Skip to content

Commit e8f3474

Browse files
heynemaxBenjamin Tissoires
authored andcommitted
selftests: hid: fix typo and exit code
The correct exit code to mark a test as skipped is 4. Fixes: ffb85d5 ("selftests: hid: import hid-tools hid-core tests") Signed-off-by: Maximilian Heyne <mheyne@amazon.de> Link: https://patch.msgid.link/20241126135850.76493-1-mheyne@amazon.de Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
1 parent 5954821 commit e8f3474

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

tools/testing/selftests/hid/run-hid-tools-tests.sh

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,26 @@
22
# SPDX-License-Identifier: GPL-2.0
33
# Runs tests for the HID subsystem
44

5+
KSELFTEST_SKIP_TEST=4
6+
57
if ! command -v python3 > /dev/null 2>&1; then
68
echo "hid-tools: [SKIP] python3 not installed"
7-
exit 77
9+
exit $KSELFTEST_SKIP_TEST
810
fi
911

1012
if ! python3 -c "import pytest" > /dev/null 2>&1; then
11-
echo "hid: [SKIP/ pytest module not installed"
12-
exit 77
13+
echo "hid: [SKIP] pytest module not installed"
14+
exit $KSELFTEST_SKIP_TEST
1315
fi
1416

1517
if ! python3 -c "import pytest_tap" > /dev/null 2>&1; then
16-
echo "hid: [SKIP/ pytest_tap module not installed"
17-
exit 77
18+
echo "hid: [SKIP] pytest_tap module not installed"
19+
exit $KSELFTEST_SKIP_TEST
1820
fi
1921

2022
if ! python3 -c "import hidtools" > /dev/null 2>&1; then
21-
echo "hid: [SKIP/ hid-tools module not installed"
22-
exit 77
23+
echo "hid: [SKIP] hid-tools module not installed"
24+
exit $KSELFTEST_SKIP_TEST
2325
fi
2426

2527
TARGET=${TARGET:=.}

0 commit comments

Comments
 (0)