Re: [PATCH v3 10/11] mm/damon: Add kunit tests

From: kbuild test robot
Date: Wed Feb 05 2020 - 05:39:58 EST


Hi,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.5]
[cannot apply to next-20200205]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url: https://github.com/0day-ci/linux/commits/sj38-park-gmail-com/Introduce-Data-Access-MONitor-DAMON/20200204-143127
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 322bf2d3446aabdaf5e8887775bd9ced80dbc0f0
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

In file included from include/linux/list.h:9:0,
from include/linux/random.h:10,
from include/linux/damon.h:13,
from mm/damon.c:14:
mm/damon-test.h: In function 'damon_test_str_to_pids':
include/linux/kernel.h:835:29: warning: comparison of distinct pointer types lacks a cast
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
^
>> include/kunit/test.h:510:9: note: in expansion of macro '__typecheck'
((void)__typecheck(__left, __right)); \
^~~~~~~~~~~
>> include/kunit/test.h:534:2: note: in expansion of macro 'KUNIT_BASE_BINARY_ASSERTION'
KUNIT_BASE_BINARY_ASSERTION(test, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/kunit/test.h:623:2: note: in expansion of macro 'KUNIT_BASE_EQ_MSG_ASSERTION'
KUNIT_BASE_EQ_MSG_ASSERTION(test, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/kunit/test.h:633:2: note: in expansion of macro 'KUNIT_BINARY_EQ_MSG_ASSERTION'
KUNIT_BINARY_EQ_MSG_ASSERTION(test, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/kunit/test.h:996:2: note: in expansion of macro 'KUNIT_BINARY_EQ_ASSERTION'
KUNIT_BINARY_EQ_ASSERTION(test, KUNIT_EXPECTATION, left, right)
^~~~~~~~~~~~~~~~~~~~~~~~~
>> mm/damon-test.h:26:2: note: in expansion of macro 'KUNIT_EXPECT_EQ'
KUNIT_EXPECT_EQ(test, 1l, nr_integers);
^~~~~~~~~~~~~~~
include/linux/kernel.h:835:29: warning: comparison of distinct pointer types lacks a cast
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
^
>> include/kunit/test.h:510:9: note: in expansion of macro '__typecheck'
((void)__typecheck(__left, __right)); \
^~~~~~~~~~~
>> include/kunit/test.h:534:2: note: in expansion of macro 'KUNIT_BASE_BINARY_ASSERTION'
KUNIT_BASE_BINARY_ASSERTION(test, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/kunit/test.h:623:2: note: in expansion of macro 'KUNIT_BASE_EQ_MSG_ASSERTION'
KUNIT_BASE_EQ_MSG_ASSERTION(test, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/kunit/test.h:633:2: note: in expansion of macro 'KUNIT_BINARY_EQ_MSG_ASSERTION'
KUNIT_BINARY_EQ_MSG_ASSERTION(test, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/kunit/test.h:996:2: note: in expansion of macro 'KUNIT_BINARY_EQ_ASSERTION'
KUNIT_BINARY_EQ_ASSERTION(test, KUNIT_EXPECTATION, left, right)
^~~~~~~~~~~~~~~~~~~~~~~~~
mm/damon-test.h:32:2: note: in expansion of macro 'KUNIT_EXPECT_EQ'
KUNIT_EXPECT_EQ(test, 1l, nr_integers);
^~~~~~~~~~~~~~~
include/linux/kernel.h:835:29: warning: comparison of distinct pointer types lacks a cast
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
^
>> include/kunit/test.h:510:9: note: in expansion of macro '__typecheck'
((void)__typecheck(__left, __right)); \
^~~~~~~~~~~
>> include/kunit/test.h:534:2: note: in expansion of macro 'KUNIT_BASE_BINARY_ASSERTION'
KUNIT_BASE_BINARY_ASSERTION(test, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/kunit/test.h:623:2: note: in expansion of macro 'KUNIT_BASE_EQ_MSG_ASSERTION'
KUNIT_BASE_EQ_MSG_ASSERTION(test, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/kunit/test.h:633:2: note: in expansion of macro 'KUNIT_BINARY_EQ_MSG_ASSERTION'
KUNIT_BINARY_EQ_MSG_ASSERTION(test, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/kunit/test.h:996:2: note: in expansion of macro 'KUNIT_BINARY_EQ_ASSERTION'
KUNIT_BINARY_EQ_ASSERTION(test, KUNIT_EXPECTATION, left, right)
^~~~~~~~~~~~~~~~~~~~~~~~~
mm/damon-test.h:38:2: note: in expansion of macro 'KUNIT_EXPECT_EQ'
KUNIT_EXPECT_EQ(test, 0l, nr_integers);
^~~~~~~~~~~~~~~
include/linux/kernel.h:835:29: warning: comparison of distinct pointer types lacks a cast
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
^
>> include/kunit/test.h:510:9: note: in expansion of macro '__typecheck'
((void)__typecheck(__left, __right)); \
^~~~~~~~~~~
>> include/kunit/test.h:534:2: note: in expansion of macro 'KUNIT_BASE_BINARY_ASSERTION'
KUNIT_BASE_BINARY_ASSERTION(test, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/kunit/test.h:623:2: note: in expansion of macro 'KUNIT_BASE_EQ_MSG_ASSERTION'
KUNIT_BASE_EQ_MSG_ASSERTION(test, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/kunit/test.h:633:2: note: in expansion of macro 'KUNIT_BINARY_EQ_MSG_ASSERTION'
KUNIT_BINARY_EQ_MSG_ASSERTION(test, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +/__typecheck +510 include/kunit/test.h

73cda7bb8bfb1d Brendan Higgins 2019-09-23 419
73cda7bb8bfb1d Brendan Higgins 2019-09-23 420
73cda7bb8bfb1d Brendan Higgins 2019-09-23 421 #define KUNIT_FAIL_ASSERTION(test, assert_type, fmt, ...) \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 422 KUNIT_ASSERTION(test, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 423 false, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 424 kunit_fail_assert, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 425 KUNIT_INIT_FAIL_ASSERT_STRUCT(test, assert_type), \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 426 fmt, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 427 ##__VA_ARGS__)
73cda7bb8bfb1d Brendan Higgins 2019-09-23 428
73cda7bb8bfb1d Brendan Higgins 2019-09-23 429 /**
73cda7bb8bfb1d Brendan Higgins 2019-09-23 430 * KUNIT_FAIL() - Always causes a test to fail when evaluated.
73cda7bb8bfb1d Brendan Higgins 2019-09-23 431 * @test: The test context object.
73cda7bb8bfb1d Brendan Higgins 2019-09-23 432 * @fmt: an informational message to be printed when the assertion is made.
73cda7bb8bfb1d Brendan Higgins 2019-09-23 433 * @...: string format arguments.
73cda7bb8bfb1d Brendan Higgins 2019-09-23 434 *
73cda7bb8bfb1d Brendan Higgins 2019-09-23 435 * The opposite of KUNIT_SUCCEED(), it is an expectation that always fails. In
73cda7bb8bfb1d Brendan Higgins 2019-09-23 436 * other words, it always results in a failed expectation, and consequently
73cda7bb8bfb1d Brendan Higgins 2019-09-23 437 * always causes the test case to fail when evaluated. See KUNIT_EXPECT_TRUE()
73cda7bb8bfb1d Brendan Higgins 2019-09-23 438 * for more information.
73cda7bb8bfb1d Brendan Higgins 2019-09-23 439 */
73cda7bb8bfb1d Brendan Higgins 2019-09-23 440 #define KUNIT_FAIL(test, fmt, ...) \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 441 KUNIT_FAIL_ASSERTION(test, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 442 KUNIT_EXPECTATION, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 443 fmt, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 444 ##__VA_ARGS__)
73cda7bb8bfb1d Brendan Higgins 2019-09-23 445
73cda7bb8bfb1d Brendan Higgins 2019-09-23 446 #define KUNIT_UNARY_ASSERTION(test, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 447 assert_type, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 448 condition, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 449 expected_true, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 450 fmt, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 451 ...) \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 452 KUNIT_ASSERTION(test, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 453 !!(condition) == !!expected_true, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 454 kunit_unary_assert, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 455 KUNIT_INIT_UNARY_ASSERT_STRUCT(test, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 456 assert_type, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 457 #condition, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 458 expected_true), \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 459 fmt, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 460 ##__VA_ARGS__)
73cda7bb8bfb1d Brendan Higgins 2019-09-23 461
73cda7bb8bfb1d Brendan Higgins 2019-09-23 462 #define KUNIT_TRUE_MSG_ASSERTION(test, assert_type, condition, fmt, ...) \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 463 KUNIT_UNARY_ASSERTION(test, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 464 assert_type, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 465 condition, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 466 true, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 467 fmt, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 468 ##__VA_ARGS__)
73cda7bb8bfb1d Brendan Higgins 2019-09-23 469
73cda7bb8bfb1d Brendan Higgins 2019-09-23 470 #define KUNIT_TRUE_ASSERTION(test, assert_type, condition) \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 471 KUNIT_TRUE_MSG_ASSERTION(test, assert_type, condition, NULL)
73cda7bb8bfb1d Brendan Higgins 2019-09-23 472
73cda7bb8bfb1d Brendan Higgins 2019-09-23 473 #define KUNIT_FALSE_MSG_ASSERTION(test, assert_type, condition, fmt, ...) \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 474 KUNIT_UNARY_ASSERTION(test, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 475 assert_type, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 476 condition, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 477 false, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 478 fmt, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 479 ##__VA_ARGS__)
73cda7bb8bfb1d Brendan Higgins 2019-09-23 480
73cda7bb8bfb1d Brendan Higgins 2019-09-23 481 #define KUNIT_FALSE_ASSERTION(test, assert_type, condition) \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 482 KUNIT_FALSE_MSG_ASSERTION(test, assert_type, condition, NULL)
73cda7bb8bfb1d Brendan Higgins 2019-09-23 483
73cda7bb8bfb1d Brendan Higgins 2019-09-23 484 /*
73cda7bb8bfb1d Brendan Higgins 2019-09-23 485 * A factory macro for defining the assertions and expectations for the basic
73cda7bb8bfb1d Brendan Higgins 2019-09-23 486 * comparisons defined for the built in types.
73cda7bb8bfb1d Brendan Higgins 2019-09-23 487 *
73cda7bb8bfb1d Brendan Higgins 2019-09-23 488 * Unfortunately, there is no common type that all types can be promoted to for
73cda7bb8bfb1d Brendan Higgins 2019-09-23 489 * which all the binary operators behave the same way as for the actual types
73cda7bb8bfb1d Brendan Higgins 2019-09-23 490 * (for example, there is no type that long long and unsigned long long can
73cda7bb8bfb1d Brendan Higgins 2019-09-23 491 * both be cast to where the comparison result is preserved for all values). So
73cda7bb8bfb1d Brendan Higgins 2019-09-23 492 * the best we can do is do the comparison in the original types and then coerce
73cda7bb8bfb1d Brendan Higgins 2019-09-23 493 * everything to long long for printing; this way, the comparison behaves
73cda7bb8bfb1d Brendan Higgins 2019-09-23 494 * correctly and the printed out value usually makes sense without
73cda7bb8bfb1d Brendan Higgins 2019-09-23 495 * interpretation, but can always be interpreted to figure out the actual
73cda7bb8bfb1d Brendan Higgins 2019-09-23 496 * value.
73cda7bb8bfb1d Brendan Higgins 2019-09-23 497 */
73cda7bb8bfb1d Brendan Higgins 2019-09-23 498 #define KUNIT_BASE_BINARY_ASSERTION(test, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 499 assert_class, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 500 ASSERT_CLASS_INIT, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 501 assert_type, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 502 left, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 503 op, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 504 right, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 505 fmt, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 506 ...) \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 507 do { \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 508 typeof(left) __left = (left); \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 509 typeof(right) __right = (right); \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 @510 ((void)__typecheck(__left, __right)); \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 511 \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 512 KUNIT_ASSERTION(test, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 513 __left op __right, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 514 assert_class, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 515 ASSERT_CLASS_INIT(test, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 516 assert_type, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 517 #op, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 518 #left, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 519 __left, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 520 #right, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 521 __right), \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 522 fmt, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 523 ##__VA_ARGS__); \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 524 } while (0)
73cda7bb8bfb1d Brendan Higgins 2019-09-23 525
73cda7bb8bfb1d Brendan Higgins 2019-09-23 526 #define KUNIT_BASE_EQ_MSG_ASSERTION(test, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 527 assert_class, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 528 ASSERT_CLASS_INIT, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 529 assert_type, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 530 left, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 531 right, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 532 fmt, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 533 ...) \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 @534 KUNIT_BASE_BINARY_ASSERTION(test, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 535 assert_class, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 536 ASSERT_CLASS_INIT, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 537 assert_type, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 538 left, ==, right, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 539 fmt, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 540 ##__VA_ARGS__)
73cda7bb8bfb1d Brendan Higgins 2019-09-23 541
73cda7bb8bfb1d Brendan Higgins 2019-09-23 542 #define KUNIT_BASE_NE_MSG_ASSERTION(test, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 543 assert_class, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 544 ASSERT_CLASS_INIT, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 545 assert_type, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 546 left, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 547 right, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 548 fmt, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 549 ...) \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 550 KUNIT_BASE_BINARY_ASSERTION(test, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 551 assert_class, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 552 ASSERT_CLASS_INIT, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 553 assert_type, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 554 left, !=, right, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 555 fmt, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 556 ##__VA_ARGS__)
73cda7bb8bfb1d Brendan Higgins 2019-09-23 557
73cda7bb8bfb1d Brendan Higgins 2019-09-23 558 #define KUNIT_BASE_LT_MSG_ASSERTION(test, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 559 assert_class, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 560 ASSERT_CLASS_INIT, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 561 assert_type, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 562 left, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 563 right, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 564 fmt, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 565 ...) \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 566 KUNIT_BASE_BINARY_ASSERTION(test, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 567 assert_class, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 568 ASSERT_CLASS_INIT, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 569 assert_type, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 570 left, <, right, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 571 fmt, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 572 ##__VA_ARGS__)
73cda7bb8bfb1d Brendan Higgins 2019-09-23 573
73cda7bb8bfb1d Brendan Higgins 2019-09-23 574 #define KUNIT_BASE_LE_MSG_ASSERTION(test, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 575 assert_class, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 576 ASSERT_CLASS_INIT, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 577 assert_type, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 578 left, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 579 right, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 580 fmt, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 581 ...) \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 582 KUNIT_BASE_BINARY_ASSERTION(test, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 583 assert_class, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 584 ASSERT_CLASS_INIT, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 585 assert_type, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 586 left, <=, right, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 587 fmt, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 588 ##__VA_ARGS__)
73cda7bb8bfb1d Brendan Higgins 2019-09-23 589
73cda7bb8bfb1d Brendan Higgins 2019-09-23 590 #define KUNIT_BASE_GT_MSG_ASSERTION(test, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 591 assert_class, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 592 ASSERT_CLASS_INIT, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 593 assert_type, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 594 left, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 595 right, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 596 fmt, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 597 ...) \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 598 KUNIT_BASE_BINARY_ASSERTION(test, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 599 assert_class, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 600 ASSERT_CLASS_INIT, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 601 assert_type, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 602 left, >, right, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 603 fmt, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 604 ##__VA_ARGS__)
73cda7bb8bfb1d Brendan Higgins 2019-09-23 605
73cda7bb8bfb1d Brendan Higgins 2019-09-23 606 #define KUNIT_BASE_GE_MSG_ASSERTION(test, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 607 assert_class, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 608 ASSERT_CLASS_INIT, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 609 assert_type, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 610 left, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 611 right, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 612 fmt, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 613 ...) \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 614 KUNIT_BASE_BINARY_ASSERTION(test, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 615 assert_class, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 616 ASSERT_CLASS_INIT, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 617 assert_type, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 618 left, >=, right, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 619 fmt, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 620 ##__VA_ARGS__)
73cda7bb8bfb1d Brendan Higgins 2019-09-23 621
73cda7bb8bfb1d Brendan Higgins 2019-09-23 622 #define KUNIT_BINARY_EQ_MSG_ASSERTION(test, assert_type, left, right, fmt, ...)\
73cda7bb8bfb1d Brendan Higgins 2019-09-23 @623 KUNIT_BASE_EQ_MSG_ASSERTION(test, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 624 kunit_binary_assert, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 625 KUNIT_INIT_BINARY_ASSERT_STRUCT, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 626 assert_type, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 627 left, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 628 right, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 629 fmt, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 630 ##__VA_ARGS__)
73cda7bb8bfb1d Brendan Higgins 2019-09-23 631
73cda7bb8bfb1d Brendan Higgins 2019-09-23 632 #define KUNIT_BINARY_EQ_ASSERTION(test, assert_type, left, right) \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 @633 KUNIT_BINARY_EQ_MSG_ASSERTION(test, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 634 assert_type, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 635 left, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 636 right, \
73cda7bb8bfb1d Brendan Higgins 2019-09-23 637 NULL)
73cda7bb8bfb1d Brendan Higgins 2019-09-23 638

:::::: The code at line 510 was first introduced by commit
:::::: 73cda7bb8bfb1d4be0325d76172950ede1a65fd0 kunit: test: add the concept of expectations

:::::: TO: Brendan Higgins <brendanhiggins@xxxxxxxxxx>
:::::: CC: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx Intel Corporation

Attachment: .config.gz
Description: application/gzip