Re: [PATCH] tests: for mktemp the exes must be the final characters of the name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jun 4, 2014, at 6:28 AM, Benno Schulenberg <bensberg@xxxxxxxxxxxxx> wrote:
> Signed-off-by: Benno Schulenberg <bensberg@xxxxxxxxxxxxx>
> ---
> tests/scripts/resize_test |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/tests/scripts/resize_test b/tests/scripts/resize_test
> index c9a7a1c..1e5756c 100755
> --- a/tests/scripts/resize_test
> +++ b/tests/scripts/resize_test
> @@ -21,7 +21,7 @@ if truncate -s $SIZE_2 $TMPFILE 2> /dev/null; then
> 	echo "using $TMPFILE" >> $LOG
> else
> 	rm $TMPFILE
> -	export TMPFILE=$(TMPDIR=. mktemp -t $test_name.XXXXXX.tmp)
> +	export TMPFILE=$(TMPDIR=. mktemp -t $test_name.tmp.XXXXXX)

The goal was that the temporary file ended with ".tmp" so that it would
be removed by "make clean" in case the test fails or is interrupted, so
it would be good to update the "make clean" rules to find these files.

I also notice that there are occasional e2fsprogs-tmp.XXXXXX files left
behind in /tmp after testing, and it would be nice if they contained the
test name so they can be found if there is a problem.

It looks like the same could be done in tests/test_one.in:

TMPFILE=$(mktemp -t e2fsprogs-$test_name.tmp.XXXXXX)


Cheers, Andreas





Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux