Whamcloud - gitweb
LU-3226 test: do some cleanup for sanity.sh test_43a/b 14/6414/3
authorEmoly Liu <emoly.liu@intel.com>
Wed, 10 Apr 2013 02:34:55 +0000 (10:34 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 10 Jul 2013 02:10:28 +0000 (02:10 +0000)
This patch includes the following minor fixes for sanity.sh
test_43a/b:
- to remove multiop after the current test and provide a clean env
for the next test;
- to do some style cleanup.

Test-Parameters: clientdistro=fc18 clientarch=x86_64 serverdistro=el6 serverarch=x86_64 testlist=sanity
Signed-off-by: Liu Ying <emoly.liu@intel.com>
Change-Id: I86221d9dbf1188b553b3c65bb14298e62f19f820
Reviewed-on: http://review.whamcloud.com/6414
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/sanity.sh

index a489aba..47c4f21 100644 (file)
@@ -3352,13 +3352,13 @@ test_43a() {
        test_mkdir -p $DIR/$tdir
        cp -p `which $MULTIOP` $DIR/$tdir/multiop ||
                        cp -p multiop $DIR/$tdir/multiop
        test_mkdir -p $DIR/$tdir
        cp -p `which $MULTIOP` $DIR/$tdir/multiop ||
                        cp -p multiop $DIR/$tdir/multiop
-        MULTIOP_PROG=$DIR/$tdir/multiop multiop_bg_pause $TMP/test43.junk O_c ||
+       MULTIOP_PROG=$DIR/$tdir/multiop multiop_bg_pause $TMP/$tfile.junk O_c ||
                        return 1
         MULTIOP_PID=$!
         $MULTIOP $DIR/$tdir/multiop Oc && error "expected error, got success"
         kill -USR1 $MULTIOP_PID || return 2
         wait $MULTIOP_PID || return 3
                        return 1
         MULTIOP_PID=$!
         $MULTIOP $DIR/$tdir/multiop Oc && error "expected error, got success"
         kill -USR1 $MULTIOP_PID || return 2
         wait $MULTIOP_PID || return 3
-        rm $TMP/test43.junk
+       rm $TMP/$tfile.junk $DIR/$tdir/multiop
 }
 run_test 43a "open(RDWR) of file being executed should return -ETXTBSY"
 
 }
 run_test 43a "open(RDWR) of file being executed should return -ETXTBSY"
 
@@ -3367,13 +3367,13 @@ test_43b() {
        test_mkdir -p $DIR/$tdir
        cp -p `which $MULTIOP` $DIR/$tdir/multiop ||
                        cp -p multiop $DIR/$tdir/multiop
        test_mkdir -p $DIR/$tdir
        cp -p `which $MULTIOP` $DIR/$tdir/multiop ||
                        cp -p multiop $DIR/$tdir/multiop
-        MULTIOP_PROG=$DIR/$tdir/multiop multiop_bg_pause $TMP/test43.junk O_c ||
+       MULTIOP_PROG=$DIR/$tdir/multiop multiop_bg_pause $TMP/$tfile.junk O_c ||
                        return 1
         MULTIOP_PID=$!
         $TRUNCATE $DIR/$tdir/multiop 0 && error "expected error, got success"
         kill -USR1 $MULTIOP_PID || return 2
         wait $MULTIOP_PID || return 3
                        return 1
         MULTIOP_PID=$!
         $TRUNCATE $DIR/$tdir/multiop 0 && error "expected error, got success"
         kill -USR1 $MULTIOP_PID || return 2
         wait $MULTIOP_PID || return 3
-        rm $TMP/test43.junk
+       rm $TMP/$tfile.junk $DIR/$tdir/multiop
 }
 run_test 43b "truncate of file being executed should return -ETXTBSY"
 
 }
 run_test 43b "truncate of file being executed should return -ETXTBSY"