Lines Matching refs:test
66 static void damon_test_three_regions_in_vmas(struct kunit *test) in damon_test_three_regions_in_vmas() argument
82 kunit_skip(test, "Failed to create VMA tree"); in damon_test_three_regions_in_vmas()
86 KUNIT_EXPECT_EQ(test, 10ul, regions[0].start); in damon_test_three_regions_in_vmas()
87 KUNIT_EXPECT_EQ(test, 25ul, regions[0].end); in damon_test_three_regions_in_vmas()
88 KUNIT_EXPECT_EQ(test, 200ul, regions[1].start); in damon_test_three_regions_in_vmas()
89 KUNIT_EXPECT_EQ(test, 220ul, regions[1].end); in damon_test_three_regions_in_vmas()
90 KUNIT_EXPECT_EQ(test, 300ul, regions[2].start); in damon_test_three_regions_in_vmas()
91 KUNIT_EXPECT_EQ(test, 330ul, regions[2].end); in damon_test_three_regions_in_vmas()
129 static void damon_do_test_apply_three_regions(struct kunit *test, in damon_do_test_apply_three_regions() argument
148 KUNIT_EXPECT_EQ(test, r->ar.start, expected[i * 2]); in damon_do_test_apply_three_regions()
149 KUNIT_EXPECT_EQ(test, r->ar.end, expected[i * 2 + 1]); in damon_do_test_apply_three_regions()
161 static void damon_test_apply_three_regions1(struct kunit *test) in damon_test_apply_three_regions1() argument
175 damon_do_test_apply_three_regions(test, regions, ARRAY_SIZE(regions), in damon_test_apply_three_regions1()
183 static void damon_test_apply_three_regions2(struct kunit *test) in damon_test_apply_three_regions2() argument
197 damon_do_test_apply_three_regions(test, regions, ARRAY_SIZE(regions), in damon_test_apply_three_regions2()
207 static void damon_test_apply_three_regions3(struct kunit *test) in damon_test_apply_three_regions3() argument
221 damon_do_test_apply_three_regions(test, regions, ARRAY_SIZE(regions), in damon_test_apply_three_regions3()
232 static void damon_test_apply_three_regions4(struct kunit *test) in damon_test_apply_three_regions4() argument
245 damon_do_test_apply_three_regions(test, regions, ARRAY_SIZE(regions), in damon_test_apply_three_regions4()
249 static void damon_test_split_evenly_fail(struct kunit *test, in damon_test_split_evenly_fail() argument
256 KUNIT_EXPECT_EQ(test, in damon_test_split_evenly_fail()
258 KUNIT_EXPECT_EQ(test, damon_nr_regions(t), 1u); in damon_test_split_evenly_fail()
261 KUNIT_EXPECT_EQ(test, r->ar.start, start); in damon_test_split_evenly_fail()
262 KUNIT_EXPECT_EQ(test, r->ar.end, end); in damon_test_split_evenly_fail()
268 static void damon_test_split_evenly_succ(struct kunit *test, in damon_test_split_evenly_succ() argument
277 KUNIT_EXPECT_EQ(test, in damon_test_split_evenly_succ()
279 KUNIT_EXPECT_EQ(test, damon_nr_regions(t), nr_pieces); in damon_test_split_evenly_succ()
283 KUNIT_EXPECT_EQ(test, in damon_test_split_evenly_succ()
285 KUNIT_EXPECT_EQ(test, r->ar.end, end); in damon_test_split_evenly_succ()
288 KUNIT_EXPECT_EQ(test, in damon_test_split_evenly_succ()
290 KUNIT_EXPECT_EQ(test, r->ar.end, start + i * expected_width); in damon_test_split_evenly_succ()
295 static void damon_test_split_evenly(struct kunit *test) in damon_test_split_evenly() argument
297 KUNIT_EXPECT_EQ(test, damon_va_evenly_split_region(NULL, NULL, 5), in damon_test_split_evenly()
300 damon_test_split_evenly_fail(test, 0, 100, 0); in damon_test_split_evenly()
301 damon_test_split_evenly_succ(test, 0, 100, 10); in damon_test_split_evenly()
302 damon_test_split_evenly_succ(test, 5, 59, 5); in damon_test_split_evenly()
303 damon_test_split_evenly_succ(test, 4, 6, 1); in damon_test_split_evenly()
304 damon_test_split_evenly_succ(test, 0, 3, 2); in damon_test_split_evenly()
305 damon_test_split_evenly_fail(test, 5, 6, 2); in damon_test_split_evenly()