3 # run tests on different directories at the same time
10 LUSTRE=${LUSTRE:-$(dirname $0)/..}
11 . $LUSTRE/tests/test-framework.sh
15 ALWAYS_EXCEPT="$DNE_SANITY_EXCEPT "
18 PARALLEL_RUNS=${PARALLEL_RUNS:-2}
21 check_and_setup_lustre
27 prepare_running_directories()
33 for i in $(seq $PARALLEL_RUNS); do
34 rm -rf $ORIGIN_DIR/dir$i
35 if [ $MDSCOUNT -gt 1 ]; then
36 mdtidx=$((i % MDSCOUNT))
37 $LFS mkdir -i $mdtidx $ORIGIN_DIR/dir$i || rc=$?
39 mkdir -p $ORIGIN_DIR/dir$i
43 echo "can not create dir$i"
51 prepare_running_directories || error "Can not create running directories"
53 cleanup_running_directories()
58 for i in $(seq $PARALLEL_RUNS); do
59 rm -rf $ORIGIN_DIR/dir$i || rc=$?
67 [ ! -f sanity.sh ] && skip_env "No sanity.sh skipping"
75 for index in $(seq $PARALLEL_RUNS); do
76 DIR=$ORIGIN_DIR/dir${index} PARALLEL=yes \
77 EXT2_DEV="$TMP/SANITY.LOOP_${index}" \
78 LOGDIR="${LOGDIR}_${index}" YAML_LOG="" bash sanity.sh &
80 echo start sanity: $pid
84 echo sanity pids: $rpids
88 echo "pid=$pid rc=$rc"
96 run_test sanity "Run sanity parallel on different directories at the same time"
98 cleanup_running_directories || error "unlink running directories"
101 check_and_cleanup_lustre