t/axmap: add zero return overlap cases
[fio.git] / t / axmap.c
index dafcedf4cf2ca4c95e8f22478d608e2800b96158..ed078853e052f7fd7e237bd450f55c1c6cddeb83 100644 (file)
--- a/t/axmap.c
+++ b/t/axmap.c
@@ -116,11 +116,21 @@ struct overlap_test {
 static int test_overlap(void)
 {
        struct overlap_test tests[] = {
+               {
+                       .start  = 0,
+                       .nr     = 0,
+                       .ret    = 0,
+               },
                {
                        .start  = 16,
                        .nr     = 16,
                        .ret    = 16,
                },
+               {
+                       .start  = 16,
+                       .nr     = 0,
+                       .ret    = 0,
+               },
                {
                        .start  = 0,
                        .nr     = 32,
@@ -214,7 +224,8 @@ static int test_overlap(void)
                }
        }
 
-       printf("pass!\n");
+       if (!err)
+               printf("pass!\n");
        axmap_free(map);
        return err;
 }