Pull KUnit fixes from Shuah Khan: "Three fixes to bugs that cause kernel crash, link error during build, and a third to fix kunit_test_init_section_suites() extra indirection issue" * tag 'linux-kselftest-kunit-fixes-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: kunit: fix kunit_test_init_section_suites(...) kunit: fix bug in KUNIT_EXPECT_MEMEQ kunit: Export kunit_running()
Showing the changes to include (1 of 3 files). Show all
Unified · Split
| @@ -303,7 +303,6 @@ static inline int kunit_run_all_tests(void) · 302 unmodified lines | |||
| 303 | */ | 303 | */ |
| 304 | #define kunit_test_init_section_suites(__suites...) \ | 304 | #define kunit_test_init_section_suites(__suites...) \ |
| 305 | __kunit_test_suites(CONCATENATE(__UNIQUE_ID(array), _probe), \ | 305 | __kunit_test_suites(CONCATENATE(__UNIQUE_ID(array), _probe), \ |
| 306 | CONCATENATE(__UNIQUE_ID(suites), _probe), \ | ||
| 307 | ##__suites) | 306 | ##__suites) |
| 308 | 307 | ||
| 309 | #define kunit_test_init_section_suite(suite) \ | 308 | #define kunit_test_init_section_suite(suite) \ |
| @@ -683,8 +682,9 @@ do { \ · 373 unmodified lines | |||
| 683 | .right_text = #right, \ | 682 | .right_text = #right, \ |
| 684 | }; \ | 683 | }; \ |
| 685 | \ | 684 | \ |
| 686 | if (likely(memcmp(__left, __right, __size) op 0)) \ | 685 | if (likely(__left && __right)) \ |
| 687 | break; \ | 686 | if (likely(memcmp(__left, __right, __size) op 0)) \ |
| 687 | break; \ | ||
| 688 | \ | 688 | \ |
| 689 | _KUNIT_FAILED(test, \ | 689 | _KUNIT_FAILED(test, \ |
| 690 | assert_type, \ | 690 | assert_type, \ |