diff options
author | Karel Zak | 2010-11-23 13:06:46 +0100 |
---|---|---|
committer | Karel Zak | 2011-01-03 12:28:46 +0100 |
commit | 64a2331f6d03fd483820ddacd8c62336b2e7df5c (patch) | |
tree | 355d0c8008875d636949f509a25f0f593e4193c9 /tests/functions.sh | |
parent | libmount: add new debug messages, fix umount return code (diff) | |
download | kernel-qcow2-util-linux-64a2331f6d03fd483820ddacd8c62336b2e7df5c.tar.gz kernel-qcow2-util-linux-64a2331f6d03fd483820ddacd8c62336b2e7df5c.tar.xz kernel-qcow2-util-linux-64a2331f6d03fd483820ddacd8c62336b2e7df5c.zip |
tests: improve libmount context mount and umount test
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests/functions.sh')
-rw-r--r-- | tests/functions.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/functions.sh b/tests/functions.sh index 7c74b0166..70bd45a23 100644 --- a/tests/functions.sh +++ b/tests/functions.sh @@ -86,9 +86,10 @@ function ts_init_core_env { function ts_init_core_subtest_env { TS_NS="$TS_COMPONENT/$TS_TESTNAME-$TS_SUBNAME" TS_OUTPUT="$TS_OUTDIR/$TS_TESTNAME-$TS_SUBNAME" + > $TS_OUTPUT TS_DIFF="$TS_DIFFDIR/$TS_TESTNAME-$TS_SUBNAME" TS_EXPECTED="$TS_TOPDIR/expected/$TS_NS" - TS_MOUNTPOINT="$TS_OUTDIR/${TS_TESTNAME-$TS_SUBNAME}-mnt" + TS_MOUNTPOINT="$TS_OUTDIR/${TS_TESTNAME}-${TS_SUBNAME}-mnt" } function ts_init_env { @@ -191,7 +192,7 @@ function ts_init_suid { function ts_gen_diff { local res=0 - if [ -s $TS_OUTPUT ]; then + if [ -s "$TS_OUTPUT" ]; then diff -u $TS_EXPECTED $TS_OUTPUT > $TS_DIFF [ -s $TS_DIFF ] && res=1 else @@ -203,7 +204,7 @@ function ts_gen_diff { function ts_finalize_subtest { local res=0 - if [ -s $TS_EXPECTED ]; then + if [ -s "$TS_EXPECTED" ]; then ts_gen_diff if [ $? -eq 1 ]; then ts_failed_subtest "$1" |