Lines Matching refs:expect

100 	typeof(observed.lines) expect;  in report_matches()
111 cur = expect[0]; in report_matches()
112 end = &expect[0][sizeof(expect[0]) - 1]; in report_matches()
136 cur = strchr(expect[0], '+'); in report_matches()
141 cur = expect[1]; in report_matches()
142 end = &expect[1][sizeof(expect[1]) - 1]; in report_matches()
172 ret = strstr(observed.lines[0], expect[0]) && strstr(observed.lines[1], expect[1]); in report_matches()
319 struct expect_report expect = { in test_out_of_bounds_read() local
338 expect.addr = buf - 1; in test_out_of_bounds_read()
339 READ_ONCE(*expect.addr); in test_out_of_bounds_read()
340 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_out_of_bounds_read()
344 expect.addr = buf + size; in test_out_of_bounds_read()
345 READ_ONCE(*expect.addr); in test_out_of_bounds_read()
346 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_out_of_bounds_read()
353 struct expect_report expect = { in test_out_of_bounds_write() local
362 expect.addr = buf - 1; in test_out_of_bounds_write()
363 WRITE_ONCE(*expect.addr, 42); in test_out_of_bounds_write()
364 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_out_of_bounds_write()
371 struct expect_report expect = { in test_use_after_free_read() local
378 expect.addr = test_alloc(test, size, GFP_KERNEL, ALLOCATE_ANY); in test_use_after_free_read()
379 test_free(expect.addr); in test_use_after_free_read()
380 READ_ONCE(*expect.addr); in test_use_after_free_read()
381 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_use_after_free_read()
387 struct expect_report expect = { in test_double_free() local
393 expect.addr = test_alloc(test, size, GFP_KERNEL, ALLOCATE_ANY); in test_double_free()
394 test_free(expect.addr); in test_double_free()
395 test_free(expect.addr); /* Double-free. */ in test_double_free()
396 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_double_free()
402 struct expect_report expect = { in test_invalid_addr_free() local
410 expect.addr = buf + 1; /* Free on invalid address. */ in test_invalid_addr_free()
411 test_free(expect.addr); /* Invalid address free. */ in test_invalid_addr_free()
413 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_invalid_addr_free()
419 struct expect_report expect = { in test_corruption() local
430 expect.addr = buf + size; in test_corruption()
431 WRITE_ONCE(*expect.addr, 42); in test_corruption()
433 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_corruption()
436 expect.addr = buf - 1; in test_corruption()
437 WRITE_ONCE(*expect.addr, 42); in test_corruption()
439 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_corruption()
456 struct expect_report expect = { in test_kmalloc_aligned_oob_read() local
480 expect.addr = buf + size + align; in test_kmalloc_aligned_oob_read()
481 READ_ONCE(*expect.addr); in test_kmalloc_aligned_oob_read()
482 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_kmalloc_aligned_oob_read()
490 struct expect_report expect = { in test_kmalloc_aligned_oob_write() local
501 expect.addr = buf + size; in test_kmalloc_aligned_oob_write()
502 WRITE_ONCE(*expect.addr, READ_ONCE(*expect.addr) + 1); in test_kmalloc_aligned_oob_write()
505 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_kmalloc_aligned_oob_write()
555 struct expect_report expect = { in test_init_on_free() local
566 expect.addr = test_alloc(test, size, GFP_KERNEL, ALLOCATE_ANY); in test_init_on_free()
568 expect.addr[i] = i + 1; in test_init_on_free()
569 test_free(expect.addr); in test_init_on_free()
577 KUNIT_EXPECT_EQ(test, expect.addr[i], (char)0); in test_init_on_free()
580 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_init_on_free()
642 const struct expect_report expect = { in test_invalid_access() local
650 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_invalid_access()
657 struct expect_report expect = { in test_memcache_typesafe_by_rcu() local
666 expect.addr = test_alloc(test, size, GFP_KERNEL, ALLOCATE_ANY); in test_memcache_typesafe_by_rcu()
667 *expect.addr = 42; in test_memcache_typesafe_by_rcu()
670 test_free(expect.addr); in test_memcache_typesafe_by_rcu()
671 KUNIT_EXPECT_EQ(test, *expect.addr, (char)42); in test_memcache_typesafe_by_rcu()
685 KUNIT_EXPECT_EQ(test, *expect.addr, (char)42); in test_memcache_typesafe_by_rcu()
686 KUNIT_EXPECT_TRUE(test, report_matches(&expect)); in test_memcache_typesafe_by_rcu()
693 const struct expect_report expect = { in test_krealloc() local
699 char *buf = expect.addr; in test_krealloc()
725 READ_ONCE(*expect.addr); /* Ensure krealloc() actually freed earlier KFENCE object. */ in test_krealloc()
726 KUNIT_ASSERT_TRUE(test, report_matches(&expect)); in test_krealloc()