Lines Matching refs:KUNIT_EXPECT_EQ
86 KUNIT_EXPECT_EQ(test, __compiletime_strlen("88888888"), 8); in fortify_test_known_sizes()
87 KUNIT_EXPECT_EQ(test, __compiletime_strlen(array_of_10), 10); in fortify_test_known_sizes()
88 KUNIT_EXPECT_EQ(test, __compiletime_strlen(ptr_of_11), 11); in fortify_test_known_sizes()
90 KUNIT_EXPECT_EQ(test, __compiletime_strlen(array_unknown), SIZE_MAX); in fortify_test_known_sizes()
92 KUNIT_EXPECT_EQ(test, __compiletime_strlen(test->name), SIZE_MAX); in fortify_test_known_sizes()
119 KUNIT_EXPECT_EQ(test, want_minus_one(pick), SIZE_MAX); in fortify_test_control_flow_split()
130 KUNIT_EXPECT_EQ(test, expected, expected)
373 KUNIT_EXPECT_EQ(test, __builtin_constant_p(len), 0); \
409 KUNIT_EXPECT_EQ(test, pad.buf[end], '\0'); in fortify_test_strlen()
410 KUNIT_EXPECT_EQ(test, pad.bytes_after, 0); in fortify_test_strlen()
413 KUNIT_EXPECT_EQ(test, strlen(pad.buf), end); in fortify_test_strlen()
414 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); in fortify_test_strlen()
419 KUNIT_EXPECT_EQ(test, strlen(pad.buf), end); in fortify_test_strlen()
420 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 1); in fortify_test_strlen()
432 KUNIT_EXPECT_EQ(test, pad.buf[end], '\0'); in fortify_test_strnlen()
433 KUNIT_EXPECT_EQ(test, pad.bytes_after, 0); in fortify_test_strnlen()
436 KUNIT_EXPECT_EQ(test, strnlen(pad.buf, sizeof(pad.buf)), end); in fortify_test_strnlen()
437 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); in fortify_test_strnlen()
439 KUNIT_EXPECT_EQ(test, strnlen(pad.buf, sizeof(pad.buf) / 2), in fortify_test_strnlen()
441 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); in fortify_test_strnlen()
447 KUNIT_EXPECT_EQ(test, strnlen(pad.buf, end + 1), end); in fortify_test_strnlen()
448 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 1); in fortify_test_strnlen()
449 KUNIT_EXPECT_EQ(test, strnlen(pad.buf, end + 2), end); in fortify_test_strnlen()
450 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 2); in fortify_test_strnlen()
453 KUNIT_EXPECT_EQ(test, strnlen(pad.buf, end), end); in fortify_test_strnlen()
454 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 2); in fortify_test_strnlen()
457 KUNIT_EXPECT_EQ(test, strnlen(pad.buf, end), end); in fortify_test_strnlen()
458 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 2); in fortify_test_strnlen()
472 KUNIT_EXPECT_EQ(test, pad.bytes_before, 0); in fortify_test_strcpy()
473 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 1], '\0'); in fortify_test_strcpy()
474 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 2], '\0'); in fortify_test_strcpy()
475 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 3], '\0'); in fortify_test_strcpy()
476 KUNIT_EXPECT_EQ(test, pad.bytes_after, 0); in fortify_test_strcpy()
481 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); in fortify_test_strcpy()
482 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 0); in fortify_test_strcpy()
484 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 1], '\0'); in fortify_test_strcpy()
492 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); in fortify_test_strcpy()
493 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 1); in fortify_test_strcpy()
495 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 1], '\0'); in fortify_test_strcpy()
499 KUNIT_EXPECT_EQ(test, pad.bytes_after, 0); in fortify_test_strcpy()
509 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 1); in fortify_test_strcpy()
510 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 2); in fortify_test_strcpy()
512 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 1], '\0'); in fortify_test_strcpy()
516 KUNIT_EXPECT_EQ(test, pad.bytes_after, 0); in fortify_test_strcpy()
525 KUNIT_EXPECT_EQ(test, pad.bytes_before, 0); in fortify_test_strncpy()
526 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 1], '\0'); in fortify_test_strncpy()
527 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 2], '\0'); in fortify_test_strncpy()
528 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 3], '\0'); in fortify_test_strncpy()
529 KUNIT_EXPECT_EQ(test, pad.bytes_after, 0); in fortify_test_strncpy()
535 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 0); in fortify_test_strncpy()
537 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 1], '\0'); in fortify_test_strncpy()
545 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 0); in fortify_test_strncpy()
551 KUNIT_EXPECT_EQ(test, pad.bytes_after, 0); in fortify_test_strncpy()
558 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 1); in fortify_test_strncpy()
563 KUNIT_EXPECT_EQ(test, pad.bytes_after, 0); in fortify_test_strncpy()
570 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 2); in fortify_test_strncpy()
575 KUNIT_EXPECT_EQ(test, pad.bytes_after, 0); in fortify_test_strncpy()
584 KUNIT_EXPECT_EQ(test, pad.bytes_before, 0); in fortify_test_strscpy()
585 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 1], '\0'); in fortify_test_strscpy()
586 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 2], '\0'); in fortify_test_strscpy()
587 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 3], '\0'); in fortify_test_strscpy()
588 KUNIT_EXPECT_EQ(test, pad.bytes_after, 0); in fortify_test_strscpy()
594 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 0); in fortify_test_strscpy()
596 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 1], '\0'); in fortify_test_strscpy()
597 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 2], '\0'); in fortify_test_strscpy()
604 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 0); in fortify_test_strscpy()
606 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 1], '\0'); in fortify_test_strscpy()
615 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 1); in fortify_test_strscpy()
616 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 1], '\0'); in fortify_test_strscpy()
620 KUNIT_EXPECT_EQ(test, pad.bytes_after, 0); in fortify_test_strscpy()
627 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 2); in fortify_test_strscpy()
628 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 1], '\0'); in fortify_test_strscpy()
632 KUNIT_EXPECT_EQ(test, pad.bytes_after, 0); in fortify_test_strscpy()
648 KUNIT_EXPECT_EQ(test, pad.bytes_before, 0); in fortify_test_strcat()
649 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 1], '\0'); in fortify_test_strcat()
650 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 2], '\0'); in fortify_test_strcat()
651 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 3], '\0'); in fortify_test_strcat()
652 KUNIT_EXPECT_EQ(test, pad.bytes_after, 0); in fortify_test_strcat()
656 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 0); in fortify_test_strcat()
659 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 0); in fortify_test_strcat()
661 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 1], '\0'); in fortify_test_strcat()
662 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 2], '\0'); in fortify_test_strcat()
667 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 0); in fortify_test_strcat()
669 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 1], '\0'); in fortify_test_strcat()
675 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 1); in fortify_test_strcat()
677 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 1], '\0'); in fortify_test_strcat()
680 KUNIT_EXPECT_EQ(test, pad.bytes_after, 0); in fortify_test_strcat()
684 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 2); in fortify_test_strcat()
686 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 1], '\0'); in fortify_test_strcat()
689 KUNIT_EXPECT_EQ(test, pad.bytes_after, 0); in fortify_test_strcat()
704 KUNIT_EXPECT_EQ(test, pad.bytes_before, 0); in fortify_test_strncat()
705 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 1], '\0'); in fortify_test_strncat()
706 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 2], '\0'); in fortify_test_strncat()
707 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 3], '\0'); in fortify_test_strncat()
708 KUNIT_EXPECT_EQ(test, pad.bytes_after, 0); in fortify_test_strncat()
712 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); in fortify_test_strncat()
713 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 0); in fortify_test_strncat()
716 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); in fortify_test_strncat()
717 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 0); in fortify_test_strncat()
719 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 1], '\0'); in fortify_test_strncat()
720 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 2], '\0'); in fortify_test_strncat()
725 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); in fortify_test_strncat()
726 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 0); in fortify_test_strncat()
728 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 1], '\0'); in fortify_test_strncat()
734 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); in fortify_test_strncat()
735 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 1); in fortify_test_strncat()
737 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 1], '\0'); in fortify_test_strncat()
740 KUNIT_EXPECT_EQ(test, pad.bytes_after, 0); in fortify_test_strncat()
744 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); in fortify_test_strncat()
745 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 2); in fortify_test_strncat()
747 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 1], '\0'); in fortify_test_strncat()
750 KUNIT_EXPECT_EQ(test, pad.bytes_after, 0); in fortify_test_strncat()
756 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 1); in fortify_test_strncat()
757 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 3); in fortify_test_strncat()
762 KUNIT_EXPECT_EQ(test, pad.bytes_after, 0); in fortify_test_strncat()
778 KUNIT_EXPECT_EQ(test, pad.bytes_before, 0); in fortify_test_strlcat()
779 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 1], '\0'); in fortify_test_strlcat()
780 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 2], '\0'); in fortify_test_strlcat()
781 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 3], '\0'); in fortify_test_strlcat()
782 KUNIT_EXPECT_EQ(test, pad.bytes_after, 0); in fortify_test_strlcat()
786 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); in fortify_test_strlcat()
787 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 0); in fortify_test_strlcat()
790 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); in fortify_test_strlcat()
791 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 0); in fortify_test_strlcat()
793 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 1], '\0'); in fortify_test_strlcat()
794 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 2], '\0'); in fortify_test_strlcat()
799 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); in fortify_test_strlcat()
800 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 0); in fortify_test_strlcat()
802 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 1], '\0'); in fortify_test_strlcat()
808 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); in fortify_test_strlcat()
809 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 1); in fortify_test_strlcat()
811 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 1], '\0'); in fortify_test_strlcat()
814 KUNIT_EXPECT_EQ(test, pad.bytes_after, 0); in fortify_test_strlcat()
818 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); in fortify_test_strlcat()
819 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 2); in fortify_test_strlcat()
821 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 1], '\0'); in fortify_test_strlcat()
824 KUNIT_EXPECT_EQ(test, pad.bytes_after, 0); in fortify_test_strlcat()
830 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 2); in fortify_test_strlcat()
831 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 2); in fortify_test_strlcat()
836 KUNIT_EXPECT_EQ(test, pad.bytes_after, 0); in fortify_test_strlcat()
843 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 3); in fortify_test_strlcat()
844 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 3); in fortify_test_strlcat()
845 KUNIT_EXPECT_EQ(test, pad.buf[sizeof(pad.buf) - 1], '\0'); in fortify_test_strlcat()
847 KUNIT_EXPECT_EQ(test, pad.bytes_after, 0); in fortify_test_strlcat()
872 KUNIT_EXPECT_EQ(test, pad.buf[0], '\0'); \
873 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); \
874 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 0); \
876 KUNIT_EXPECT_EQ(test, pad.buf[0], '\0'); \
877 KUNIT_EXPECT_EQ(test, pad.buf[1], 'B'); \
878 KUNIT_EXPECT_EQ(test, pad.buf[2], '\0'); \
879 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); \
880 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 0); \
882 KUNIT_EXPECT_EQ(test, pad.buf[0], 'A'); \
883 KUNIT_EXPECT_EQ(test, pad.buf[1], 'B'); \
884 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); \
885 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 0); \
887 KUNIT_EXPECT_EQ(test, pad.buf[1], 'A'); \
888 KUNIT_EXPECT_EQ(test, pad.buf[len - 1], '\0'); \
889 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); \
890 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 0); \
892 KUNIT_EXPECT_EQ(test, pad.buf[1], 'A'); \
893 KUNIT_EXPECT_EQ(test, pad.buf[len - 1], 'A'); \
894 KUNIT_EXPECT_EQ(test, pad.bytes_after, 0); \
895 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); \
896 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 0); \
898 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); \
899 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 1); \
901 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); \
902 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 2); \
908 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); \
909 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 0); \
911 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); \
912 KUNIT_EXPECT_EQ(test, fortify_write_overflows, 1); \
926 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); in __fortify_test()
930 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 1); in __fortify_test()
933 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 2); in __fortify_test()
945 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); in fortify_test_memchr()
949 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 1); in fortify_test_memchr()
952 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 2); in fortify_test_memchr()
965 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); in fortify_test_memchr_inv()
969 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 1); in fortify_test_memchr_inv()
972 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 2); in fortify_test_memchr_inv()
984 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); in fortify_test_memcmp()
987 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); in fortify_test_memcmp()
991 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 1); in fortify_test_memcmp()
994 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 2); in fortify_test_memcmp()
1006 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); in fortify_test_kmemdup()
1012 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); in fortify_test_kmemdup()
1018 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0); in fortify_test_kmemdup()
1024 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 1); in fortify_test_kmemdup()
1030 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 2); in fortify_test_kmemdup()
1036 KUNIT_EXPECT_EQ(test, fortify_read_overflows, 3); in fortify_test_kmemdup()