Whamcloud - gitweb
LU-10255 tests: Fix wrong comparison operator in sanity 129
[fs/lustre-release.git] / lustre / tests / llapi_layout_test.c
index a86dc5b..d5258a9 100644 (file)
@@ -709,7 +709,9 @@ void test16(void)
 
        rc = llapi_layout_stripe_count_get(filelayout, &fcount);
        ASSERTF(rc == 0, "errno = %d", errno);
-       ASSERTF(fcount == dcount, "%"PRIu64" != %"PRIu64, fcount, dcount);
+       ASSERTF(fcount == dcount || dcount == LLAPI_LAYOUT_DEFAULT ||
+               dcount == LLAPI_LAYOUT_WIDE,
+               "%"PRIu64" != %"PRIu64, fcount, dcount);
 
        rc = llapi_layout_stripe_size_get(filelayout, &fsize);
        ASSERTF(rc == 0, "errno = %d", errno);
@@ -730,7 +732,9 @@ void test16(void)
        ASSERTF(rc == 0, "errno = %d", errno);
        rc = llapi_layout_stripe_size_get(filelayout, &fsize);
        ASSERTF(rc == 0, "errno = %d", errno);
-       ASSERTF(fcount == dcount, "%"PRIu64" != %"PRIu64, fcount, dcount);
+       ASSERTF(fcount == dcount || dcount == LLAPI_LAYOUT_DEFAULT ||
+               dcount == LLAPI_LAYOUT_WIDE,
+               "%"PRIu64" != %"PRIu64, fcount, dcount);
        ASSERTF(fsize == dsize, "%"PRIu64" != %"PRIu64, fsize, dsize);
 
        llapi_layout_free(filelayout);
@@ -888,7 +892,9 @@ void test20(void)
        ASSERTF(rc == 0, "errno = %d", errno);
        rc = llapi_layout_stripe_count_get(deflayout, &dcount);
        ASSERTF(rc == 0, "errno = %d", errno);
-       ASSERTF(fcount == dcount, "%"PRIu64" != %"PRIu64, fcount, dcount);
+       ASSERTF(fcount == dcount || dcount == LLAPI_LAYOUT_DEFAULT ||
+               dcount == LLAPI_LAYOUT_WIDE,
+               "%"PRIu64" != %"PRIu64, fcount, dcount);
 
        rc = llapi_layout_stripe_size_get(filelayout, &fsize);
        ASSERTF(rc == 0, "errno = %d", errno);
@@ -1501,10 +1507,10 @@ void test31(void)
        llapi_layout_free(layout);
 
        /* delete non-tail component will fail */
-       rc = llapi_layout_file_comp_del(path, id[0]);
+       rc = llapi_layout_file_comp_del(path, id[0], 0);
        ASSERTF(rc < 0 && errno == EINVAL, "rc %d, errno %d", rc, errno);
 
-       rc = llapi_layout_file_comp_del(path, id[1]);
+       rc = llapi_layout_file_comp_del(path, id[1], 0);
        ASSERTF(rc == 0, "rc %d, errno %d", rc, errno);
 
        /* verify the composite layout after deleting */