Whamcloud - gitweb
LU-14184 tests: component-add/del tests for DOM 70/40870/3
authorVitaly Fertman <c17818@cray.com>
Fri, 4 Dec 2020 18:55:41 +0000 (21:55 +0300)
committerOleg Drokin <green@whamcloud.com>
Tue, 16 Mar 2021 18:16:12 +0000 (18:16 +0000)
make duplicates of sanity-pfl 2,3 tests for DOM layout

HPE-bug-id: LUS-8282
Test-parameters: testlist="sanity-pfl/2.* sanity-pfl/3.*"
Signed-off-by: Vitaly Fertman <c17818@cray.com>
Change-Id: If73d7a436b2fc6b6b564cc6eec14ec9e7e4d6937
Reviewed-by: Elena Gryaznova <c17455@cray.com>
Reviewed-by: Vladimir Saveliev <c17830@cray.com>
Tested-by: Elena Gryaznova <c17455@cray.com>
Reviewed-on: https://review.whamcloud.com/40870
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity-pfl.sh

index 601846d..387d2b2 100644 (file)
@@ -276,15 +276,19 @@ test_1c() {
 }
 run_test 1c "Test overstriping w/max stripe count"
 
-test_2() {
+base_test_2() {
        local comp_file=$DIR/$tdir/$tfile
        local rw_len=$((5 * 1024 * 1024))       # 5M
+       local params=$1
 
        test_mkdir $DIR/$tdir
        rm -f $comp_file
 
-       $LFS setstripe -E 1m -S 1m $comp_file ||
-               error "Create $comp_file failed"
+       multiop $comp_file oO_RDWR:O_CREAT:O_LOV_DELAY_CREATE:c ||
+               error "create failed $comp_file"
+
+       $LFS setstripe --component-add $params $comp_file ||
+               error "Add component to $comp_file failed"
 
        check_component_count $comp_file 1
 
@@ -312,7 +316,16 @@ test_2() {
 
        rm -f $comp_file || error "Delete $comp_file failed"
 }
-run_test 2 "Add component to existing file"
+
+test_2a() {
+       base_test_2 "-E 1m -S 1m"
+}
+run_test 2a "Add components to existing file"
+
+test_2b () {
+       base_test_2 "-E 1m -L mdt"
+}
+run_test 2b "Add components w/DOM to existing file"
 
 del_comp_and_verify() {
        local comp_file=$1
@@ -337,14 +350,14 @@ del_comp_and_verify() {
        $CHECKSTAT -s $size $comp_file || error "size != $size"
 }
 
-test_3() {
+base_test_3() {
        local comp_file=$DIR/$tdir/$tfile
+       local params=$1
 
        test_mkdir $DIR/$tdir
        rm -f $comp_file
 
-       $LFS setstripe -E 1M -S 1M -E 64M -c 2 -E -1 -c 3 $comp_file ||
-               error "Create $comp_file failed"
+       $LFS setstripe $params $comp_file || error "Create $comp_file failed"
 
        check_component_count $comp_file 3
 
@@ -365,9 +378,17 @@ test_3() {
        del_comp_and_verify $comp_file "^init" 1 0
        del_comp_and_verify $comp_file "init" 0 0
        rm -f $comp_file || error "Delete second $comp_file failed"
+}
+
+test_3a() {
+       base_test_3 "-E 1M -S 1M -E 64M -c 2 -E -1 -c 3"
+}
+run_test 3a "Delete components from existing file"
 
+test_3b() {
+       base_test_3 "-E 1M -L mdt -E 64M -S 1M -c 2 -E -1 -c 3"
 }
-run_test 3 "Delete component from existing file"
+run_test 3b "Delete components w/DOM from existing file"
 
 test_4() {
        skip "Not supported in PFL"