[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] build: avoid test failure on HPUX
From: |
Eric Blake |
Subject: |
[PATCH] build: avoid test failure on HPUX |
Date: |
Tue, 12 Mar 2013 17:30:46 -0600 |
POSIX permits implementations to open fd 0, 1, and 2 on exec(), even
when the user tried to close them. HPUX-11.21 is one of the
implementations that does not allow closed standard descriptors,
leading to a failure of test 005.command_li. But a test that makes
sure we behave gracefully in the face of closed standard descriptors
makes no sense on a platform where we can never have them closed, so
add some code to skip the test on "helpful" platforms.
* doc/m4.texi (Command line files): Skip tests on systems where it
is impossible to start with stdin/out closed.
Reported by Gary V. Vaughan.
Signed-off-by: Eric Blake <address@hidden>
---
Gary, I think this will fix the issue you saw, but would like some
confirmation before I push it.
ChangeLog | 5 +++++
doc/m4.texi | 6 ++++++
2 files changed, 11 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 8798406..191a849 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2013-03-12 Eric Blake <address@hidden>
+ build: avoid test failure on HPUX
+ * doc/m4.texi (Command line files): Skip tests on systems where it
+ is impossible to start with stdin/out closed.
+ Reported by Gary V. Vaughan.
+
maint: update to latest gnulib
* gnulib: Update to latest, for mingw compile fixes.
diff --git a/doc/m4.texi b/doc/m4.texi
index b8b1704..5d9bd6f 100644
--- a/doc/m4.texi
+++ b/doc/m4.texi
@@ -993,6 +993,9 @@ Command line files
ifdef(`__unix__', ,
`errprint(` skipping: syscmd does not have unix semantics
')m4exit(`77')')dnl
+syscmd(`cat <&- 2>/dev/null')ifelse(sysval, `0',
+ `errprint(` skipping: system does not allow closing stdin
+')m4exit(`77')')dnl
changequote(`[', `]')dnl
syscmd([echo | ']__program__[' >&-])dnl
@error{}m4: write error: Bad file descriptor
@@ -1004,6 +1007,9 @@ Command line files
ifdef(`__unix__', ,
`errprint(` skipping: syscmd does not have unix semantics
')m4exit(`77')')dnl
+syscmd(`cat <&- 2>/dev/null')ifelse(sysval, `0',
+ `errprint(` skipping: system does not allow closing stdin
+')m4exit(`77')')dnl
changequote(`[', `]')dnl
syscmd([echo 'esyscmd(echo hi >&2 && echo err"print(bye
)d"nl)dnl' > tmp.m4 \
--
1.8.1.4
- [PATCH] build: avoid test failure on HPUX,
Eric Blake <=