X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Ftest-framework.sh;h=be82fec55c6ff9a1112b095a78a9139f40946b92;hb=c7ed812d6a87f0ffa3c0d4c1a9289497f680ccec;hp=c0203757635a358605026752741e4484fc06ff5c;hpb=7921d0d8db942057eb10042291d6d90448e5c197;p=fs%2Flustre-release.git diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index c020375..be82fec 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -611,18 +611,18 @@ load_modules_local() { LNETLND="socklnd/ksocklnd" esac fi - load_module ../lnet/klnds/$LNETLND - load_module obdclass/obdclass - load_module ptlrpc/ptlrpc - load_module ptlrpc/gss/ptlrpc_gss - load_module fld/fld - load_module fid/fid - load_module lmv/lmv - load_module mdc/mdc - load_module osc/osc - load_module lov/lov - load_module mgc/mgc - load_module obdecho/obdecho + load_module ../lnet/klnds/$LNETLND + load_module obdclass/obdclass + load_module ptlrpc/ptlrpc + load_module ptlrpc/gss/ptlrpc_gss + load_module fld/fld + load_module fid/fid + load_module lmv/lmv + load_module osc/osc + load_module mdc/mdc + load_module lov/lov + load_module mgc/mgc + load_module obdecho/obdecho if ! client_only; then SYMLIST=/proc/kallsyms grep -q crc16 $SYMLIST || @@ -1864,6 +1864,19 @@ zconf_umount() { fi } +# Mount the file system on the MGS +mount_mgs_client() { + do_facet mgs "mkdir -p $MOUNT" + zconf_mount $mgs_HOST $MOUNT $MOUNT_OPTS || + error "unable to mount $MOUNT on MGS" +} + +# Unmount the file system on the MGS +umount_mgs_client() { + zconf_umount $mgs_HOST $MOUNT + do_facet mgs "rm -rf $MOUNT" +} + # nodes is comma list sanity_mount_check_nodes () { local nodes=$1 @@ -2501,7 +2514,7 @@ wait_update_facet() { sync_all_data() { do_nodes $(comma_list $(mdts_nodes)) \ - "lctl set_param -n osd*.*MDT*.force_sync=1" + "lctl set_param -n os[cd]*.*MDT*.force_sync=1" do_nodes $(comma_list $(osts_nodes)) \ "lctl set_param -n osd*.*OS*.force_sync=1" 2>&1 | grep -v 'Found no match' @@ -2542,7 +2555,7 @@ wait_delete_completed_mds() { mds2sync=$(comma_list $mds2sync) # sync MDS transactions - do_nodes $mds2sync "$LCTL set_param -n osd*.*MD*.force_sync 1" + do_nodes $mds2sync "$LCTL set_param -n os[cd]*.*MD*.force_sync 1" # wait till all changes are sent and commmitted by OSTs # for ldiskfs space is released upon execution, but DMU @@ -3969,7 +3982,7 @@ format_ost() { } formatall() { - stopall + stopall -f # Set hostid for ZFS/SPL zpool import protection # (Assumes MDS version is also OSS version) if [ $(lustre_version_code $SINGLEMDS) -ge $(version_code 2.8.54) ]; @@ -7796,11 +7809,14 @@ test_mkdir() { local parent=$(dirname $path) [ -d $path ] && return 0 - [ ! -d ${parent} ] && mkdir -p ${parent} + if [ ! -d ${parent} ]; then + mkdir -p ${parent} || + error "mkdir parent '$parent' failed" + fi fi if [ $MDSCOUNT -le 1 ]; then - mkdir $path + mkdir $path || error "mkdir '$path' failed" else local test_num=$(echo $testnum | sed -e 's/[^0-9]*//g') local mdt_index @@ -7811,7 +7827,8 @@ test_mkdir() { mdt_index=$stripe_index fi echo "striped dir -i$mdt_index -c$stripe_count $path" - $LFS setdirstripe -i$mdt_index -c$stripe_count $path + $LFS mkdir -i$mdt_index -c$stripe_count $path || + error "mkdir -i $mdt_index -c$stripe_count $path failed" fi }