aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2016-03-06 21:44:43 -0500
committerTheodore Ts'o <tytso@mit.edu>2016-03-06 21:44:43 -0500
commit96fae8869cfe393ce680369154a7847247e354ea (patch)
tree59ab21dfb526f9cb2538ec389b9ec1c8ea968cdd /tests
parent6d4bb11487c989de6ab1637c8cc53cad42013c1e (diff)
downloadandroid_external_e2fsprogs-96fae8869cfe393ce680369154a7847247e354ea.tar.gz
android_external_e2fsprogs-96fae8869cfe393ce680369154a7847247e354ea.tar.bz2
android_external_e2fsprogs-96fae8869cfe393ce680369154a7847247e354ea.zip
tests: fix missing cleanup of temporary files
A number of tests weren't properly cleaning their temp files. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/f_uninit_cat/script2
-rw-r--r--tests/j_short_trans_mcsum_64bit/script2
-rw-r--r--tests/j_short_trans_open_recover/script2
-rw-r--r--tests/j_short_trans_recover/script2
-rw-r--r--tests/j_short_trans_recover_mcsum_64bit/script2
-rwxr-xr-xtests/scripts/resize_test3
-rw-r--r--tests/t_replay_and_set/script2
7 files changed, 8 insertions, 7 deletions
diff --git a/tests/f_uninit_cat/script b/tests/f_uninit_cat/script
index 1655bb07..88775660 100755
--- a/tests/f_uninit_cat/script
+++ b/tests/f_uninit_cat/script
@@ -21,7 +21,7 @@ echo "cat /a" >> $TMPFILE.cmd
$DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
echo >> $OUT.new
sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
-rm -rf $OUT.new $TMPFILE
+rm -rf $OUT.new $TMPFILE $TMPFILE.cmd
# Figure out what happened
if cmp -s $EXP $OUT; then
diff --git a/tests/j_short_trans_mcsum_64bit/script b/tests/j_short_trans_mcsum_64bit/script
index 024346aa..034b2370 100644
--- a/tests/j_short_trans_mcsum_64bit/script
+++ b/tests/j_short_trans_mcsum_64bit/script
@@ -44,7 +44,7 @@ echo Exit status is $status >> $OUT.new
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
rm -f $OUT.new
-rm -f $TMPFILE
+rm -f $TMPFILE $TMPFILE.cmd
cmp -s $OUT $EXP
status=$?
diff --git a/tests/j_short_trans_open_recover/script b/tests/j_short_trans_open_recover/script
index 2a016dfa..67136fe6 100644
--- a/tests/j_short_trans_open_recover/script
+++ b/tests/j_short_trans_open_recover/script
@@ -48,7 +48,7 @@ echo Exit status is $status >> $OUT.new
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
rm -f $OUT.new
-rm -f $TMPFILE
+rm -f $TMPFILE $TMPFILE.cmd
cmp -s $OUT $EXP
status=$?
diff --git a/tests/j_short_trans_recover/script b/tests/j_short_trans_recover/script
index 33d23455..e7b49437 100644
--- a/tests/j_short_trans_recover/script
+++ b/tests/j_short_trans_recover/script
@@ -49,7 +49,7 @@ echo Exit status is $status >> $OUT.new
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
rm -f $OUT.new
-rm -f $TMPFILE
+rm -f $TMPFILE $TMPFILE.cmd
cmp -s $OUT $EXP
status=$?
diff --git a/tests/j_short_trans_recover_mcsum_64bit/script b/tests/j_short_trans_recover_mcsum_64bit/script
index b6c8c49f..2c56e0ff 100644
--- a/tests/j_short_trans_recover_mcsum_64bit/script
+++ b/tests/j_short_trans_recover_mcsum_64bit/script
@@ -53,7 +53,7 @@ echo Exit status is $status >> $OUT.new
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
rm -f $OUT.new
-rm -f $TMPFILE
+rm -f $TMPFILE $TMPFILE.cmd
cmp -s $OUT $EXP
status=$?
diff --git a/tests/scripts/resize_test b/tests/scripts/resize_test
index dfd45ac8..3c5e260b 100755
--- a/tests/scripts/resize_test
+++ b/tests/scripts/resize_test
@@ -161,12 +161,13 @@ echo Checksum is $CSUM_2 >> $LOG
rm $OUT_TMP
unset OUT_TMP
+rm -f $TMPFILE
+
if test "$CSUM_1" != "$CSUM_2"
then
return 1
fi
-rm $TMPFILE
return 0
}
diff --git a/tests/t_replay_and_set/script b/tests/t_replay_and_set/script
index 12530999..0be10ea8 100644
--- a/tests/t_replay_and_set/script
+++ b/tests/t_replay_and_set/script
@@ -39,7 +39,7 @@ echo Exit status is $status >> $OUT.new
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
rm -f $OUT.new
-rm -f $TMPFILE
+rm -f $TMPFILE $TMPFILE.cmd
cmp -s $OUT $EXP
status=$?