From f20aa2305067504185684946195e9e1bb1a68a49 Mon Sep 17 00:00:00 2001 From: Bobi Jam Date: Thu, 11 May 2017 01:08:04 +0800 Subject: [PATCH] LU-9486 llapi-test: sanity test_27D failure llapi_layout_test.c - layout template stripe count returns value LLAPI_LAYOUT_WIDE if it was set -1, returns LLAPI_LAYOUT_DEFAULT if was set 0. Test-Parameters: testlist=sanity Signed-off-by: Bobi Jam Change-Id: I32c3944dd3cec36c4907277f96a400ecff6ebc60 Reviewed-on: https://review.whamcloud.com/27057 Reviewed-by: Andreas Dilger Tested-by: Jenkins Reviewed-by: Niu Yawei Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/tests/llapi_layout_test.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lustre/tests/llapi_layout_test.c b/lustre/tests/llapi_layout_test.c index 939067d9..d5258a9 100644 --- a/lustre/tests/llapi_layout_test.c +++ b/lustre/tests/llapi_layout_test.c @@ -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); -- 1.8.3.1