X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=inline;f=lustre%2Ftests%2Ftest-framework.sh;h=13d02b91ae2a07cacb9e8e467d0937a29bd43c5e;hb=9804f872d28315a7ddfe835138bb33e2206ffe52;hp=338872336a13793837495b5d3d8a31dae191aa1b;hpb=fabd01968d0fac83e4855da5a5dfe8f68c038ceb;p=fs%2Flustre-release.git diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 3388723..13d02b9 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -370,7 +370,7 @@ module_loaded () { # Load a module on the system where this is running. # -# Synopsis: load_module module_name [module arguments for insmod/modprobe] +# usage: load_module module_name [module arguments for insmod/modprobe] # # If module arguments are not given but MODOPTS_ is set, then its value # will be used as the arguments. Otherwise arguments will be obtained from @@ -5666,27 +5666,6 @@ fi; exit \\\$rc" } -# CMD: determine mds index where directory inode presents -get_mds_dir() { - local dir=$1 - local SEQ - - SEQ=$(lfs path2fid $dir | tr '[:]' ' '|cut -f2 -d ' ') - if [ "$SEQ" == "" ]; then - error "can't get sequence for $dir" - return 1 - fi - export SEQ - - do_facet mds1 "cat /proc/fs/lustre/fld/srv-*-MDT0000/fldb" | \ - tr '[)]:-' ' ' | \ - while read SS EE IDX TYP; do \ - if let "SEQ >= SS && SEQ < EE"; then \ - echo $IDX; \ - fi; \ - done -} - mdsrate_cleanup () { if [ -d $4 ]; then mpi_run ${MACHINEFILE_OPTION} $2 -np $1 ${MDSRATE} --unlink \ @@ -6997,11 +6976,10 @@ precreated_ost_obj_count() local mdt_name="MDT$(printf '%04x' $mdt_idx)" local ost_name="OST$(printf '%04x' $ost_idx)" local proc_path="${FSNAME}-${ost_name}-osc-${mdt_name}" - local last_id=$(do_facet mds${mdt_idx} lctl get_param -n \ + local last_id=$(do_facet mds$((mdt_idx + 1)) lctl get_param -n \ osp.$proc_path.prealloc_last_id) - local next_id=$(do_facet mds${mdt_idx} lctl get_param -n \ + local next_id=$(do_facet mds$((mdt_idx + 1)) lctl get_param -n \ osp.$proc_path.prealloc_next_id) - echo $((last_id - next_id + 1)) }