kunit: alpha: transition: fix build breakage in example and boilerplate
Commit 53393b9ba8cf ("kunit: alpha: transition: make kunit_test_suites()
take pointers") made kunit_test_suites() work more like how upstream
behaves.
But it did not include a change to update the example test and the
boilerplate generation (kunit.py new) to add "&".
Fix that.
Tested the example test as well this time and it works:
> ==============================
> [PASSED] example:example_simple_test
> [PASSED] example:example_mock_test
> ==============================
Fixes: 53393b9ba8cf ("kunit: alpha: transition: make kunit_test_suites() take pointers")
Change-Id: I0c882c00f7d263aa9e186971c9c577544c1668f5
diff --git a/test/example-test.c b/test/example-test.c
index 92c739a..ffded3b 100644
--- a/test/example-test.c
+++ b/test/example-test.c
@@ -73,4 +73,4 @@
.init = example_test_init,
.test_cases = example_test_cases,
};
-kunit_test_suites(example_test_module);
+kunit_test_suites(&example_test_module);
diff --git a/tools/testing/kunit/test_template.c b/tools/testing/kunit/test_template.c
index 6530334..1f1fdd9 100644
--- a/tools/testing/kunit/test_template.c
+++ b/tools/testing/kunit/test_template.c
@@ -90,4 +90,4 @@
* This registers the above test module telling KUnit that this is a suite of
* tests that need to be run.
*/
-kunit_test_suites(${test_prefix}_module);
+kunit_test_suites(&${test_prefix}_module);