#!/bin/bash
-# -*- mode: Bash; tab-width: 4; indent-tabs-mode: t; -*-
-# vim:shiftwidth=4:softtabstop=4:tabstop=4:
set -e
-# bug number:
-ALWAYS_EXCEPT=" $REPLAY_VBR_EXCEPT"
-
-SAVE_PWD=$PWD
-LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
-SETUP=${SETUP:-}
-CLEANUP=${CLEANUP:-}
MOUNT_2=${MOUNT_2:-"yes"}
-export MULTIOP=${MULTIOP:-multiop}
+
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
. $LUSTRE/tests/test-framework.sh
init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
init_logging
remote_mds_nodsh && log "SKIP: remote MDS with nodsh" && exit 0
+ALWAYS_EXCEPT=" $REPLAY_VBR_EXCEPT"
+
# ~6 (min)"
-[ "$SLOW" = "no" ] && EXCEPT_SLOW="7"
+[ "$SLOW" = "no" ] && EXCEPT_SLOW="7 "
build_test_filter
run_test 7f "unlink, {lost}, rename"
test_7g() {
- first="createmany -o $DIR/$tdir/$tfile- 1; mv $DIR/$tdir/$tfile-0 $DIR/$tdir/$tfile-1"
- lost="mkdir $MOUNT2/$tdir/$tfile-0;rmdir $MOUNT2/$tdir/$tfile-0"
- last="createmany -o $DIR/$tdir/$tfile- 1"
- test_7_cycle "$first" "$lost" "$last" && error "Test 7g.1 failed"
-
- first="createmany -o $DIR/$tdir/$tfile- 2; mv $DIR/$tdir/$tfile-0 $DIR/$tdir/$tfile-1"
- lost="createmany -o $MOUNT2/$tdir/$tfile- 1; rm $MOUNT2/$tdir/$tfile-0"
- last="mkdir $DIR/$tdir/$tfile-0"
- test_7_cycle "$first" "$lost" "$last" && error "Test 7g.2 failed"
-
- first="createmany -o $DIR/$tdir/$tfile- 1; mv $DIR/$tdir/$tfile-0 $DIR/$tdir/$tfile"
- lost="createmany -o $MOUNT2/$tdir/$tfile- 1"
- last="link $DIR/$tdir/$tfile-0 $DIR/$tdir/$tfile-1"
- if [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.5.1) ]
- then
+ first="createmany -o $DIR/$tdir/$tfile- 1; mv $DIR/$tdir/$tfile-0 $DIR/$tdir/$tfile-1"
+ lost="mkdir $MOUNT2/$tdir/$tfile-0;rmdir $MOUNT2/$tdir/$tfile-0"
+ last="createmany -o $DIR/$tdir/$tfile- 1"
+ test_7_cycle "$first" "$lost" "$last" && error "Test 7g.1 failed"
+
+ first="createmany -o $DIR/$tdir/$tfile- 2; mv $DIR/$tdir/$tfile-0 $DIR/$tdir/$tfile-1"
+ lost="createmany -o $MOUNT2/$tdir/$tfile- 1; rm $MOUNT2/$tdir/$tfile-0"
+ last="mkdir $DIR/$tdir/$tfile-0"
+ test_7_cycle "$first" "$lost" "$last" && error "Test 7g.2 failed"
+
+ first="createmany -o $DIR/$tdir/$tfile- 1; mv $DIR/$tdir/$tfile-0 $DIR/$tdir/$tfile"
+ lost="createmany -o $MOUNT2/$tdir/$tfile- 1"
+ last="link $DIR/$tdir/$tfile-0 $DIR/$tdir/$tfile-1"
+ if [ "$MDS1_VERSION" -lt $(version_code 2.5.1) ]; then
test_7_cycle "$first" "$lost" "$last" ||
error "Test 7g.3 failed"
else #LU-4442 LU-3528