t/axmap: add pre/post bit set checks
authorJens Axboe <axboe@kernel.dk>
Thu, 21 Feb 2013 09:23:51 +0000 (10:23 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 21 Feb 2013 09:25:19 +0000 (10:25 +0100)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
t/axmap.c

index 27fdaa73922526b92e9e25fd5ff59cfb63d2f59c..61e3220729d38da5a4246ab9e611082f5ecbae66 100644 (file)
--- a/t/axmap.c
+++ b/t/axmap.c
@@ -45,7 +45,15 @@ int main(int argc, char *argv[])
                        printf("lfsr: short loop\n");
                        break;
                }
+               if (axmap_isset(map, val)) {
+                       printf("bit already set\n");
+                       break;
+               }
                axmap_set(map, val);
+               if (!axmap_isset(map, val)) {
+                       printf("bit not set\n");
+                       break;
+               }
        }
 
        ff = axmap_next_free(map, osize);