From b8c7923917200c7c68c84c21549940d4be6b1398 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 11 Jul 2018 15:32:31 -0600 Subject: [PATCH] t/axmap: add longer overlap test case Also fix bad test stop termination. Signed-off-by: Jens Axboe --- t/axmap.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/t/axmap.c b/t/axmap.c index c40bd13b..1512737e 100644 --- a/t/axmap.c +++ b/t/axmap.c @@ -191,6 +191,16 @@ static int test_overlap(void) .nr = 2, .ret = 0, }, + { + .start = 1100, + .nr = 1, + .ret = 1, + }, + { + .start = 1000, + .nr = 256, + .ret = 100, + }, { .start = 22684, .nr = 1, @@ -209,7 +219,7 @@ static int test_overlap(void) int entries, i, ret, err = 0; entries = 0; - for (i = 0; tests[i].start != 1U; i++) { + for (i = 0; tests[i].start != -1U; i++) { unsigned int this = tests[i].start + tests[i].nr; if (this > entries) -- 2.25.1