pspp-dev
[Top][All Lists]
Advanced

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

Re: [PATCH] tests: Avoid nonportable "mktemp" usage.


From: John Darrington
Subject: Re: [PATCH] tests: Avoid nonportable "mktemp" usage.
Date: Mon, 11 Jul 2011 06:45:19 +0000
User-agent: Mutt/1.5.18 (2008-05-17)

This patch looks fine to me.

J'

On Sun, Jul 10, 2011 at 03:52:18PM -0700, Ben Pfaff wrote:
     Jeremy Lavergne <address@hidden> reported that
     mktemp on Mac OS X does not have a -p option.  But I don't see
     a reason to use mktemp at all here, so this commit uses a fixed
     name instead.
     ---
     This works for me.  John, did you have a reason to want to use a random
     name here?  mktemp doesn't generate very interesting file names in any
     case.
     
     diff --git a/tests/libpspp/zip.at b/tests/libpspp/zip.at
     index a725049..55bf563 100644
     --- a/tests/libpspp/zip.at
     +++ b/tests/libpspp/zip.at
     @@ -14,7 +14,7 @@ mkdir -p $dir1
      names=""
      s=1;
      while test $s -le 8192 ; do
     -  name=`mktemp -p $dir1`;
     +  name=$dir1/$s
        dd if=/dev/urandom of=$name count=1 bs=$s 2> /dev/null
        s=$(($s * 2));
        bn=`basename $name`;
     -- 
     1.7.2.5

-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]