X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fsanity-pfl.sh;h=106842bd73ed08aa8514fe1993855141dad36b7d;hb=3043c6f18964b0cc843b2e7866756a1d1ddd61e3;hp=83ac42ba826f63c436b90b385b5226abc7fbfaf8;hpb=c32c7401426d46b371fa993bba17265443fefa1b;p=fs%2Flustre-release.git diff --git a/lustre/tests/sanity-pfl.sh b/lustre/tests/sanity-pfl.sh index 83ac42b..106842b 100644 --- a/lustre/tests/sanity-pfl.sh +++ b/lustre/tests/sanity-pfl.sh @@ -19,7 +19,7 @@ build_test_filter check_and_setup_lustre -if [[ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.9.51) ]]; then +if [[ "$MDS1_VERSION" -lt $(version_code 2.9.51) ]]; then skip_env "Need MDS version at least 2.9.51" fi @@ -1038,8 +1038,8 @@ test19_io_base() { # Self-extending PFL tests test_19a() { - [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return - [ $(lustre_version_code $SINGLEMDS) -lt $(version_code $SEL_VER) ] && + [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" + [ "$MDS1_VERSION" -lt $(version_code $SEL_VER) ] && skip "skipped for lustre < $SEL_VER" test19_io_base $DIR/$tdir/$tfile @@ -1048,11 +1048,12 @@ run_test 19a "Simple test of extension behavior" # Same as 19a, but with default layout set on directory rather than on file test_19b() { - [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return - [ $(lustre_version_code $SINGLEMDS) -lt $(version_code $SEL_VER) ] && + [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" + [ "$MDS1_VERSION" -lt $(version_code $SEL_VER) ] && skip "skipped for lustre < $SEL_VER" local comp_file=$DIR/$tdir/$tfile + local comp_dir=$DIR/$tdir/$tdir local flg_opts="" local found="" @@ -1060,15 +1061,24 @@ test_19b() { $LFS setstripe --ext-size 64M -c 1 -E -1 $DIR/$tdir || error "Setstripe on $DIR/$tdir failed" + # check inheritance for a sub-dir and a file + test_mkdir $comp_dir + found=$($LFS find --comp-start 0 -E 64M $comp_dir | wc -l) + [ $found -eq 1 ] || error "Dir Inheritance: wrong first component size" + + flg_opts="--comp-flags extension" + found=$($LFS find --comp-start 64M -E EOF $flg_opts $comp_dir | wc -l) + [ $found -eq 1 ] || error "Dir Inheritance: Second component not found" + touch $comp_file flg_opts="--comp-flags init" found=$($LFS find --comp-start 0 -E 64M $flg_opts $comp_file | wc -l) - [ $found -eq 1 ] || error "Inheritance: wrong first component size" + [ $found -eq 1 ] || error "File Inheritance: wrong first component size" flg_opts="--comp-flags extension" found=$($LFS find --comp-start 64M -E EOF $flg_opts $comp_file | wc -l) - [ $found -eq 1 ] || error "Inheritance: Second component not found" + [ $found -eq 1 ] || error "File Inheritance: Second component not found" test19_io_base $comp_file 1 } @@ -1076,8 +1086,8 @@ run_test 19b "Simple test of SEL as default layout" # Test behavior when seeking deep in a file test_19c() { - [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return - [ $(lustre_version_code $SINGLEMDS) -lt $(version_code $SEL_VER) ] && + [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" + [ "$MDS1_VERSION" -lt $(version_code $SEL_VER) ] && skip "skipped for lustre < $SEL_VER" local comp_file=$DIR/$tdir/$tfile @@ -1139,8 +1149,8 @@ test_19c() { run_test 19c "Test self-extending layout seeking behavior" test_19d() { - [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return - [ $(lustre_version_code $SINGLEMDS) -lt $(version_code $SEL_VER) ] && + [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" + [ "$MDS1_VERSION" -lt $(version_code $SEL_VER) ] && skip "skipped for lustre < $SEL_VER" local comp_file=$DIR/$tdir/$tfile @@ -1193,8 +1203,8 @@ test_19e_check() { } test_19e() { - [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return - [ $(lustre_version_code $SINGLEMDS) -lt $(version_code $SEL_VER) ] && + [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" + [ "$MDS1_VERSION" -lt $(version_code $SEL_VER) ] && skip "skipped for lustre < $SEL_VER" local comp_file=$DIR/$tdir/$tfile @@ -1248,8 +1258,8 @@ test_19e() { run_test 19e "Replay of layout instantiation & extension" test_19f() { - [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return - [ $(lustre_version_code $SINGLEMDS) -lt $(version_code $SEL_VER) ] && + [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" + [ "$MDS1_VERSION" -lt $(version_code $SEL_VER) ] && skip "skipped for lustre < $SEL_VER" local comp_file=$DIR/$tdir/$tfile @@ -1266,8 +1276,8 @@ test_19f() { run_test 19f "Rejection of invalid layouts" test_19g() { - [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return - [ $(lustre_version_code $SINGLEMDS) -lt $(version_code $SEL_VER) ] && + [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" + [ "$MDS1_VERSION" -lt $(version_code $SEL_VER) ] && skip "skipped for lustre < $SEL_VER" local file1=$DIR/${tfile}-1 @@ -1343,8 +1353,8 @@ run_test 19g "component-add behaviour" # Test out of space behavior test_20a() { - [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return - [ $(lustre_version_code $SINGLEMDS) -lt $(version_code $SEL_VER) ] && + [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" + [ "$MDS1_VERSION" -lt $(version_code $SEL_VER) ] && skip "skipped for lustre < $SEL_VER" local comp_file=$DIR/$tdir/$tfile @@ -1395,8 +1405,8 @@ test_20a() { run_test 20a "Test out of space, spillover to defined component" test_20b() { - [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return - [ $(lustre_version_code $SINGLEMDS) -lt $(version_code $SEL_VER) ] && + [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" + [ "$MDS1_VERSION" -lt $(version_code $SEL_VER) ] && skip "skipped for lustre < $SEL_VER" local comp_file=$DIR/$tdir/$tfile @@ -1461,8 +1471,8 @@ test_20b() { run_test 20b "Remove component without instantiation when there is no space" test_20c() { - [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return - [ $(lustre_version_code $SINGLEMDS) -lt $(version_code $SEL_VER) ] && + [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" + [ "$MDS1_VERSION" -lt $(version_code $SEL_VER) ] && skip "skipped for lustre < $SEL_VER" local comp_file=$DIR/$tdir/$tfile @@ -1512,8 +1522,8 @@ test_20c() { run_test 20c "Test inability to stripe new extension component" test_20d() { - [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return - [ $(lustre_version_code $SINGLEMDS) -lt $(version_code $SEL_VER) ] && + [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" + [ "$MDS1_VERSION" -lt $(version_code $SEL_VER) ] && skip "skipped for lustre < $SEL_VER" local comp_file=$DIR/$tdir/$tfile @@ -1557,8 +1567,8 @@ test_20d() { run_test 20d "Low on space + 0-length comp: force extension" test_20e() { - [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return - [ $(lustre_version_code $SINGLEMDS) -lt $(version_code $SEL_VER) ] && + [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" + [ "$MDS1_VERSION" -lt $(version_code $SEL_VER) ] && skip "skipped for lustre < $SEL_VER" local comp_file=$DIR/$tdir/$tfile @@ -1597,7 +1607,7 @@ run_test 20e "ENOSPC with next real comp: spillover and backward extension" # Simple DoM interaction test test_21a() { - [ $(lustre_version_code $SINGLEMDS) -lt $(version_code $SEL_VER) ] && + [ "$MDS1_VERSION" -lt $(version_code $SEL_VER) ] && skip "skipped for lustre < $SEL_VER" local comp_file=$DIR/$tdir/$tfile @@ -1628,8 +1638,8 @@ run_test 21a "Simple DoM interaction tests" # DoM + extension + removal test_21b() { - [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return - [ $(lustre_version_code $SINGLEMDS) -lt $(version_code $SEL_VER) ] && + [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" + [ "$MDS1_VERSION" -lt $(version_code $SEL_VER) ] && skip "skipped for lustre < $SEL_VER" local comp_file=$DIR/$tdir/$tfile @@ -1677,8 +1687,8 @@ run_test 21b "DoM followed by extendable component with removal" # Test of repeat component behavior with OOS/degraded OST test_22a() { - [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return - [ $(lustre_version_code $SINGLEMDS) -lt $(version_code $SEL_VER) ] && + [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" + [ "$MDS1_VERSION" -lt $(version_code $SEL_VER) ] && skip "skipped for lustre < $SEL_VER" local comp_file=$DIR/$tdir/$tfile @@ -1749,8 +1759,8 @@ run_test 22a "Test repeat component behavior with degraded OST" # Test repeat behavior with low space test_22b() { - [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return - [ $(lustre_version_code $SINGLEMDS) -lt $(version_code $SEL_VER) ] && + [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" + [ "$MDS1_VERSION" -lt $(version_code $SEL_VER) ] && skip "skipped for lustre < $SEL_VER" local comp_file=$DIR/$tdir/$tfile @@ -1805,8 +1815,8 @@ run_test 22b "Test simple 'out of space' condition with repeat" # This tests both "repeat" and "extend in place when repeat fails" aspects # of repeating components test_22c() { - [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return - [ $(lustre_version_code $SINGLEMDS) -lt $(version_code $SEL_VER) ] && + [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" + [ "$MDS1_VERSION" -lt $(version_code $SEL_VER) ] && skip "skipped for lustre < $SEL_VER" local comp_file=$DIR/$tdir/$tfile @@ -1931,8 +1941,8 @@ test_22d_pre() { } test_22d() { - [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return - [ $(lustre_version_code $SINGLEMDS) -lt $(version_code $SEL_VER) ] && + [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" + [ "$MDS1_VERSION" -lt $(version_code $SEL_VER) ] && skip "skipped for lustre < $SEL_VER" local comp_file=$DIR/$tdir/$tfile @@ -1982,8 +1992,8 @@ test_22d() { run_test 22d "out of/low on space + failed to repeat + forced extension" test_23a() { - [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return - [ $(lustre_version_code $SINGLEMDS) -lt $(version_code $SEL_VER) ] && + [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" + [ "$MDS1_VERSION" -lt $(version_code $SEL_VER) ] && skip "skipped for lustre < $SEL_VER" local comp_file=$DIR/$tdir/$tfile @@ -2007,8 +2017,8 @@ test_23a() { run_test 23a "Append: remove EXT comp" test_23b() { - [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return - [ $(lustre_version_code $SINGLEMDS) -lt $(version_code $SEL_VER) ] && + [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" + [ "$MDS1_VERSION" -lt $(version_code $SEL_VER) ] && skip "skipped for lustre < $SEL_VER" local comp_file=$DIR/$tdir/$tfile @@ -2032,8 +2042,8 @@ test_23b() { run_test 23b "Append with 0-length comp: remove EXT comp" test_23c() { - [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return - [ $(lustre_version_code $SINGLEMDS) -lt $(version_code $SEL_VER) ] && + [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" + [ "$MDS1_VERSION" -lt $(version_code $SEL_VER) ] && skip "skipped for lustre < $SEL_VER" local comp_file=$DIR/$tdir/$tfile @@ -2066,8 +2076,8 @@ test_23c() { run_test 23c "Append with low on space + 0-length comp: force extension" test_23d() { - [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return - [ $(lustre_version_code $SINGLEMDS) -lt $(version_code $SEL_VER) ] && + [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" + [ "$MDS1_VERSION" -lt $(version_code $SEL_VER) ] && skip "skipped for lustre < $SEL_VER" local comp_file=$DIR/$tdir/$tfile @@ -2091,8 +2101,8 @@ test_23d() { run_test 23d "Append with 0-length comp + next real comp: remove EXT comp" test_23e() { - [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return - [ $(lustre_version_code $SINGLEMDS) -lt $(version_code $SEL_VER) ] && + [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" + [ "$MDS1_VERSION" -lt $(version_code $SEL_VER) ] && skip "skipped for lustre < $SEL_VER" local comp_file=$DIR/$tdir/$tfile @@ -2129,8 +2139,8 @@ test_23e() { run_test 23e "Append with next real comp: spillover and backward extension" test_23f() { - [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return - [ $(lustre_version_code $SINGLEMDS) -lt $(version_code $SEL_VER) ] && + [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" + [ "$MDS1_VERSION" -lt $(version_code $SEL_VER) ] && skip "skipped for lustre < $SEL_VER" local comp_file=$DIR/$tdir/$tfile