t/axmap: add longer overlap test case
authorJens Axboe <axboe@kernel.dk>
Wed, 11 Jul 2018 21:32:31 +0000 (15:32 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 11 Jul 2018 21:32:31 +0000 (15:32 -0600)
Also fix bad test stop termination.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
t/axmap.c

index c40bd13..1512737 100644 (file)
--- 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)