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()
320 void kunit_init_test(struct kunit *test, const char *name, struct string_stream *log);
367 * Registers @suites with the test framework.
403 * Also, do not mark the suite or test case structs with __initdata because
419 * kunit_kmalloc_array() - Like kmalloc_array() except the allocation is *test managed*.
420 * @test: The test context object.
425 * Just like `kmalloc_array(...)`, except the allocation is managed by the test case
426 * and is automatically cleaned up after the test case concludes. See kunit_add_action()
432 void *kunit_kmalloc_array(struct kunit *test, size_t n, size_t size, gfp_t gfp);
435 * kunit_kmalloc() - Like kmalloc() except the allocation is *test managed*.
436 * @test: The test context object.
445 static inline void *kunit_kmalloc(struct kunit *test, size_t size, gfp_t gfp) in kunit_kmalloc() argument
447 return kunit_kmalloc_array(test, 1, size, gfp); in kunit_kmalloc()
452 * @test: The test case to which the resource belongs.
455 void kunit_kfree(struct kunit *test, const void *ptr);
459 * @test: The test context object.
465 static inline void *kunit_kzalloc(struct kunit *test, size_t size, gfp_t gfp) in kunit_kzalloc() argument
467 return kunit_kmalloc(test, size, gfp | __GFP_ZERO); in kunit_kzalloc()
472 * @test: The test context object.
479 static inline void *kunit_kcalloc(struct kunit *test, size_t n, size_t size, gfp_t gfp) in kunit_kcalloc() argument
481 return kunit_kmalloc_array(test, n, size, gfp | __GFP_ZERO); in kunit_kcalloc()
486 * kunit_kfree_const() - conditionally free test managed memory
487 * @test: The test context object.
493 void kunit_kfree_const(struct kunit *test, const void *x);
496 * kunit_kstrdup() - Duplicates a string into a test managed allocation.
498 * @test: The test context object.
504 static inline char *kunit_kstrdup(struct kunit *test, const char *str, gfp_t gfp) in kunit_kstrdup() argument
513 buf = kunit_kmalloc(test, len, gfp); in kunit_kstrdup()
520 * kunit_kstrdup_const() - Conditionally duplicates a string into a test managed allocation.
522 * @test: The test context object.
530 const char *kunit_kstrdup_const(struct kunit *test, const char *str, gfp_t gfp);
534 * @test: The test context object.
544 unsigned long kunit_vm_mmap(struct kunit *test, struct file *file,
549 void kunit_cleanup(struct kunit *test);
556 * @test_or_suite: The test context object.
559 * Marks the test as skipped. @fmt is given output as the test status
560 * comment, typically the reason the test was skipped.
562 * Test execution continues after kunit_mark_skipped() is called.
575 * @test_or_suite: The test context object.
578 * Skips the test. @fmt is given output as the test status
579 * comment, typically the reason the test was skipped.
581 * Test execution is halted after kunit_skip() is called.
590 * printk and log to per-test or per-suite log buffer. Logging only done
600 #define kunit_printk(lvl, test, fmt, ...) \ argument
601 kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt, \
602 (test)->name, ##__VA_ARGS__)
605 * kunit_info() - Prints an INFO level message associated with @test.
607 * @test: The test context object.
610 * Prints an info level message associated with the test suite being run.
613 #define kunit_info(test, fmt, ...) \ argument
614 kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
617 * kunit_warn() - Prints a WARN level message associated with @test.
619 * @test: The test context object.
624 #define kunit_warn(test, fmt, ...) \ argument
625 kunit_printk(KERN_WARNING, test, fmt, ##__VA_ARGS__)
628 * kunit_err() - Prints an ERROR level message associated with @test.
630 * @test: The test context object.
635 #define kunit_err(test, fmt, ...) \ argument
636 kunit_printk(KERN_ERR, test, fmt, ##__VA_ARGS__)
642 #define _KUNIT_SAVE_LOC(test) do { \ argument
643 WRITE_ONCE(test->last_seen.file, __FILE__); \
644 WRITE_ONCE(test->last_seen.line, __LINE__); \
649 * @test: The test context object.
655 #define KUNIT_SUCCEED(test) _KUNIT_SAVE_LOC(test) argument
657 void __noreturn __kunit_abort(struct kunit *test);
659 void __printf(6, 7) __kunit_do_failed_assertion(struct kunit *test,
666 #define _KUNIT_FAILED(test, assert_type, assert_class, assert_format, INITIALIZER, fmt, ...) do { \ argument
669 __kunit_do_failed_assertion(test, \
677 __kunit_abort(test); \
681 #define KUNIT_FAIL_ASSERTION(test, assert_type, fmt, ...) do { \ argument
682 _KUNIT_SAVE_LOC(test); \
683 _KUNIT_FAILED(test, \
693 * KUNIT_FAIL() - Always causes a test to fail when evaluated.
694 * @test: The test context object.
700 * always causes the test case to fail when evaluated. See KUNIT_EXPECT_TRUE()
703 #define KUNIT_FAIL(test, fmt, ...) \ argument
704 KUNIT_FAIL_ASSERTION(test, \
712 #define KUNIT_UNARY_ASSERTION(test, \ argument
719 _KUNIT_SAVE_LOC(test); \
723 _KUNIT_FAILED(test, \
733 #define KUNIT_TRUE_MSG_ASSERTION(test, assert_type, condition, fmt, ...) \ argument
734 KUNIT_UNARY_ASSERTION(test, \
741 #define KUNIT_FALSE_MSG_ASSERTION(test, assert_type, condition, fmt, ...) \ argument
742 KUNIT_UNARY_ASSERTION(test, \
763 #define KUNIT_BASE_BINARY_ASSERTION(test, \ argument
781 _KUNIT_SAVE_LOC(test); \
785 _KUNIT_FAILED(test, \
796 #define KUNIT_BINARY_INT_ASSERTION(test, \ argument
803 KUNIT_BASE_BINARY_ASSERTION(test, \
811 #define KUNIT_BINARY_PTR_ASSERTION(test, \ argument
818 KUNIT_BASE_BINARY_ASSERTION(test, \
826 #define KUNIT_BINARY_STR_ASSERTION(test, \ argument
842 _KUNIT_SAVE_LOC(test); \
847 _KUNIT_FAILED(test, \
858 #define KUNIT_MEM_ASSERTION(test, \ argument
876 _KUNIT_SAVE_LOC(test); \
881 _KUNIT_FAILED(test, \
893 #define KUNIT_PTR_NOT_ERR_OR_NULL_MSG_ASSERTION(test, \ argument
901 _KUNIT_SAVE_LOC(test); \
905 _KUNIT_FAILED(test, \
915 * KUNIT_EXPECT_TRUE() - Causes a test failure when the expression is not true.
916 * @test: The test context object.
917 * @condition: an arbitrary boolean expression. The test fails when this does
920 * This and expectations of the form `KUNIT_EXPECT_*` will cause the test case
922 * the test case from continuing to run; this is otherwise known as an
925 #define KUNIT_EXPECT_TRUE(test, condition) \ argument
926 KUNIT_EXPECT_TRUE_MSG(test, condition, NULL)
928 #define KUNIT_EXPECT_TRUE_MSG(test, condition, fmt, ...) \ argument
929 KUNIT_TRUE_MSG_ASSERTION(test, \
936 * KUNIT_EXPECT_FALSE() - Makes a test failure when the expression is not false.
937 * @test: The test context object.
938 * @condition: an arbitrary boolean expression. The test fails when this does
944 #define KUNIT_EXPECT_FALSE(test, condition) \ argument
945 KUNIT_EXPECT_FALSE_MSG(test, condition, NULL)
947 #define KUNIT_EXPECT_FALSE_MSG(test, condition, fmt, ...) \ argument
948 KUNIT_FALSE_MSG_ASSERTION(test, \
956 * @test: The test context object.
962 * KUNIT_EXPECT_TRUE(@test, (@left) == (@right)). See KUNIT_EXPECT_TRUE() for
965 #define KUNIT_EXPECT_EQ(test, left, right) \ argument
966 KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
968 #define KUNIT_EXPECT_EQ_MSG(test, left, right, fmt, ...) \ argument
969 KUNIT_BINARY_INT_ASSERTION(test, \
977 * @test: The test context object.
983 * KUNIT_EXPECT_TRUE(@test, (@left) == (@right)). See KUNIT_EXPECT_TRUE() for
986 #define KUNIT_EXPECT_PTR_EQ(test, left, right) \ argument
987 KUNIT_EXPECT_PTR_EQ_MSG(test, left, right, NULL)
989 #define KUNIT_EXPECT_PTR_EQ_MSG(test, left, right, fmt, ...) \ argument
990 KUNIT_BINARY_PTR_ASSERTION(test, \
998 * @test: The test context object.
1004 * KUNIT_EXPECT_TRUE(@test, (@left) != (@right)). See KUNIT_EXPECT_TRUE() for
1007 #define KUNIT_EXPECT_NE(test, left, right) \ argument
1008 KUNIT_EXPECT_NE_MSG(test, left, right, NULL)
1010 #define KUNIT_EXPECT_NE_MSG(test, left, right, fmt, ...) \ argument
1011 KUNIT_BINARY_INT_ASSERTION(test, \
1019 * @test: The test context object.
1025 * KUNIT_EXPECT_TRUE(@test, (@left) != (@right)). See KUNIT_EXPECT_TRUE() for
1028 #define KUNIT_EXPECT_PTR_NE(test, left, right) \ argument
1029 KUNIT_EXPECT_PTR_NE_MSG(test, left, right, NULL)
1031 #define KUNIT_EXPECT_PTR_NE_MSG(test, left, right, fmt, ...) \ argument
1032 KUNIT_BINARY_PTR_ASSERTION(test, \
1040 * @test: The test context object.
1046 * KUNIT_EXPECT_TRUE(@test, (@left) < (@right)). See KUNIT_EXPECT_TRUE() for
1049 #define KUNIT_EXPECT_LT(test, left, right) \ argument
1050 KUNIT_EXPECT_LT_MSG(test, left, right, NULL)
1052 #define KUNIT_EXPECT_LT_MSG(test, left, right, fmt, ...) \ argument
1053 KUNIT_BINARY_INT_ASSERTION(test, \
1061 * @test: The test context object.
1067 * to KUNIT_EXPECT_TRUE(@test, (@left) <= (@right)). See KUNIT_EXPECT_TRUE() for
1070 #define KUNIT_EXPECT_LE(test, left, right) \ argument
1071 KUNIT_EXPECT_LE_MSG(test, left, right, NULL)
1073 #define KUNIT_EXPECT_LE_MSG(test, left, right, fmt, ...) \ argument
1074 KUNIT_BINARY_INT_ASSERTION(test, \
1082 * @test: The test context object.
1088 * KUNIT_EXPECT_TRUE(@test, (@left) > (@right)). See KUNIT_EXPECT_TRUE() for
1091 #define KUNIT_EXPECT_GT(test, left, right) \ argument
1092 KUNIT_EXPECT_GT_MSG(test, left, right, NULL)
1094 #define KUNIT_EXPECT_GT_MSG(test, left, right, fmt, ...) \ argument
1095 KUNIT_BINARY_INT_ASSERTION(test, \
1103 * @test: The test context object.
1109 * KUNIT_EXPECT_TRUE(@test, (@left) >= (@right)). See KUNIT_EXPECT_TRUE() for
1112 #define KUNIT_EXPECT_GE(test, left, right) \ argument
1113 KUNIT_EXPECT_GE_MSG(test, left, right, NULL)
1115 #define KUNIT_EXPECT_GE_MSG(test, left, right, fmt, ...) \ argument
1116 KUNIT_BINARY_INT_ASSERTION(test, \
1124 * @test: The test context object.
1130 * KUNIT_EXPECT_TRUE(@test, !strcmp((@left), (@right))). See KUNIT_EXPECT_TRUE()
1133 #define KUNIT_EXPECT_STREQ(test, left, right) \ argument
1134 KUNIT_EXPECT_STREQ_MSG(test, left, right, NULL)
1136 #define KUNIT_EXPECT_STREQ_MSG(test, left, right, fmt, ...) \ argument
1137 KUNIT_BINARY_STR_ASSERTION(test, \
1145 * @test: The test context object.
1151 * KUNIT_EXPECT_TRUE(@test, strcmp((@left), (@right))). See KUNIT_EXPECT_TRUE()
1154 #define KUNIT_EXPECT_STRNEQ(test, left, right) \ argument
1155 KUNIT_EXPECT_STRNEQ_MSG(test, left, right, NULL)
1157 #define KUNIT_EXPECT_STRNEQ_MSG(test, left, right, fmt, ...) \ argument
1158 KUNIT_BINARY_STR_ASSERTION(test, \
1166 * @test: The test context object.
1173 * KUNIT_EXPECT_TRUE(@test, !memcmp((@left), (@right), (@size))). See
1180 #define KUNIT_EXPECT_MEMEQ(test, left, right, size) \ argument
1181 KUNIT_EXPECT_MEMEQ_MSG(test, left, right, size, NULL)
1183 #define KUNIT_EXPECT_MEMEQ_MSG(test, left, right, size, fmt, ...) \ argument
1184 KUNIT_MEM_ASSERTION(test, \
1193 * @test: The test context object.
1200 * KUNIT_EXPECT_TRUE(@test, memcmp((@left), (@right), (@size))). See
1207 #define KUNIT_EXPECT_MEMNEQ(test, left, right, size) \ argument
1208 KUNIT_EXPECT_MEMNEQ_MSG(test, left, right, size, NULL)
1210 #define KUNIT_EXPECT_MEMNEQ_MSG(test, left, right, size, fmt, ...) \ argument
1211 KUNIT_MEM_ASSERTION(test, \
1220 * @test: The test context object.
1224 * semantically equivalent to KUNIT_EXPECT_PTR_EQ(@test, ptr, NULL).
1227 #define KUNIT_EXPECT_NULL(test, ptr) \ argument
1228 KUNIT_EXPECT_NULL_MSG(test, \
1232 #define KUNIT_EXPECT_NULL_MSG(test, ptr, fmt, ...) \ argument
1233 KUNIT_BINARY_PTR_ASSERTION(test, \
1241 * @test: The test context object.
1245 * is semantically equivalent to KUNIT_EXPECT_PTR_NE(@test, ptr, NULL).
1248 #define KUNIT_EXPECT_NOT_NULL(test, ptr) \ argument
1249 KUNIT_EXPECT_NOT_NULL_MSG(test, \
1253 #define KUNIT_EXPECT_NOT_NULL_MSG(test, ptr, fmt, ...) \ argument
1254 KUNIT_BINARY_PTR_ASSERTION(test, \
1262 * @test: The test context object.
1267 * KUNIT_EXPECT_TRUE(@test, !IS_ERR_OR_NULL(@ptr)). See KUNIT_EXPECT_TRUE() for
1270 #define KUNIT_EXPECT_NOT_ERR_OR_NULL(test, ptr) \ argument
1271 KUNIT_EXPECT_NOT_ERR_OR_NULL_MSG(test, ptr, NULL)
1273 #define KUNIT_EXPECT_NOT_ERR_OR_NULL_MSG(test, ptr, fmt, ...) \ argument
1274 KUNIT_PTR_NOT_ERR_OR_NULL_MSG_ASSERTION(test, \
1281 * KUNIT_FAIL_AND_ABORT() - Always causes a test to fail and abort when evaluated.
1282 * @test: The test context object.
1288 * always causes the test case to fail and abort when evaluated.
1291 #define KUNIT_FAIL_AND_ABORT(test, fmt, ...) \ argument
1292 KUNIT_FAIL_ASSERTION(test, KUNIT_ASSERTION, fmt, ##__VA_ARGS__)
1296 * @test: The test context object.
1297 * @condition: an arbitrary boolean expression. The test fails and aborts when
1300 * This and assertions of the form `KUNIT_ASSERT_*` will cause the test case to
1302 * an expectation failure, it will prevent the test case from continuing to run;
1305 #define KUNIT_ASSERT_TRUE(test, condition) \ argument
1306 KUNIT_ASSERT_TRUE_MSG(test, condition, NULL)
1308 #define KUNIT_ASSERT_TRUE_MSG(test, condition, fmt, ...) \ argument
1309 KUNIT_TRUE_MSG_ASSERTION(test, \
1317 * @test: The test context object.
1324 #define KUNIT_ASSERT_FALSE(test, condition) \ argument
1325 KUNIT_ASSERT_FALSE_MSG(test, condition, NULL)
1327 #define KUNIT_ASSERT_FALSE_MSG(test, condition, fmt, ...) \ argument
1328 KUNIT_FALSE_MSG_ASSERTION(test, \
1336 * @test: The test context object.
1344 #define KUNIT_ASSERT_EQ(test, left, right) \ argument
1345 KUNIT_ASSERT_EQ_MSG(test, left, right, NULL)
1347 #define KUNIT_ASSERT_EQ_MSG(test, left, right, fmt, ...) \ argument
1348 KUNIT_BINARY_INT_ASSERTION(test, \
1356 * @test: The test context object.
1364 #define KUNIT_ASSERT_PTR_EQ(test, left, right) \ argument
1365 KUNIT_ASSERT_PTR_EQ_MSG(test, left, right, NULL)
1367 #define KUNIT_ASSERT_PTR_EQ_MSG(test, left, right, fmt, ...) \ argument
1368 KUNIT_BINARY_PTR_ASSERTION(test, \
1376 * @test: The test context object.
1384 #define KUNIT_ASSERT_NE(test, left, right) \ argument
1385 KUNIT_ASSERT_NE_MSG(test, left, right, NULL)
1387 #define KUNIT_ASSERT_NE_MSG(test, left, right, fmt, ...) \ argument
1388 KUNIT_BINARY_INT_ASSERTION(test, \
1397 * @test: The test context object.
1405 #define KUNIT_ASSERT_PTR_NE(test, left, right) \ argument
1406 KUNIT_ASSERT_PTR_NE_MSG(test, left, right, NULL)
1408 #define KUNIT_ASSERT_PTR_NE_MSG(test, left, right, fmt, ...) \ argument
1409 KUNIT_BINARY_PTR_ASSERTION(test, \
1416 * @test: The test context object.
1425 #define KUNIT_ASSERT_LT(test, left, right) \ argument
1426 KUNIT_ASSERT_LT_MSG(test, left, right, NULL)
1428 #define KUNIT_ASSERT_LT_MSG(test, left, right, fmt, ...) \ argument
1429 KUNIT_BINARY_INT_ASSERTION(test, \
1436 * @test: The test context object.
1445 #define KUNIT_ASSERT_LE(test, left, right) \ argument
1446 KUNIT_ASSERT_LE_MSG(test, left, right, NULL)
1448 #define KUNIT_ASSERT_LE_MSG(test, left, right, fmt, ...) \ argument
1449 KUNIT_BINARY_INT_ASSERTION(test, \
1457 * @test: The test context object.
1466 #define KUNIT_ASSERT_GT(test, left, right) \ argument
1467 KUNIT_ASSERT_GT_MSG(test, left, right, NULL)
1469 #define KUNIT_ASSERT_GT_MSG(test, left, right, fmt, ...) \ argument
1470 KUNIT_BINARY_INT_ASSERTION(test, \
1478 * @test: The test context object.
1487 #define KUNIT_ASSERT_GE(test, left, right) \ argument
1488 KUNIT_ASSERT_GE_MSG(test, left, right, NULL)
1490 #define KUNIT_ASSERT_GE_MSG(test, left, right, fmt, ...) \ argument
1491 KUNIT_BINARY_INT_ASSERTION(test, \
1499 * @test: The test context object.
1507 #define KUNIT_ASSERT_STREQ(test, left, right) \ argument
1508 KUNIT_ASSERT_STREQ_MSG(test, left, right, NULL)
1510 #define KUNIT_ASSERT_STREQ_MSG(test, left, right, fmt, ...) \ argument
1511 KUNIT_BINARY_STR_ASSERTION(test, \
1519 * @test: The test context object.
1525 * KUNIT_ASSERT_TRUE(@test, strcmp((@left), (@right))). See KUNIT_ASSERT_TRUE()
1528 #define KUNIT_ASSERT_STRNEQ(test, left, right) \ argument
1529 KUNIT_ASSERT_STRNEQ_MSG(test, left, right, NULL)
1531 #define KUNIT_ASSERT_STRNEQ_MSG(test, left, right, fmt, ...) \ argument
1532 KUNIT_BINARY_STR_ASSERTION(test, \
1540 * @test: The test context object.
1547 * KUNIT_ASSERT_TRUE(@test, !memcmp((@left), (@right), (@size))). See
1554 #define KUNIT_ASSERT_MEMEQ(test, left, right, size) \ argument
1555 KUNIT_ASSERT_MEMEQ_MSG(test, left, right, size, NULL)
1557 #define KUNIT_ASSERT_MEMEQ_MSG(test, left, right, size, fmt, ...) \ argument
1558 KUNIT_MEM_ASSERTION(test, \
1567 * @test: The test context object.
1574 * KUNIT_ASSERT_TRUE(@test, memcmp((@left), (@right), (@size))). See
1581 #define KUNIT_ASSERT_MEMNEQ(test, left, right, size) \ argument
1582 KUNIT_ASSERT_MEMNEQ_MSG(test, left, right, size, NULL)
1584 #define KUNIT_ASSERT_MEMNEQ_MSG(test, left, right, size, fmt, ...) \ argument
1585 KUNIT_MEM_ASSERTION(test, \
1594 * @test: The test context object.
1601 #define KUNIT_ASSERT_NULL(test, ptr) \ argument
1602 KUNIT_ASSERT_NULL_MSG(test, \
1606 #define KUNIT_ASSERT_NULL_MSG(test, ptr, fmt, ...) \ argument
1607 KUNIT_BINARY_PTR_ASSERTION(test, \
1615 * @test: The test context object.
1622 #define KUNIT_ASSERT_NOT_NULL(test, ptr) \ argument
1623 KUNIT_ASSERT_NOT_NULL_MSG(test, \
1627 #define KUNIT_ASSERT_NOT_NULL_MSG(test, ptr, fmt, ...) \ argument
1628 KUNIT_BINARY_PTR_ASSERTION(test, \
1636 * @test: The test context object.
1644 #define KUNIT_ASSERT_NOT_ERR_OR_NULL(test, ptr) \ argument
1645 KUNIT_ASSERT_NOT_ERR_OR_NULL_MSG(test, ptr, NULL)
1647 #define KUNIT_ASSERT_NOT_ERR_OR_NULL_MSG(test, ptr, fmt, ...) \ argument
1648 KUNIT_PTR_NOT_ERR_OR_NULL_MSG_ASSERTION(test, \
1655 * KUNIT_ARRAY_PARAM() - Define test parameter generator from an array.
1656 * @name: prefix for the test parameter generator function.
1657 * @array: array of test parameters.
1676 * KUNIT_ARRAY_PARAM_DESC() - Define test parameter generator from an array.
1677 * @name: prefix for the test parameter generator function.
1678 * @array: array of test parameters.