X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Ftests%2Fsanity.sh;h=9e6b357aacad6f127d6f6ebf3ba154eaf69bb100;hp=5c8821444b441f4e0f0334fae7a12cdedd88638b;hb=06e586016d3acc490f922e43e3aee6b8112a2803;hpb=0daeebcbdc4e89d59221299f2687cfd3c4f00b5b diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 5c88214..9e6b357 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -27395,6 +27395,36 @@ test_822() { } run_test 822 "test precreate failure" +test_823() { + local p="$TMP/$TESTSUITE-$TESTNAME.parameters" + local OST_MAX_PRECREATE=20000 + + save_lustre_params mds1 \ + "osp.$FSNAME-OST*-osc-MDT0000.max_create_count" > $p + do_facet $SINGLEMDS "$LCTL set_param -n \ + osp.$FSNAME-OST*MDT0000.max_create_count=0" + do_facet $SINGLEMDS "$LCTL set_param -n \ + osp.$FSNAME-OST0000*MDT0000.max_create_count=$OST_MAX_PRECREATE" + + stack_trap "restore_lustre_params < $p; rm $p" + + do_facet $SINGLEMDS "$LCTL set_param -n \ + osp.$FSNAME-OST*-osc-MDT*.create_count=100200" + + local count=$(do_facet $SINGLEMDS "$LCTL get_param -n \ + osp.$FSNAME-OST0000*MDT0000.create_count") + local max=$(do_facet $SINGLEMDS "$LCTL get_param -n \ + osp.$FSNAME-OST0000*MDT0000.max_create_count") + local expect_count=$(((($max/2)/256) * 256)) + + log "setting create_count to 100200:" + log " -result- count: $count with max: $max, expecting: $expect_count" + + [[ $count -eq expect_count ]] || + error "Create count not set to max precreate." +} +run_test 823 "Setting create_count > OST_MAX_PRECREATE is lowered to maximum" + # # tests that do cleanup/setup should be run at the end #