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>
debian
Theodore Ts'o 2016-03-06 21:44:43 -05:00
parent 6d4bb11487
commit 96fae8869c
7 changed files with 8 additions and 7 deletions

View File

@ -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

View File

@ -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=$?

View File

@ -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=$?

View File

@ -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=$?

View File

@ -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=$?

View File

@ -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
}

View File

@ -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=$?