From 402ac7a14083130b5cae6a93ab2c80eddd5871a5 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Tue, 8 May 2018 19:04:41 +0200 Subject: [PATCH] btrfs-progs: tests: update log markers Use visual markers that separate tests and individual commands run via the run_* helpers. Signed-off-by: David Sterba --- tests/cli-tests.sh | 2 +- tests/common | 10 +++++----- tests/convert-tests.sh | 2 +- tests/fsck-tests.sh | 2 +- tests/fuzz-tests.sh | 2 +- tests/misc-tests.sh | 2 +- tests/mkfs-tests.sh | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/cli-tests.sh b/tests/cli-tests.sh index 9e0fbae4..d302a93e 100755 --- a/tests/cli-tests.sh +++ b/tests/cli-tests.sh @@ -52,7 +52,7 @@ do name=$(basename "$i") cd "$i" if [ -x test.sh ]; then - echo "=== Entering $i" >> "$RESULTS" + echo "=== START TEST $i" >> "$RESULTS" echo " [TEST/cli] $name" ./test.sh if [ $? -ne 0 ]; then diff --git a/tests/common b/tests/common index 4b266c5b..7e4e09df 100644 --- a/tests/common +++ b/tests/common @@ -136,7 +136,7 @@ run_check() cmd=$(eval echo "\${$spec}") spec=$(_cmd_spec "${@:$spec}") set -- "${@:1:$(($ins-1))}" $spec "${@: $ins}" - echo "############### $@" >> "$RESULTS" 2>&1 + echo "====== RUN CHECK $@" >> "$RESULTS" 2>&1 if [[ $TEST_LOG =~ tty ]]; then echo "CMD: $@" > /dev/tty; fi if [ "$1" = 'root_helper' ]; then "$@" >> "$RESULTS" 2>&1 || _fail "failed: $@" @@ -158,7 +158,7 @@ run_check_stdout() cmd=$(eval echo "\${$spec}") spec=$(_cmd_spec "${@:$spec}") set -- "${@:1:$(($ins-1))}" $spec "${@: $ins}" - echo "############### $@" >> "$RESULTS" 2>&1 + echo "====== RUN CHECK $@" >> "$RESULTS" 2>&1 if [[ $TEST_LOG =~ tty ]]; then echo "CMD(stdout): $@" > /dev/tty; fi if [ "$1" = 'root_helper' ]; then "$@" 2>&1 | tee -a "$RESULTS" @@ -185,7 +185,7 @@ run_mayfail() cmd=$(eval echo "\${$spec}") spec=$(_cmd_spec "${@:$spec}") set -- "${@:1:$(($ins-1))}" $spec "${@: $ins}" - echo "############### $@" >> "$RESULTS" 2>&1 + echo "====== RUN MAYFAIL $@" >> "$RESULTS" 2>&1 if [[ $TEST_LOG =~ tty ]]; then echo "CMD(mayfail): $@" > /dev/tty; fi if [ "$1" = 'root_helper' ]; then "$@" >> "$RESULTS" 2>&1 @@ -226,7 +226,7 @@ run_mustfail() cmd=$(eval echo "\${$spec}") spec=$(_cmd_spec "${@:$spec}") set -- "${@:1:$(($ins-1))}" $spec "${@: $ins}" - echo "############### $@" >> "$RESULTS" 2>&1 + echo "====== RUN MUSTFAIL $@" >> "$RESULTS" 2>&1 if [[ $TEST_LOG =~ tty ]]; then echo "CMD(mustfail): $@" > /dev/tty; fi if [ "$1" = 'root_helper' ]; then "$@" >> "$RESULTS" 2>&1 @@ -272,7 +272,7 @@ run_mustfail_stdout() cmd=$(eval echo "\${$spec}") spec=$(_cmd_spec "${@:$spec}") set -- "${@:1:$(($ins-1))}" $spec "${@: $ins}" - echo "############### $@" >> "$RESULTS" 2>&1 + echo "====== RUN MUSTFAIL $@" >> "$RESULTS" 2>&1 if [[ $TEST_LOG =~ tty ]]; then echo "CMD(mustfail): $@" > /dev/tty; fi if [ "$1" = 'root_helper' ]; then "$@" 2>&1 > "$tmp_output" diff --git a/tests/convert-tests.sh b/tests/convert-tests.sh index 4bc915db..f6c94043 100755 --- a/tests/convert-tests.sh +++ b/tests/convert-tests.sh @@ -58,7 +58,7 @@ run_one_test() { testname=$(basename "$testdir") echo " [TEST/conv] $testname" cd "$testdir" - echo "=== Entering $testname" >> "$RESULTS" + echo "=== START TEST $testname" >> "$RESULTS" if [ -x test.sh ]; then # Only support custom test scripts ./test.sh diff --git a/tests/fsck-tests.sh b/tests/fsck-tests.sh index 14287bbe..8fbc2b4b 100755 --- a/tests/fsck-tests.sh +++ b/tests/fsck-tests.sh @@ -54,7 +54,7 @@ run_one_test() { testname="$1" echo " [TEST/fsck] $(basename $testname)" cd "$testname" - echo "=== Entering $testname" >> "$RESULTS" + echo "=== START TEST $testname" >> "$RESULTS" if [ -x test.sh ]; then # Type 2 ./test.sh diff --git a/tests/fuzz-tests.sh b/tests/fuzz-tests.sh index 7bc620f0..ae738710 100755 --- a/tests/fuzz-tests.sh +++ b/tests/fuzz-tests.sh @@ -51,7 +51,7 @@ do name=$(basename "$i") cd $i if [ -x test.sh ]; then - echo "=== Entering $i" >> "$RESULTS" + echo "=== START TEST $i" >> "$RESULTS" echo " [TEST/fuzz] $name" ./test.sh if [ $? -ne 0 ]; then diff --git a/tests/misc-tests.sh b/tests/misc-tests.sh index dad397ec..3e7b9e9b 100755 --- a/tests/misc-tests.sh +++ b/tests/misc-tests.sh @@ -57,7 +57,7 @@ for i in $(find "$TEST_TOP/misc-tests" -maxdepth 1 -mindepth 1 -type d \ do echo " [TEST/misc] $(basename $i)" cd "$i" - echo "=== Entering $i" >> "$RESULTS" + echo "=== START TEST $i" >> "$RESULTS" if [ -x test.sh ]; then ./test.sh if [ $? -ne 0 ]; then diff --git a/tests/mkfs-tests.sh b/tests/mkfs-tests.sh index 2ced4ac9..e76a805b 100755 --- a/tests/mkfs-tests.sh +++ b/tests/mkfs-tests.sh @@ -52,7 +52,7 @@ for i in $(find "$TEST_TOP/mkfs-tests" -maxdepth 1 -mindepth 1 -type d \ do echo " [TEST/mkfs] $(basename $i)" cd "$i" - echo "=== Entering $i" >> "$RESULTS" + echo "=== START TEST $i" >> "$RESULTS" if [ -x test.sh ]; then ./test.sh if [ $? -ne 0 ]; then