autoconf-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] Fix failure of test 38 when a shell uses $TMPDIR for here-do


From: Ralf Wildenhues
Subject: Re: [PATCH] Fix failure of test 38 when a shell uses $TMPDIR for here-documents.
Date: Wed, 20 Jan 2010 21:34:29 +0100
User-agent: Mutt/1.5.20 (2009-10-28)

Hello,

* Eric Blake wrote on Wed, Jan 20, 2010 at 01:46:28PM CET:
> According to Dmitry V. Levin on 1/19/2010 9:03 AM:
> >  
> > +  # skip if we cannot create such a file or directory
> > +  AT_CHECK([mkdir "$dir" "$TMPDIR" && touch "$file.in" || exit 77])
> 
> Why not mkdir -p, or even better, AS_MKDIR_P?  That is, if $TMPDIR already
> exists, you've failed this test.

TMPDIR is set prior to this code, to something below the test directory.

> > -  # skip if we cannot create such a file or directory
> > -  AT_CHECK([mkdir "$dir" "$TMPDIR" && test -f "$file.in" || exit 77])
> 
> Oh, I see.  It was code motion, of something that already assumes that
> "$dir" and "$TMPDIR" must not exist prior to that point.

I think to be absolutely safe, the directory should be created before
TMPDIR is set.  AT_CHECK might expand to code that also uses it.

Cheers,
Ralf




reply via email to

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