bug-m4
[Top][All Lists]
Advanced

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

Re: os/2 child process status [was: snapshot in preparation for m4 1.4.1


From: Eric Blake
Subject: Re: os/2 child process status [was: snapshot in preparation for m4 1.4.12]
Date: Mon, 11 Aug 2008 07:12:35 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080708 Thunderbird/2.0.0.16 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Eric Blake on 8/10/2008 10:26 PM:
| | Checking ./182.mkstemp
| ...
| | -1
| | +256
|
| Testsuite bug; I'll have to patch doc/m4.texinfo.  Basically, I cannot
| assume that a failed 'test -f foo-*' exits with status 1, only that it
| exits non-zero.

On further thought, this is a bug in your version of test(1) and not in
the m4 testsuite; POSIX requires test to fail with status 1 if the test
was performed but returned false, and only allows status 255 if there was
a syntax error in parsing the arguments to test.  But it is still worth
working around in the m4 testsuite:

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkigOsMACgkQ84KuGfSFAYClJgCghXuZDmyHysjm58yZ7b8w7f+z
3xMAoKx7+QkIOaNWMJ1dTJubn+x6IMu2
=iV5v
-----END PGP SIGNATURE-----
>From df04f5efba69c99f154009d19fdb9f9205dbc4e0 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Mon, 11 Aug 2008 07:11:32 -0600
Subject: [PATCH] Avoid triggering OS/2 bug in testsuite.

* doc/m4.texinfo (Mkstemp): Don't assume test(1) status is 1.
Reported by Elbert Pol.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog      |    6 ++++++
 doc/m4.texinfo |    2 +-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7d1c5f3..431d637 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-08-11  Eric Blake  <address@hidden>
+
+       Avoid triggering OS/2 bug in testsuite.
+       * doc/m4.texinfo (Mkstemp): Don't assume test(1) status is 1.
+       Reported by Elbert Pol.
+
 2008-08-03  Eric Blake  <address@hidden>
 
        Increase ulimit stack value to be larger than SIGSTKSZ.
diff --git a/doc/m4.texinfo b/doc/m4.texinfo
index 300fb79..1166ff8 100644
--- a/doc/m4.texinfo
+++ b/doc/m4.texinfo
@@ -6420,7 +6420,7 @@ define(`abc', `def')
 maketemp(`foo-abc')
 @result{}foo-def
 @error{}m4:stdin:4: recommend using mkstemp instead
-syscmd(`test -f foo-*')sysval
+syscmd(`test -f foo-*')ifelse(sysval, `0', `0', `1')
 @result{}1
 @end example
 @end ignore
-- 
1.5.6.4


reply via email to

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