autoconf-patches
[Top][All Lists]
Advanced

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

Re: [PATCH 0/2] cleanup $tmp usage


From: Eric Blake
Subject: Re: [PATCH 0/2] cleanup $tmp usage
Date: Mon, 30 Aug 2010 11:58:24 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100806 Fedora/3.1.2-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.2

On 08/30/2010 11:49 AM, Ralf Wildenhues wrote:
Hi Eric,

* Eric Blake wrote on Mon, Aug 30, 2010 at 06:32:37PM CEST:
--- c/tests/torture.at
+++ w/tests/torture.at

+AT_CHECK_MACRO([AC_CONFIG_COMMANDS with temporary directory],
+[[AC_CONFIG_COMMANDS([foo], [
+case $ACTION in
+  use)
+    echo "$tmp">  tmpdir
+    test -d "$tmp" || AC_MSG_ERROR([No $tmp directory])
+    echo garbage-in>  "$tmp/garbage-out"
+    ;;
+  corrupt)
+    echo "$tmp">  tmpdir
+    tmp=/nosuch

This isn't without danger, as two undesirable things can happen when
some code in config.status does try to write to $tmp after this:

Good catch. I think it will be safer to use tmp=./nosuch; patch coming up shortly to make it relative.

--
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org



reply via email to

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