Skip to content

Commit 0619a48

Browse files
kevin-brodsky-armshuahkh
authored andcommitted
kunit: Clarify kunit_skip() argument name
kunit_skip() and kunit_mark_skipped() can only be passed a pointer to a struct kunit, not struct kunit_suite (only kunit_log() actually supports both). Rename their first argument accordingly. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kevin Brodsky <[email protected]> Reviewed-by: David Gow <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
1 parent 43ebec9 commit 0619a48

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

include/kunit/test.h

+10-10
Original file line numberDiff line numberDiff line change
@@ -553,39 +553,39 @@ void kunit_cleanup(struct kunit *test);
553553
void __printf(2, 3) kunit_log_append(struct string_stream *log, const char *fmt, ...);
554554

555555
/**
556-
* kunit_mark_skipped() - Marks @test_or_suite as skipped
556+
* kunit_mark_skipped() - Marks @test as skipped
557557
*
558-
* @test_or_suite: The test context object.
558+
* @test: The test context object.
559559
* @fmt: A printk() style format string.
560560
*
561561
* Marks the test as skipped. @fmt is given output as the test status
562562
* comment, typically the reason the test was skipped.
563563
*
564564
* Test execution continues after kunit_mark_skipped() is called.
565565
*/
566-
#define kunit_mark_skipped(test_or_suite, fmt, ...) \
566+
#define kunit_mark_skipped(test, fmt, ...) \
567567
do { \
568-
WRITE_ONCE((test_or_suite)->status, KUNIT_SKIPPED); \
569-
scnprintf((test_or_suite)->status_comment, \
568+
WRITE_ONCE((test)->status, KUNIT_SKIPPED); \
569+
scnprintf((test)->status_comment, \
570570
KUNIT_STATUS_COMMENT_SIZE, \
571571
fmt, ##__VA_ARGS__); \
572572
} while (0)
573573

574574
/**
575-
* kunit_skip() - Marks @test_or_suite as skipped
575+
* kunit_skip() - Marks @test as skipped
576576
*
577-
* @test_or_suite: The test context object.
577+
* @test: The test context object.
578578
* @fmt: A printk() style format string.
579579
*
580580
* Skips the test. @fmt is given output as the test status
581581
* comment, typically the reason the test was skipped.
582582
*
583583
* Test execution is halted after kunit_skip() is called.
584584
*/
585-
#define kunit_skip(test_or_suite, fmt, ...) \
585+
#define kunit_skip(test, fmt, ...) \
586586
do { \
587-
kunit_mark_skipped((test_or_suite), fmt, ##__VA_ARGS__);\
588-
kunit_try_catch_throw(&((test_or_suite)->try_catch)); \
587+
kunit_mark_skipped((test), fmt, ##__VA_ARGS__); \
588+
kunit_try_catch_throw(&((test)->try_catch)); \
589589
} while (0)
590590

591591
/*

0 commit comments

Comments
 (0)