Whamcloud - gitweb
LU-14499 lnet: Revert "LU-13368 lnet: discard the callback"
[fs/lustre-release.git] / lustre / tests / llapi_layout_test.c
index f9051a0..0e16f1b 100644 (file)
@@ -68,6 +68,8 @@ do {                                                                  \
                DIE("assertion '%s' failed: "fmt, #cond, ## __VA_ARGS__);\
 } while (0)                                                            \
 
+#define IN_RANGE(value, low, high) ((value >= low) && (value <= high))
+
 static char *lustre_dir;
 static char *poolname;
 static bool run_list_provided;
@@ -722,7 +724,7 @@ static void test16(void)
        rc = llapi_layout_stripe_count_get(filelayout, &fcount);
        ASSERTF(rc == 0, "errno = %d", errno);
        ASSERTF(fcount == dcount || dcount == LLAPI_LAYOUT_DEFAULT ||
-               dcount == LLAPI_LAYOUT_WIDE,
+               IN_RANGE(dcount, LLAPI_LAYOUT_WIDE_MIN, LLAPI_LAYOUT_WIDE_MAX),
                "%"PRIu64" != %"PRIu64, fcount, dcount);
 
        rc = llapi_layout_stripe_size_get(filelayout, &fsize);
@@ -745,7 +747,7 @@ static void test16(void)
        rc = llapi_layout_stripe_size_get(filelayout, &fsize);
        ASSERTF(rc == 0, "errno = %d", errno);
        ASSERTF(fcount == dcount || dcount == LLAPI_LAYOUT_DEFAULT ||
-               dcount == LLAPI_LAYOUT_WIDE,
+               IN_RANGE(dcount, LLAPI_LAYOUT_WIDE_MIN, LLAPI_LAYOUT_WIDE_MAX),
                "%"PRIu64" != %"PRIu64, fcount, dcount);
        ASSERTF(fsize == dsize, "%"PRIu64" != %"PRIu64, fsize, dsize);