autoconf-patches
[Top][All Lists]
Advanced

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

Re: a couple of bugs


From: Ralf Wildenhues
Subject: Re: a couple of bugs
Date: Sun, 2 Mar 2008 14:16:01 +0100
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

* Eric Blake wrote on Mon, Dec 17, 2007 at 02:03:22PM CET:
> According to Benoit Sigoure on 12/17/2007 1:04 AM:
> > 
> > ./torture.at:241: ./config.status --file=-:input </dev/null >/dev/full
> > stderr:
> > /tmp/autoconf/tests/testsuite.dir/at-test-source: line 893: /dev/full:
> > Operation not supported
> > 
> > This looks like a tpyo but I checked in the source and it's not, why not
> > use something like /nonexistent/whatever?
> 
> There's a different between a shell failure in being able to create the
> file (the tool under test isn't even run, because the shell errored out
> beforehand), and a write file when writing to an existing device that runs
> out of space.  We really do want the latter, not the former.  So the
> correct fix is to first check whether /dev/full exists and is writable,
> and if not, skip the test, before proceeding on with the attempt to
> redirect tool output into the full device.  Coreutils and m4 head both
> have tests along those lines, which can be used as an example.

Alright, thanks!  I've fixed that with this patch.

Cheers,
Ralf

    * tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS):
    Before using /dev/full, check that it is a writable character
    special device.
    Report by Benoit Sigoure and Eric Blake.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

diff --git a/ChangeLog b/ChangeLog
index 4ff1a7c..199d5fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2008-03-02  Ralf Wildenhues  <address@hidden>
 
+       * tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS):
+       Before using /dev/full, check that it is a writable character
+       special device.
+       Report by Benoit Sigoure and Eric Blake.
+
        Actually test that @configure_input@ is expanded correctly.
        * tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS):
        Actually check generated file contents for the name of the
diff --git a/tests/torture.at b/tests/torture.at
index ec86e22..58785ae 100644
--- a/tests/torture.at
+++ b/tests/torture.at
@@ -239,8 +239,10 @@ AT_CHECK([echo from-stdin | ./config.status --file=file:-],
 AT_CHECK([grep from-stdin file], [], [from-stdin
 ])
 # Force write error creating a file on stdout
-AT_CHECK([./config.status --file=-:input </dev/null >/dev/full],
-        [1], [ignore], [ignore])
+if test -w /dev/full && test -c /dev/full; then
+  AT_CHECK([./config.status --file=-:input </dev/null >/dev/full],
+          [1], [ignore], [ignore])
+fi
 
 # Create a header
 AT_CHECK_CONFIG_CREATION_NOWRITE(header)
@@ -250,8 +252,10 @@ AT_CHECK([./config.status --header=-:input </dev/null],
 AT_CHECK([grep OK stdout], [], [OK
 ])
 # Force write error creating a header on stdout
-AT_CHECK([./config.status --header=-:input </dev/null >/dev/full],
-        [1], [ignore], [ignore])
+if test -w /dev/full && test -c /dev/full; then
+  AT_CHECK([./config.status --header=-:input </dev/null >/dev/full],
+          [1], [ignore], [ignore])
+fi
 
 # Execute a command
 AT_CHECK_CONFIG_CREATION_NOWRITE(command)




reply via email to

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