From: Jens Axboe Date: Tue, 10 Jul 2018 23:02:03 +0000 (-0600) Subject: t/axmap: add a few more overlap test cases X-Git-Tag: fio-3.8~16 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=53bf886a97095b523e44eab3fc75fe96dfc4a9f4;p=fio.git t/axmap: add a few more overlap test cases Signed-off-by: Jens Axboe --- diff --git a/t/axmap.c b/t/axmap.c index 4e6f22a8..2afe876c 100644 --- a/t/axmap.c +++ b/t/axmap.c @@ -117,6 +117,30 @@ static int test_overlap(void) map = axmap_new(200); + ret = axmap_set_nr(map, 16, 16); + if (ret != 16) { + printf("fail 0 16: %d\n", ret); + return 1; + } + + ret = axmap_set_nr(map, 0, 32); + if (ret != 16) { + printf("fail 0 32: %d\n", ret); + return 1; + } + + ret = axmap_set_nr(map, 48, 32); + if (ret != 32) { + printf("fail 48 32: %d\n", ret); + return 1; + } + + ret = axmap_set_nr(map, 32, 32); + if (ret != 16) { + printf("fail 32 32: %d\n", ret); + return 1; + } + ret = axmap_set_nr(map, 102, 1); if (ret != 1) { printf("fail 102 1: %d\n", ret);