Lines Matching full:test

3  * Base unit test (KUnit) API.
55 * enum kunit_status - Type of result for a test or test suite
56 * @KUNIT_SUCCESS: Denotes the test suite has not failed nor been skipped
57 * @KUNIT_FAILURE: Denotes the test has failed.
58 * @KUNIT_SKIPPED: Denotes the test has been skipped.
83 /* Holds attributes for each test case and suite */
89 * struct kunit_case - represents an individual test case.
91 * @run_case: the function representing the actual test case.
92 * @name: the name of the test case.
94 * @attr: the attributes associated with the test
96 * A test case is a function with the signature,
99 * KUNIT_ASSERT_TRUE()) about code under test. Each test case is associated
103 * A test case should be static and should only be created with the
104 * KUNIT_CASE() macro; additionally, every array of test cases should be
105 * terminated with an empty test case.
111 * void add_test_basic(struct kunit *test)
113 * KUNIT_EXPECT_EQ(test, 1, add(1, 0));
114 * KUNIT_EXPECT_EQ(test, 2, add(1, 1));
115 * KUNIT_EXPECT_EQ(test, 0, add(-1, 1));
116 * KUNIT_EXPECT_EQ(test, INT_MAX, add(0, INT_MAX));
117 * KUNIT_EXPECT_EQ(test, -1, add(INT_MAX, INT_MIN));
127 void (*run_case)(struct kunit *test);
153 * @test_name: a reference to a test case function.
155 * Takes a symbol for a function representing a test case and creates a
167 * @test_name: a reference to a test case function.
169 * test attributes
179 * @test_name: a reference to a test case function.
189 * @test_name: a reference to a test case function.
211 * @test_name: a reference to a test case function.
214 * test attributes
224 * @name: the name of the test. Purely informational.
225 * @suite_init: called once per test suite before the test cases.
226 * @suite_exit: called once per test suite after all test cases.
227 * @init: called before every test case.
228 * @exit: called after every test case.
229 * @test_cases: a null terminated array of test cases.
230 * @attr: the attributes associated with the test suite
233 * @init is called before every test case and @exit is called after every
234 * test case, similar to the notion of a *test fixture* or a *test class*
247 int (*init)(struct kunit *test);
248 void (*exit)(struct kunit *test);
267 * struct kunit - represents a running instance of a test.
272 * Used to store information about the current context under which the test
275 * used by the test writer to store arbitrary data.
284 /* param_value is the current parameter value for a test case. */
290 * test case; thus, it is safe to update this across multiple
292 * be read after the test case finishes once all threads associated
293 * with the test case have terminated.
295 spinlock_t lock; /* Guards all mutable test state. */
299 * new resources) from any thread associated with a test case, we must
305 /* Saves the last seen test. Useful to help with faults. */
309 static inline void kunit_set_failure(struct kunit *test) in kunit_set_failure() argument
311 WRITE_ONCE(test->status, KUNIT_FAILURE); in kunit_set_failure()
321 void kunit_init_test(struct kunit *test, const char *name, struct string_stream *log);
369 * Registers @suites with the test framework.
405 * Also, do not mark the suite or test case structs with __initdata because
421 * kunit_kmalloc_array() - Like kmalloc_array() except the allocation is *test managed*.
422 * @test: The test context object.
427 * Just like `kmalloc_array(...)`, except the allocation is managed by the test case
428 * and is automatically cleaned up after the test case concludes. See kunit_add_action()
434 void *kunit_kmalloc_array(struct kunit *test, size_t n, size_t size, gfp_t gfp);
437 * kunit_kmalloc() - Like kmalloc() except the allocation is *test managed*.
438 * @test: The test context object.
447 static inline void *kunit_kmalloc(struct kunit *test, size_t size, gfp_t gfp) in kunit_kmalloc() argument
449 return kunit_kmalloc_array(test, 1, size, gfp); in kunit_kmalloc()
454 * @test: The test case to which the resource belongs.
457 void kunit_kfree(struct kunit *test, const void *ptr);
461 * @test: The test context object.
467 static inline void *kunit_kzalloc(struct kunit *test, size_t size, gfp_t gfp) in kunit_kzalloc() argument
469 return kunit_kmalloc(test, size, gfp | __GFP_ZERO); in kunit_kzalloc()
474 * @test: The test context object.
481 static inline void *kunit_kcalloc(struct kunit *test, size_t n, size_t size, gfp_t gfp) in kunit_kcalloc() argument
483 return kunit_kmalloc_array(test, n, size, gfp | __GFP_ZERO); in kunit_kcalloc()
488 * kunit_kfree_const() - conditionally free test managed memory
489 * @test: The test context object.
495 void kunit_kfree_const(struct kunit *test, const void *x);
498 * kunit_kstrdup() - Duplicates a string into a test managed allocation.
500 * @test: The test context object.
506 static inline char *kunit_kstrdup(struct kunit *test, const char *str, gfp_t gfp) in kunit_kstrdup() argument
515 buf = kunit_kmalloc(test, len, gfp); in kunit_kstrdup()
522 * kunit_kstrdup_const() - Conditionally duplicates a string into a test managed allocation.
524 * @test: The test context object.
532 const char *kunit_kstrdup_const(struct kunit *test, const char *str, gfp_t gfp);
536 * @test: The test context object.
546 unsigned long kunit_vm_mmap(struct kunit *test, struct file *file,
551 void kunit_cleanup(struct kunit *test);
558 * @test_or_suite: The test context object.
561 * Marks the test as skipped. @fmt is given output as the test status
562 * comment, typically the reason the test was skipped.
564 * Test execution continues after kunit_mark_skipped() is called.
577 * @test_or_suite: The test context object.
580 * Skips the test. @fmt is given output as the test status
581 * comment, typically the reason the test was skipped.
583 * Test execution is halted after kunit_skip() is called.
592 * printk and log to per-test or per-suite log buffer. Logging only done
602 #define kunit_printk(lvl, test, fmt, ...) \ argument
603 kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt, \
604 (test)->name, ##__VA_ARGS__)
607 * kunit_info() - Prints an INFO level message associated with @test.
609 * @test: The test context object.
612 * Prints an info level message associated with the test suite being run.
615 #define kunit_info(test, fmt, ...) \ argument
616 kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
619 * kunit_warn() - Prints a WARN level message associated with @test.
621 * @test: The test context object.
626 #define kunit_warn(test, fmt, ...) \ argument
627 kunit_printk(KERN_WARNING, test, fmt, ##__VA_ARGS__)
630 * kunit_err() - Prints an ERROR level message associated with @test.
632 * @test: The test context object.
637 #define kunit_err(test, fmt, ...) \ argument
638 kunit_printk(KERN_ERR, test, fmt, ##__VA_ARGS__)
644 #define _KUNIT_SAVE_LOC(test) do { \ argument
645 WRITE_ONCE(test->last_seen.file, __FILE__); \
646 WRITE_ONCE(test->last_seen.line, __LINE__); \
651 * @test: The test context object.
657 #define KUNIT_SUCCEED(test) _KUNIT_SAVE_LOC(test) argument
659 void __noreturn __kunit_abort(struct kunit *test);
661 void __printf(6, 7) __kunit_do_failed_assertion(struct kunit *test,
668 #define _KUNIT_FAILED(test, assert_type, assert_class, assert_format, INITIALIZER, fmt, ...) do { \ argument
671 __kunit_do_failed_assertion(test, \
679 __kunit_abort(test); \
683 #define KUNIT_FAIL_ASSERTION(test, assert_type, fmt, ...) do { \ argument
684 _KUNIT_SAVE_LOC(test); \
685 _KUNIT_FAILED(test, \
695 * KUNIT_FAIL() - Always causes a test to fail when evaluated.
696 * @test: The test context object.
702 * always causes the test case to fail when evaluated. See KUNIT_EXPECT_TRUE()
705 #define KUNIT_FAIL(test, fmt, ...) \ argument
706 KUNIT_FAIL_ASSERTION(test, \
714 #define KUNIT_UNARY_ASSERTION(test, \ argument
721 _KUNIT_SAVE_LOC(test); \
725 _KUNIT_FAILED(test, \
735 #define KUNIT_TRUE_MSG_ASSERTION(test, assert_type, condition, fmt, ...) \ argument
736 KUNIT_UNARY_ASSERTION(test, \
743 #define KUNIT_FALSE_MSG_ASSERTION(test, assert_type, condition, fmt, ...) \ argument
744 KUNIT_UNARY_ASSERTION(test, \
765 #define KUNIT_BASE_BINARY_ASSERTION(test, \ argument
783 _KUNIT_SAVE_LOC(test); \
787 _KUNIT_FAILED(test, \
798 #define KUNIT_BINARY_INT_ASSERTION(test, \ argument
805 KUNIT_BASE_BINARY_ASSERTION(test, \
813 #define KUNIT_BINARY_PTR_ASSERTION(test, \ argument
820 KUNIT_BASE_BINARY_ASSERTION(test, \
828 #define KUNIT_BINARY_STR_ASSERTION(test, \ argument
844 _KUNIT_SAVE_LOC(test); \
849 _KUNIT_FAILED(test, \
860 #define KUNIT_MEM_ASSERTION(test, \ argument
878 _KUNIT_SAVE_LOC(test); \
883 _KUNIT_FAILED(test, \
895 #define KUNIT_PTR_NOT_ERR_OR_NULL_MSG_ASSERTION(test, \ argument
903 _KUNIT_SAVE_LOC(test); \
907 _KUNIT_FAILED(test, \
917 * KUNIT_EXPECT_TRUE() - Causes a test failure when the expression is not true.
918 * @test: The test context object.
919 * @condition: an arbitrary boolean expression. The test fails when this does
922 * This and expectations of the form `KUNIT_EXPECT_*` will cause the test case
924 * the test case from continuing to run; this is otherwise known as an
927 #define KUNIT_EXPECT_TRUE(test, condition) \ argument
928 KUNIT_EXPECT_TRUE_MSG(test, condition, NULL)
930 #define KUNIT_EXPECT_TRUE_MSG(test, condition, fmt, ...) \ argument
931 KUNIT_TRUE_MSG_ASSERTION(test, \
938 * KUNIT_EXPECT_FALSE() - Makes a test failure when the expression is not false.
939 * @test: The test context object.
940 * @condition: an arbitrary boolean expression. The test fails when this does
946 #define KUNIT_EXPECT_FALSE(test, condition) \ argument
947 KUNIT_EXPECT_FALSE_MSG(test, condition, NULL)
949 #define KUNIT_EXPECT_FALSE_MSG(test, condition, fmt, ...) \ argument
950 KUNIT_FALSE_MSG_ASSERTION(test, \
958 * @test: The test context object.
964 * KUNIT_EXPECT_TRUE(@test, (@left) == (@right)). See KUNIT_EXPECT_TRUE() for
967 #define KUNIT_EXPECT_EQ(test, left, right) \ argument
968 KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
970 #define KUNIT_EXPECT_EQ_MSG(test, left, right, fmt, ...) \ argument
971 KUNIT_BINARY_INT_ASSERTION(test, \
979 * @test: The test context object.
985 * KUNIT_EXPECT_TRUE(@test, (@left) == (@right)). See KUNIT_EXPECT_TRUE() for
988 #define KUNIT_EXPECT_PTR_EQ(test, left, right) \ argument
989 KUNIT_EXPECT_PTR_EQ_MSG(test, left, right, NULL)
991 #define KUNIT_EXPECT_PTR_EQ_MSG(test, left, right, fmt, ...) \ argument
992 KUNIT_BINARY_PTR_ASSERTION(test, \
1000 * @test: The test context object.
1006 * KUNIT_EXPECT_TRUE(@test, (@left) != (@right)). See KUNIT_EXPECT_TRUE() for
1009 #define KUNIT_EXPECT_NE(test, left, right) \ argument
1010 KUNIT_EXPECT_NE_MSG(test, left, right, NULL)
1012 #define KUNIT_EXPECT_NE_MSG(test, left, right, fmt, ...) \ argument
1013 KUNIT_BINARY_INT_ASSERTION(test, \
1021 * @test: The test context object.
1027 * KUNIT_EXPECT_TRUE(@test, (@left) != (@right)). See KUNIT_EXPECT_TRUE() for
1030 #define KUNIT_EXPECT_PTR_NE(test, left, right) \ argument
1031 KUNIT_EXPECT_PTR_NE_MSG(test, left, right, NULL)
1033 #define KUNIT_EXPECT_PTR_NE_MSG(test, left, right, fmt, ...) \ argument
1034 KUNIT_BINARY_PTR_ASSERTION(test, \
1042 * @test: The test context object.
1048 * KUNIT_EXPECT_TRUE(@test, (@left) < (@right)). See KUNIT_EXPECT_TRUE() for
1051 #define KUNIT_EXPECT_LT(test, left, right) \ argument
1052 KUNIT_EXPECT_LT_MSG(test, left, right, NULL)
1054 #define KUNIT_EXPECT_LT_MSG(test, left, right, fmt, ...) \ argument
1055 KUNIT_BINARY_INT_ASSERTION(test, \
1063 * @test: The test context object.
1069 * to KUNIT_EXPECT_TRUE(@test, (@left) <= (@right)). See KUNIT_EXPECT_TRUE() for
1072 #define KUNIT_EXPECT_LE(test, left, right) \ argument
1073 KUNIT_EXPECT_LE_MSG(test, left, right, NULL)
1075 #define KUNIT_EXPECT_LE_MSG(test, left, right, fmt, ...) \ argument
1076 KUNIT_BINARY_INT_ASSERTION(test, \
1084 * @test: The test context object.
1090 * KUNIT_EXPECT_TRUE(@test, (@left) > (@right)). See KUNIT_EXPECT_TRUE() for
1093 #define KUNIT_EXPECT_GT(test, left, right) \ argument
1094 KUNIT_EXPECT_GT_MSG(test, left, right, NULL)
1096 #define KUNIT_EXPECT_GT_MSG(test, left, right, fmt, ...) \ argument
1097 KUNIT_BINARY_INT_ASSERTION(test, \
1105 * @test: The test context object.
1111 * KUNIT_EXPECT_TRUE(@test, (@left) >= (@right)). See KUNIT_EXPECT_TRUE() for
1114 #define KUNIT_EXPECT_GE(test, left, right) \ argument
1115 KUNIT_EXPECT_GE_MSG(test, left, right, NULL)
1117 #define KUNIT_EXPECT_GE_MSG(test, left, right, fmt, ...) \ argument
1118 KUNIT_BINARY_INT_ASSERTION(test, \
1126 * @test: The test context object.
1132 * KUNIT_EXPECT_TRUE(@test, !strcmp((@left), (@right))). See KUNIT_EXPECT_TRUE()
1135 #define KUNIT_EXPECT_STREQ(test, left, right) \ argument
1136 KUNIT_EXPECT_STREQ_MSG(test, left, right, NULL)
1138 #define KUNIT_EXPECT_STREQ_MSG(test, left, right, fmt, ...) \ argument
1139 KUNIT_BINARY_STR_ASSERTION(test, \
1147 * @test: The test context object.
1153 * KUNIT_EXPECT_TRUE(@test, strcmp((@left), (@right))). See KUNIT_EXPECT_TRUE()
1156 #define KUNIT_EXPECT_STRNEQ(test, left, right) \ argument
1157 KUNIT_EXPECT_STRNEQ_MSG(test, left, right, NULL)
1159 #define KUNIT_EXPECT_STRNEQ_MSG(test, left, right, fmt, ...) \ argument
1160 KUNIT_BINARY_STR_ASSERTION(test, \
1168 * @test: The test context object.
1175 * KUNIT_EXPECT_TRUE(@test, !memcmp((@left), (@right), (@size))). See
1182 #define KUNIT_EXPECT_MEMEQ(test, left, right, size) \ argument
1183 KUNIT_EXPECT_MEMEQ_MSG(test, left, right, size, NULL)
1185 #define KUNIT_EXPECT_MEMEQ_MSG(test, left, right, size, fmt, ...) \ argument
1186 KUNIT_MEM_ASSERTION(test, \
1195 * @test: The test context object.
1202 * KUNIT_EXPECT_TRUE(@test, memcmp((@left), (@right), (@size))). See
1209 #define KUNIT_EXPECT_MEMNEQ(test, left, right, size) \ argument
1210 KUNIT_EXPECT_MEMNEQ_MSG(test, left, right, size, NULL)
1212 #define KUNIT_EXPECT_MEMNEQ_MSG(test, left, right, size, fmt, ...) \ argument
1213 KUNIT_MEM_ASSERTION(test, \
1222 * @test: The test context object.
1226 * semantically equivalent to KUNIT_EXPECT_PTR_EQ(@test, ptr, NULL).
1229 #define KUNIT_EXPECT_NULL(test, ptr) \ argument
1230 KUNIT_EXPECT_NULL_MSG(test, \
1234 #define KUNIT_EXPECT_NULL_MSG(test, ptr, fmt, ...) \ argument
1235 KUNIT_BINARY_PTR_ASSERTION(test, \
1243 * @test: The test context object.
1247 * is semantically equivalent to KUNIT_EXPECT_PTR_NE(@test, ptr, NULL).
1250 #define KUNIT_EXPECT_NOT_NULL(test, ptr) \ argument
1251 KUNIT_EXPECT_NOT_NULL_MSG(test, \
1255 #define KUNIT_EXPECT_NOT_NULL_MSG(test, ptr, fmt, ...) \ argument
1256 KUNIT_BINARY_PTR_ASSERTION(test, \
1264 * @test: The test context object.
1269 * KUNIT_EXPECT_TRUE(@test, !IS_ERR_OR_NULL(@ptr)). See KUNIT_EXPECT_TRUE() for
1272 #define KUNIT_EXPECT_NOT_ERR_OR_NULL(test, ptr) \ argument
1273 KUNIT_EXPECT_NOT_ERR_OR_NULL_MSG(test, ptr, NULL)
1275 #define KUNIT_EXPECT_NOT_ERR_OR_NULL_MSG(test, ptr, fmt, ...) \ argument
1276 KUNIT_PTR_NOT_ERR_OR_NULL_MSG_ASSERTION(test, \
1283 * KUNIT_FAIL_AND_ABORT() - Always causes a test to fail and abort when evaluated.
1284 * @test: The test context object.
1290 * always causes the test case to fail and abort when evaluated.
1293 #define KUNIT_FAIL_AND_ABORT(test, fmt, ...) \ argument
1294 KUNIT_FAIL_ASSERTION(test, KUNIT_ASSERTION, fmt, ##__VA_ARGS__)
1298 * @test: The test context object.
1299 * @condition: an arbitrary boolean expression. The test fails and aborts when
1302 * This and assertions of the form `KUNIT_ASSERT_*` will cause the test case to
1304 * an expectation failure, it will prevent the test case from continuing to run;
1307 #define KUNIT_ASSERT_TRUE(test, condition) \ argument
1308 KUNIT_ASSERT_TRUE_MSG(test, condition, NULL)
1310 #define KUNIT_ASSERT_TRUE_MSG(test, condition, fmt, ...) \ argument
1311 KUNIT_TRUE_MSG_ASSERTION(test, \
1319 * @test: The test context object.
1326 #define KUNIT_ASSERT_FALSE(test, condition) \ argument
1327 KUNIT_ASSERT_FALSE_MSG(test, condition, NULL)
1329 #define KUNIT_ASSERT_FALSE_MSG(test, condition, fmt, ...) \ argument
1330 KUNIT_FALSE_MSG_ASSERTION(test, \
1338 * @test: The test context object.
1346 #define KUNIT_ASSERT_EQ(test, left, right) \ argument
1347 KUNIT_ASSERT_EQ_MSG(test, left, right, NULL)
1349 #define KUNIT_ASSERT_EQ_MSG(test, left, right, fmt, ...) \ argument
1350 KUNIT_BINARY_INT_ASSERTION(test, \
1358 * @test: The test context object.
1366 #define KUNIT_ASSERT_PTR_EQ(test, left, right) \ argument
1367 KUNIT_ASSERT_PTR_EQ_MSG(test, left, right, NULL)
1369 #define KUNIT_ASSERT_PTR_EQ_MSG(test, left, right, fmt, ...) \ argument
1370 KUNIT_BINARY_PTR_ASSERTION(test, \
1378 * @test: The test context object.
1386 #define KUNIT_ASSERT_NE(test, left, right) \ argument
1387 KUNIT_ASSERT_NE_MSG(test, left, right, NULL)
1389 #define KUNIT_ASSERT_NE_MSG(test, left, right, fmt, ...) \ argument
1390 KUNIT_BINARY_INT_ASSERTION(test, \
1399 * @test: The test context object.
1407 #define KUNIT_ASSERT_PTR_NE(test, left, right) \ argument
1408 KUNIT_ASSERT_PTR_NE_MSG(test, left, right, NULL)
1410 #define KUNIT_ASSERT_PTR_NE_MSG(test, left, right, fmt, ...) \ argument
1411 KUNIT_BINARY_PTR_ASSERTION(test, \
1418 * @test: The test context object.
1427 #define KUNIT_ASSERT_LT(test, left, right) \ argument
1428 KUNIT_ASSERT_LT_MSG(test, left, right, NULL)
1430 #define KUNIT_ASSERT_LT_MSG(test, left, right, fmt, ...) \ argument
1431 KUNIT_BINARY_INT_ASSERTION(test, \
1438 * @test: The test context object.
1447 #define KUNIT_ASSERT_LE(test, left, right) \ argument
1448 KUNIT_ASSERT_LE_MSG(test, left, right, NULL)
1450 #define KUNIT_ASSERT_LE_MSG(test, left, right, fmt, ...) \ argument
1451 KUNIT_BINARY_INT_ASSERTION(test, \
1459 * @test: The test context object.
1468 #define KUNIT_ASSERT_GT(test, left, right) \ argument
1469 KUNIT_ASSERT_GT_MSG(test, left, right, NULL)
1471 #define KUNIT_ASSERT_GT_MSG(test, left, right, fmt, ...) \ argument
1472 KUNIT_BINARY_INT_ASSERTION(test, \
1480 * @test: The test context object.
1489 #define KUNIT_ASSERT_GE(test, left, right) \ argument
1490 KUNIT_ASSERT_GE_MSG(test, left, right, NULL)
1492 #define KUNIT_ASSERT_GE_MSG(test, left, right, fmt, ...) \ argument
1493 KUNIT_BINARY_INT_ASSERTION(test, \
1501 * @test: The test context object.
1509 #define KUNIT_ASSERT_STREQ(test, left, right) \ argument
1510 KUNIT_ASSERT_STREQ_MSG(test, left, right, NULL)
1512 #define KUNIT_ASSERT_STREQ_MSG(test, left, right, fmt, ...) \ argument
1513 KUNIT_BINARY_STR_ASSERTION(test, \
1521 * @test: The test context object.
1527 * KUNIT_ASSERT_TRUE(@test, strcmp((@left), (@right))). See KUNIT_ASSERT_TRUE()
1530 #define KUNIT_ASSERT_STRNEQ(test, left, right) \ argument
1531 KUNIT_ASSERT_STRNEQ_MSG(test, left, right, NULL)
1533 #define KUNIT_ASSERT_STRNEQ_MSG(test, left, right, fmt, ...) \ argument
1534 KUNIT_BINARY_STR_ASSERTION(test, \
1542 * @test: The test context object.
1549 * KUNIT_ASSERT_TRUE(@test, !memcmp((@left), (@right), (@size))). See
1556 #define KUNIT_ASSERT_MEMEQ(test, left, right, size) \ argument
1557 KUNIT_ASSERT_MEMEQ_MSG(test, left, right, size, NULL)
1559 #define KUNIT_ASSERT_MEMEQ_MSG(test, left, right, size, fmt, ...) \ argument
1560 KUNIT_MEM_ASSERTION(test, \
1569 * @test: The test context object.
1576 * KUNIT_ASSERT_TRUE(@test, memcmp((@left), (@right), (@size))). See
1583 #define KUNIT_ASSERT_MEMNEQ(test, left, right, size) \ argument
1584 KUNIT_ASSERT_MEMNEQ_MSG(test, left, right, size, NULL)
1586 #define KUNIT_ASSERT_MEMNEQ_MSG(test, left, right, size, fmt, ...) \ argument
1587 KUNIT_MEM_ASSERTION(test, \
1596 * @test: The test context object.
1603 #define KUNIT_ASSERT_NULL(test, ptr) \ argument
1604 KUNIT_ASSERT_NULL_MSG(test, \
1608 #define KUNIT_ASSERT_NULL_MSG(test, ptr, fmt, ...) \ argument
1609 KUNIT_BINARY_PTR_ASSERTION(test, \
1617 * @test: The test context object.
1624 #define KUNIT_ASSERT_NOT_NULL(test, ptr) \ argument
1625 KUNIT_ASSERT_NOT_NULL_MSG(test, \
1629 #define KUNIT_ASSERT_NOT_NULL_MSG(test, ptr, fmt, ...) \ argument
1630 KUNIT_BINARY_PTR_ASSERTION(test, \
1638 * @test: The test context object.
1646 #define KUNIT_ASSERT_NOT_ERR_OR_NULL(test, ptr) \ argument
1647 KUNIT_ASSERT_NOT_ERR_OR_NULL_MSG(test, ptr, NULL)
1649 #define KUNIT_ASSERT_NOT_ERR_OR_NULL_MSG(test, ptr, fmt, ...) \ argument
1650 KUNIT_PTR_NOT_ERR_OR_NULL_MSG_ASSERTION(test, \
1657 * KUNIT_ARRAY_PARAM() - Define test parameter generator from an array.
1658 * @name: prefix for the test parameter generator function.
1659 * @array: array of test parameters.
1678 * KUNIT_ARRAY_PARAM_DESC() - Define test parameter generator from an array.
1679 * @name: prefix for the test parameter generator function.
1680 * @array: array of test parameters.