Whamcloud - gitweb
LU-4329 tests: initialize $PREV_RESULT in wait_update() 49/8449/2
authorEmoly Liu <emoly.liu@intel.com>
Wed, 27 Nov 2013 09:25:01 +0000 (17:25 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 11 Dec 2013 07:50:52 +0000 (07:50 +0000)
Initialize variable PREV_RESULT in wait_update() to avoid useless
output like "Changed after 0s: from '' to '1'".

Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: I2aea8547892a36e92e8d0c54ac541397a102e76c
Reviewed-on: http://review.whamcloud.com/8449
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.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/test-framework.sh

index 675e311..5bcd5ba 100644 (file)
@@ -1962,6 +1962,7 @@ wait_update () {
        local sleep=1
        local print=10
 
+       PREV_RESULT=$(do_node $node "$TEST")
        while [ true ]; do
                RESULT=$(do_node $node "$TEST")
                if [[ "$RESULT" == "$FINAL" ]]; then