Whamcloud - gitweb
LU-13417 test: use mkdir_on_mdt0() in misc tests
[fs/lustre-release.git] / lustre / tests / sanity-quota.sh
index 3d24f75..40e8d89 100755 (executable)
@@ -401,9 +401,10 @@ wait_grace_time() {
 }
 
 setup_quota_test() {
+       local mdt=${1:-0}
        wait_delete_completed
        echo "Creating test directory"
-       mkdir $DIR/$tdir || return 1
+       $LFS mkdir -i $mdt -c 1 $DIR/$tdir || return 1
        chmod 0777 $DIR/$tdir || return 2
        # always clear fail_loc in case of fail_loc isn't cleared
        # properly when previous test failed
@@ -1586,7 +1587,7 @@ test_file_soft() {
        local SOFT_LIMIT=$(do_facet $SINGLEMDS $LCTL get_param -n \
                qmt.$FSNAME-QMT0000.md-0x0.soft_least_qunit)
 
-       setup_quota_test
+       setup_quota_test 0
        trap cleanup_quota_test EXIT
        is_project_quota_supported && change_project -sp $TSTPRJID $DIR/$tdir
 
@@ -3404,7 +3405,7 @@ test_38() {
 
        [ "$UID" != 0 ] && skip_env "must run as root" && return
 
-       setup_quota_test || error "setup quota failed with $?"
+       setup_quota_test || error "setup quota failed with $?"
        trap cleanup_quota_test EXIT
 
        # make sure the system is clean