diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-02-03 00:08:18 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-02-03 00:08:18 +0300 |
commit | e7368fd30165ced757d64da48e2091c83815ce5c (patch) | |
tree | 4b74274d723578e0b43816f6e47a7f2ec0ba1127 /include | |
parent | 42c78a5b29c47ad913993bcf845bfc39e2ed8c8b (diff) | |
parent | 254c71374a70051a043676b67ba4f7ad392b5fe6 (diff) | |
download | linux-e7368fd30165ced757d64da48e2091c83815ce5c.tar.xz |
Merge tag 'linux-kselftest-kunit-fixes-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
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()
Diffstat (limited to 'include')
-rw-r--r-- | include/kunit/test.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/kunit/test.h b/include/kunit/test.h index 87ea90576b50..08d3559dd703 100644 --- a/include/kunit/test.h +++ b/include/kunit/test.h @@ -303,7 +303,6 @@ static inline int kunit_run_all_tests(void) */ #define kunit_test_init_section_suites(__suites...) \ __kunit_test_suites(CONCATENATE(__UNIQUE_ID(array), _probe), \ - CONCATENATE(__UNIQUE_ID(suites), _probe), \ ##__suites) #define kunit_test_init_section_suite(suite) \ @@ -683,8 +682,9 @@ do { \ .right_text = #right, \ }; \ \ - if (likely(memcmp(__left, __right, __size) op 0)) \ - break; \ + if (likely(__left && __right)) \ + if (likely(memcmp(__left, __right, __size) op 0)) \ + break; \ \ _KUNIT_FAILED(test, \ assert_type, \ |