[Top][All Lists]
[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: |
Dmitry V. Levin |
Subject: |
Re: [PATCH] Fix failure of test 38 when a shell uses $TMPDIR for here-documents. |
Date: |
Wed, 20 Jan 2010 19:18:12 +0300 |
On Wed, Jan 20, 2010 at 05:46:28AM -0700, Eric Blake wrote:
> According to Dmitry V. Levin on 1/19/2010 9:03 AM:
> > * tests/tools.at (autotools and whitespace in file names): Create
> > $TMPDIR before potential use like in other whitespace tests.
> >
> > +
> > + Fix failure of test 38 when a shell uses $TMPDIR for here-documents.
>
> Which shell?
That's patched bash. In Owl and ALT, we patch bash to honor $TMPDIR.
Original bash creates temporary files for here-documents in /tmp/.
> > + # 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.
>
> > - # 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.
Yes, exactly.
--
ldv
pgp0iymFCnp4I.pgp
Description: PGP signature