Skip to content

Commit e35ff25

Browse files
committed
Merge tag 'linux-kselftest-kunit-fixes-6.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
Pull KUnit fixes from Shuah Khan: "Two fixes to test build and a fix for incorrect taint reason reporting" * tag 'linux-kselftest-kunit-fixes-6.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: tools: Add new "test" taint to kernel-chktaint kunit: fix Kconfig for build-in tests USB4 and Nitro Enclaves kunit: fix assert_type for comparison macros
2 parents 22b2e2d + 2a2dfc8 commit e35ff25

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

drivers/thunderbolt/Kconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ config USB4_DEBUGFS_WRITE
2929

3030
config USB4_KUNIT_TEST
3131
bool "KUnit tests" if !KUNIT_ALL_TESTS
32-
depends on (USB4=m || KUNIT=y)
33-
depends on KUNIT
32+
depends on USB4 && KUNIT=y
3433
default KUNIT_ALL_TESTS
3534

3635
config USB4_DMA_TEST

drivers/virt/nitro_enclaves/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ config NITRO_ENCLAVES
1717

1818
config NITRO_ENCLAVES_MISC_DEV_TEST
1919
bool "Tests for the misc device functionality of the Nitro Enclaves" if !KUNIT_ALL_TESTS
20-
depends on NITRO_ENCLAVES && KUNIT
20+
depends on NITRO_ENCLAVES && KUNIT=y
2121
default KUNIT_ALL_TESTS
2222
help
2323
Enable KUnit tests for the misc device functionality of the Nitro

include/kunit/test.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ do { \
826826

827827
#define KUNIT_EXPECT_LE_MSG(test, left, right, fmt, ...) \
828828
KUNIT_BINARY_INT_ASSERTION(test, \
829-
KUNIT_ASSERTION, \
829+
KUNIT_EXPECTATION, \
830830
left, <=, right, \
831831
fmt, \
832832
##__VA_ARGS__)
@@ -1116,7 +1116,7 @@ do { \
11161116

11171117
#define KUNIT_ASSERT_LT_MSG(test, left, right, fmt, ...) \
11181118
KUNIT_BINARY_INT_ASSERTION(test, \
1119-
KUNIT_EXPECTATION, \
1119+
KUNIT_ASSERTION, \
11201120
left, <, right, \
11211121
fmt, \
11221122
##__VA_ARGS__)
@@ -1157,7 +1157,7 @@ do { \
11571157

11581158
#define KUNIT_ASSERT_GT_MSG(test, left, right, fmt, ...) \
11591159
KUNIT_BINARY_INT_ASSERTION(test, \
1160-
KUNIT_EXPECTATION, \
1160+
KUNIT_ASSERTION, \
11611161
left, >, right, \
11621162
fmt, \
11631163
##__VA_ARGS__)

tools/debugging/kernel-chktaint

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ else
187187
echo " * auxiliary taint, defined for and used by distros (#16)"
188188

189189
fi
190+
190191
T=`expr $T / 2`
191192
if [ `expr $T % 2` -eq 0 ]; then
192193
addout " "
@@ -195,6 +196,14 @@ else
195196
echo " * kernel was built with the struct randomization plugin (#17)"
196197
fi
197198

199+
T=`expr $T / 2`
200+
if [ `expr $T % 2` -eq 0 ]; then
201+
addout " "
202+
else
203+
addout "N"
204+
echo " * an in-kernel test (such as a KUnit test) has been run (#18)"
205+
fi
206+
198207
echo "For a more detailed explanation of the various taint flags see"
199208
echo " Documentation/admin-guide/tainted-kernels.rst in the Linux kernel sources"
200209
echo " or https://kernel.org/doc/html/latest/admin-guide/tainted-kernels.html"

0 commit comments

Comments
 (0)