Whamcloud - gitweb
LU-5648 tests: a new test to avoid reallocated object IDs 09/13309/3
authorEmoly Liu <emoly.liu@intel.com>
Mon, 12 Jan 2015 02:23:06 +0000 (10:23 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 23 Jan 2015 01:52:14 +0000 (01:52 +0000)
Add test_101 in replay-single.sh to verify that the precreated
objects should not be reassigned to other files after recovery.

Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: If4368a4baa7f9ba72432d5e3558b5a0645d02014
Reviewed-on: http://review.whamcloud.com/13309
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/replay-single.sh

index 3068765..2dfe615 100755 (executable)
@@ -2914,6 +2914,28 @@ test_100b() {
 }
 run_test 100b "DNE: create striped dir, fail MDT0"
 
+test_101() { #LU-5648
+       mkdir -p $DIR/$tdir/d1
+       mkdir -p $DIR/$tdir/d2
+       touch $DIR/$tdir/file0
+       num=1000
+
+       replay_barrier $SINGLEMDS
+       for i in $(seq $num) ; do
+               echo test$i > $DIR/$tdir/d1/file$i
+       done
+
+       fail_abort $SINGLEMDS
+       for i in $(seq $num) ; do
+               touch $DIR/$tdir/d2/file$i
+               test -s $DIR/$tdir/d2/file$i &&
+                       ls -al $DIR/$tdir/d2/file$i && error "file$i's size > 0"
+       done
+
+       rm -rf $DIR/$tdir
+}
+run_test 101 "Shouldn't reassign precreated objs to other files after recovery"
+
 complete $SECONDS
 check_and_cleanup_lustre
 exit_status