Whamcloud - gitweb
LU-2559 tests: enable "slow" lustre-rsync tests
authorAndreas Dilger <andreas.dilger@intel.com>
Wed, 30 Jan 2013 20:42:18 +0000 (13:42 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 6 Jun 2013 01:44:17 +0000 (21:44 -0400)
The "SLOW=yes" tests that are disabled in lustre-rsync-test.sh
appear to only be taking about 1-2 minutes each, and are always
passing in the "full" test runs on master.

It won't impact testing throughput significantly to enable them
even for review builds.  It increases overall test time by about
10 minutes in total, but improves our test coverage noticeably.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Iccec870c8b0936aa9e4532da6e8bde2d991ccab0
Reviewed-on: http://review.whamcloud.com/5214
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/lustre-rsync-test.sh

index 9e0da83..416ced3 100644 (file)
@@ -12,13 +12,14 @@ SRCDIR=`dirname $0`
 export PATH=$PWD/$SRCDIR:$SRCDIR:$PWD/$SRCDIR/../utils:$PATH:/sbin
 
 ONLY=${ONLY:-"$*"}
 export PATH=$PWD/$SRCDIR:$SRCDIR:$PWD/$SRCDIR/../utils:$PATH:/sbin
 
 ONLY=${ONLY:-"$*"}
-[ -n "$ONLY" ] && SLOW=yes
 ALWAYS_EXCEPT="$LRSYNC_EXCEPT"
 # bug number for skipped test:
 # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
 
 ALWAYS_EXCEPT="$LRSYNC_EXCEPT"
 # bug number for skipped test:
 # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
 
-[ "$ALWAYS_EXCEPT$EXCEPT" ] && \
-        echo "Skipping tests: `echo $ALWAYS_EXCEPT $EXCEPT`"
+[ "$SLOW" = "no" ] && EXCEPT_SLOW=""
+
+[ "$ALWAYS_EXCEPT$EXCEPT" ] &&
+       echo "Skipping tests: `echo $ALWAYS_EXCEPT $EXCEPT`"
 
 KILL=/bin/kill
 
 
 KILL=/bin/kill
 
@@ -208,12 +209,11 @@ run_test 1 "Simple Replication"
 
 # Test 2a - Replicate files created by dbench
 test_2a() {
 
 # Test 2a - Replicate files created by dbench
 test_2a() {
-    [ "$SLOW" = "no" ] && skip "Skipping slow test" && return
-    init_src
-    init_changelog
+       init_src
+       init_changelog
 
 
-    # Run dbench
-    sh rundbench -C -D $DIR/$tdir 2 -t $DBENCH_TIME || error "dbench failed!"
+       # Run dbench
+       sh rundbench -C -D $DIR/$tdir 2 -t $DBENCH_TIME || error "dbench failed"
 
        local LRSYNC_LOG=$(generate_logname "lrsync_log")
        # Replicate the changes to $TGT
 
        local LRSYNC_LOG=$(generate_logname "lrsync_log")
        # Replicate the changes to $TGT
@@ -224,28 +224,26 @@ test_2a() {
        check_diff $DIR/$tdir $TGT/$tdir
        check_diff $DIR/$tdir $TGT2/$tdir
 
        check_diff $DIR/$tdir $TGT/$tdir
        check_diff $DIR/$tdir $TGT2/$tdir
 
-    fini_changelog
-    cleanup_src_tgt
-    return 0
+       fini_changelog
+       cleanup_src_tgt
+       return 0
 }
 run_test 2a "Replicate files created by dbench."
 
 
 # Test 2b - Replicate files changed by dbench.
 test_2b() {
 }
 run_test 2a "Replicate files created by dbench."
 
 
 # Test 2b - Replicate files changed by dbench.
 test_2b() {
-    [ "$SLOW" = "no" ] && skip "Skipping slow test" && return
+       init_src
+       init_changelog
 
 
-    init_src
-    init_changelog
+       # Run dbench
+       sh rundbench -C -D $DIR/$tdir 2 -t $DBENCH_TIME &
+       sleep 20
 
 
-    # Run dbench
-    sh rundbench -C -D $DIR/$tdir 2 -t $DBENCH_TIME &
-    sleep 20
-
-    local child_pid=$(pgrep dbench)
-    echo PIDs: $child_pid
-    echo Stopping dbench
-    $KILL -SIGSTOP $child_pid
+       local child_pid=$(pgrep dbench)
+       echo PIDs: $child_pid
+       echo Stopping dbench
+       $KILL -SIGSTOP $child_pid
 
        local LRSYNC_LOG=$(generate_logname "lrsync_log")
        echo Starting replication
 
        local LRSYNC_LOG=$(generate_logname "lrsync_log")
        echo Starting replication
@@ -283,12 +281,11 @@ run_test 2b "Replicate files changed by dbench."
 
 # Test 2c - Replicate files while dbench is running
 test_2c() {
 
 # Test 2c - Replicate files while dbench is running
 test_2c() {
-    [ "$SLOW" = "no" ] && skip "Skipping slow test" && return
-    init_src
-    init_changelog
+       init_src
+       init_changelog
 
 
-    # Run dbench
-    sh rundbench -C -D $DIR/$tdir 2 -t $DBENCH_TIME &
+       # Run dbench
+       sh rundbench -C -D $DIR/$tdir 2 -t $DBENCH_TIME &
 
        local LRSYNC_LOG=$(generate_logname "lrsync_log")
        # Replicate the changes to $TGT
 
        local LRSYNC_LOG=$(generate_logname "lrsync_log")
        # Replicate the changes to $TGT
@@ -310,21 +307,19 @@ test_2c() {
        check_diff $DIR/$tdir $TGT/$tdir
        check_diff $DIR/$tdir $TGT2/$tdir
 
        check_diff $DIR/$tdir $TGT/$tdir
        check_diff $DIR/$tdir $TGT2/$tdir
 
-    fini_changelog
-    cleanup_src_tgt
-    return 0
+       fini_changelog
+       cleanup_src_tgt
+       return 0
 }
 run_test 2c "Replicate files while dbench is running."
 
 # Test 3a - Replicate files created by createmany
 test_3a() {
 }
 run_test 2c "Replicate files while dbench is running."
 
 # Test 3a - Replicate files created by createmany
 test_3a() {
-    [ "$SLOW" = "no" ] && skip "Skipping slow test" && return
+       init_src
+       init_changelog
 
 
-    init_src
-    init_changelog
-
-    local numfiles=1000
-    createmany -o $DIR/$tdir/$tfile $numfiles || error "createmany failed!"
+       local numfiles=1000
+       createmany -o $DIR/$tdir/$tfile $numfiles || error "createmany failed"
 
        local LRSYNC_LOG=$(generate_logname "lrsync_log")
        # Replicate the changes to $TGT
 
        local LRSYNC_LOG=$(generate_logname "lrsync_log")
        # Replicate the changes to $TGT
@@ -333,23 +328,22 @@ test_3a() {
        check_diff $DIR/$tdir $TGT/$tdir
        check_diff $DIR/$tdir $TGT2/$tdir
 
        check_diff $DIR/$tdir $TGT/$tdir
        check_diff $DIR/$tdir $TGT2/$tdir
 
-    fini_changelog
-    cleanup_src_tgt
-    return 0
+       fini_changelog
+       cleanup_src_tgt
+       return 0
 }
 run_test 3a "Replicate files created by createmany"
 
 
 # Test 3b - Replicate files created by writemany
 test_3b() {
 }
 run_test 3a "Replicate files created by createmany"
 
 
 # Test 3b - Replicate files created by writemany
 test_3b() {
-    [ "$SLOW" = "no" ] && skip "Skipping slow test" && return
-
-    init_src
-    init_changelog
+       init_src
+       init_changelog
 
 
-    local time=60
-    local threads=5
-    writemany -q -a $DIR/$tdir/$tfile $time $threads || error "writemany failed!"
+       local time=60
+       local threads=5
+       writemany -q -a $DIR/$tdir/$tfile $time $threads ||
+               error "writemany failed"
 
        local LRSYNC_LOG=$(generate_logname "lrsync_log")
        # Replicate the changes to $TGT
 
        local LRSYNC_LOG=$(generate_logname "lrsync_log")
        # Replicate the changes to $TGT
@@ -359,22 +353,20 @@ test_3b() {
        check_diff $DIR/$tdir $TGT/$tdir
        check_diff $DIR/$tdir $TGT2/$tdir
 
        check_diff $DIR/$tdir $TGT/$tdir
        check_diff $DIR/$tdir $TGT2/$tdir
 
-    fini_changelog
-    cleanup_src_tgt
-    return 0
+       fini_changelog
+       cleanup_src_tgt
+       return 0
 }
 run_test 3b "Replicate files created by writemany"
 
 # Test 3c - Replicate files created by createmany/unlinkmany
 test_3c() {
 }
 run_test 3b "Replicate files created by writemany"
 
 # Test 3c - Replicate files created by createmany/unlinkmany
 test_3c() {
-    [ "$SLOW" = "no" ] && skip "Skipping slow test" && return
-
-    init_src
-    init_changelog
+       init_src
+       init_changelog
 
 
-    local numfiles=1000
-    createmany -o $DIR/$tdir/$tfile $numfiles || error "createmany failed!"
-    unlinkmany $DIR/$tdir/$tfile $numfiles || error "unlinkmany failed!"
+       local numfiles=1000
+       createmany -o $DIR/$tdir/$tfile $numfiles || error "createmany failed"
+       unlinkmany $DIR/$tdir/$tfile $numfiles || error "unlinkmany failed"
 
        local LRSYNC_LOG=$(generate_logname "lrsync_log")
        # Replicate the changes to $TGT
 
        local LRSYNC_LOG=$(generate_logname "lrsync_log")
        # Replicate the changes to $TGT
@@ -383,16 +375,14 @@ test_3c() {
        check_diff $DIR/$tdir $TGT/$tdir
        check_diff $DIR/$tdir $TGT2/$tdir
 
        check_diff $DIR/$tdir $TGT/$tdir
        check_diff $DIR/$tdir $TGT2/$tdir
 
-    fini_changelog
-    cleanup_src_tgt
-    return 0
+       fini_changelog
+       cleanup_src_tgt
+       return 0
 }
 run_test 3c "Replicate files created by createmany/unlinkmany"
 
 # Test 4 - Replicate files created by iozone
 test_4() {
 }
 run_test 3c "Replicate files created by createmany/unlinkmany"
 
 # Test 4 - Replicate files created by iozone
 test_4() {
-    [ "$SLOW" = "no" ] && skip "Skipping slow test" && return
-
     which iozone > /dev/null 2>&1
     if [ $? -ne 0 ]; then
        skip "iozone not found. Skipping test"
     which iozone > /dev/null 2>&1
     if [ $? -ne 0 ]; then
        skip "iozone not found. Skipping test"
@@ -444,13 +434,11 @@ run_test 4 "Replicate files created by iozone"
 
 # Test 5a - Stop / start lustre_rsync
 test_5a() {
 
 # Test 5a - Stop / start lustre_rsync
 test_5a() {
-    [ "$SLOW" = "no" ] && skip "Skipping slow test" && return
-
-    init_src
-    init_changelog
+       init_src
+       init_changelog
 
 
-    NUMTEST=2000
-    createmany -o $DIR/$tdir/$tfile $NUMTEST
+       NUMTEST=2000
+       createmany -o $DIR/$tdir/$tfile $NUMTEST
 
        # Replicate the changes to $TGT
        local LRSYNC_LOG=$(generate_logname "lrsync_log")
 
        # Replicate the changes to $TGT
        local LRSYNC_LOG=$(generate_logname "lrsync_log")
@@ -465,21 +453,19 @@ test_5a() {
        check_diff $DIR/$tdir $TGT/$tdir
        check_diff $DIR/$tdir $TGT2/$tdir
 
        check_diff $DIR/$tdir $TGT/$tdir
        check_diff $DIR/$tdir $TGT2/$tdir
 
-    fini_changelog
-    cleanup_src_tgt
-    return 0
+       fini_changelog
+       cleanup_src_tgt
+       return 0
 }
 run_test 5a "Stop / start lustre_rsync"
 
 # Test 5b - Kill / restart lustre_rsync
 test_5b() {
 }
 run_test 5a "Stop / start lustre_rsync"
 
 # Test 5b - Kill / restart lustre_rsync
 test_5b() {
-    [ "$SLOW" = "no" ] && skip "Skipping slow test" && return
+       init_src
+       init_changelog
 
 
-    init_src
-    init_changelog
-
-    NUMTEST=2000
-    createmany -o $DIR/$tdir/$tfile $NUMTEST
+       NUMTEST=2000
+       createmany -o $DIR/$tdir/$tfile $NUMTEST
 
        # Replicate the changes to $TGT
        local LRSYNC_LOG=$(generate_logname "lrsync_log")
 
        # Replicate the changes to $TGT
        local LRSYNC_LOG=$(generate_logname "lrsync_log")
@@ -494,9 +480,9 @@ test_5b() {
        check_diff $DIR/$tdir $TGT/$tdir
        check_diff $DIR/$tdir $TGT2/$tdir
 
        check_diff $DIR/$tdir $TGT/$tdir
        check_diff $DIR/$tdir $TGT2/$tdir
 
-    fini_changelog
-    cleanup_src_tgt
-    return 0
+       fini_changelog
+       cleanup_src_tgt
+       return 0
 }
 run_test 5b "Kill / restart lustre_rsync"
 
 }
 run_test 5b "Kill / restart lustre_rsync"