Skip to contentSkip to conversation

kunit: fix kunit_test_init_section_suites(...)

PATCH In review David Gow 2 participants 2 messages Jan 31, 2023

Subsystems (2)
lore
Share & tools
lore

David Gow

author
#0 lore raw

PATCH 1/1 kunit: fix kunit_test_init_section_suites(...)

From: Brendan Higgins <[email protected]>

Looks like kunit_test_init_section_suites(...) was messed up in a merge conflict. This fixes it.

kunit_test_init_section_suites(...) was not updated to avoid the extra level of indirection when .kunit_test_suites was flattened. Given no-one was actively using it, this went unnoticed for a long period of time.

Fixes e5857d396f35 ("kunit: flatten kunit_suite*** to kunit_suite** in .kunit_test_suites")
---
 include/kunit/test.h | 1 -
 1 file changed, 1 deletion(-)
include/kunit/test.h +0 -1
index 87ea90576b50..716deaeef3dd 100644
@@ -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)	\
Signature · 1 line
2.39.1.456.gfc5497dd1b-goog
Tested-by on v1 1/1
#1 lore raw
Quoted 30 lines · David Gow

From: Brendan Higgins <[email protected]>

Looks like kunit_test_init_section_suites(...) was messed up in a merge conflict. This fixes it.

kunit_test_init_section_suites(...) was not updated to avoid the extra level of indirection when .kunit_test_suites was flattened. Given no-one was actively using it, this went unnoticed for a long period of time.

Fixes e5857d396f35 ("kunit: flatten kunit_suite*** to kunit_suite** in

.kunit_test_suites")

---
 include/kunit/test.h | 1 -
 1 file changed, 1 deletion(-)
include/kunit/test.h +0 -2
index 87ea90576b50..716deaeef3dd 100644
@@ -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)	\
--
Quoted 3 lines

2.39.1.456.gfc5497dd1b-goog

Thanks!