bug-coreutils
[Top][All Lists]
Advanced

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

Re: 5.96: 3 test failures on HP-UX 11.23


From: Paul Eggert
Subject: Re: 5.96: 3 test failures on HP-UX 11.23
Date: Thu, 01 Jun 2006 00:14:42 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Jim Meyering <address@hidden> writes:

> it's because HP-UX's exec-family functions are not POSIX conforming.

Thanks for explaining this.  The first failure, though, I think is
due to an unportable use of \< and \> in a sed pattern.  And the
other failures can be worked around.  I installed this into the
trunk.  Maybe some of these should go into the 5.9x branch?

2006-06-01  Paul Eggert  <address@hidden>

        Fix some porting problems in the test cases reported by
        Ralf Wildenhues for HP-UX 11.23 in:
        http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00238.html
        * tests/help-version: Don't assume that \< \> works in sed.
        * tests/misc/close-stdout: Don't assume that >&- works.
        Add a /dev/full test.
        * tests/touch/no-create-missing: Don't assume that >&- works.

Index: tests/help-version
===================================================================
RCS file: /fetish/cu/tests/help-version,v
retrieving revision 1.19
diff -p -u -r1.19 help-version
--- tests/help-version  5 Mar 2006 17:28:42 -0000       1.19
+++ tests/help-version  1 Jun 2006 07:07:53 -0000
@@ -42,7 +42,7 @@ scripts to fail, so it is being removed 
 programs checked by this test.
 ************************************************
 EOF
-      all_programs=`echo $all_programs|sed 's/\<groups\> *//'`
+      all_programs=`echo $all_programs | tr ' ' '\n' | grep -v '^groups$'`
     fi
   ;;
 esac
Index: tests/misc/close-stdout
===================================================================
RCS file: /fetish/cu/tests/misc/close-stdout,v
retrieving revision 1.3
diff -p -u -r1.3 close-stdout
--- tests/misc/close-stdout     14 Nov 2004 11:08:22 -0000      1.3
+++ tests/misc/close-stdout     1 Jun 2006 07:07:53 -0000
@@ -42,9 +42,19 @@ sleep 0 >&- || fail=1
 $pwd/../../src/true >&- || fail=1
 $pwd/../../src/printf '' >&- || fail=1
 
-# Ensure these fail, because stdout is closed and they *do*
-# generate output.
-$pwd/../../src/printf 'foo' >&- 2>/dev/null && fail=1
-cp --verbose a b >&- 2>/dev/null && fail=1
+# If >&- works, ensure these fail, because stdout is closed and they
+# *do* generate output.  >&- apparently does not work in HP-UX 11.23.
+# This test is ineffective unless /dev/stdout also works.
+if $pwd/../../src/test -w /dev/stdout >/dev/null &&
+   $pwd/../../src/test ! -w /dev/stdout >&-; then
+  $pwd/../../src/printf 'foo' >&- 2>/dev/null && fail=1
+  cp --verbose a b >&- 2>/dev/null && fail=1
+fi
+
+# Likewise for /dev/full, if /dev/full works.
+if test -w /dev/full && test -c /dev/full; then
+  $pwd/../../src/printf 'foo' >/dev/full 2>/dev/null && fail=1
+  cp --verbose a b >/dev/full 2>/dev/null && fail=1
+fi
 
 (exit $fail); exit $fail
Index: tests/touch/no-create-missing
===================================================================
RCS file: /fetish/cu/tests/touch/no-create-missing,v
retrieving revision 1.5
diff -p -u -r1.5 no-create-missing
--- tests/touch/no-create-missing       26 Sep 2005 23:02:46 -0000      1.5
+++ tests/touch/no-create-missing       1 Jun 2006 07:07:53 -0000
@@ -25,8 +25,15 @@ fail=0
 touch -c no-file > /dev/null 2>&1 || fail=1
 touch -cm no-file > /dev/null 2>&1 || fail=1
 touch -ca no-file > /dev/null 2>&1 || fail=1
-touch -c - >&- 2> /dev/null || fail=1
-touch -cm - >&- 2> /dev/null || fail=1
-touch -ca - >&- 2> /dev/null || fail=1
+
+# If >&- works, test "touch -c -" etc.
+# >&- apparently does not work in HP-UX 11.23.
+# This test is ineffective unless /dev/stdout also works.
+if $pwd/../../src/test -w /dev/stdout >/dev/null &&
+   $pwd/../../src/test ! -w /dev/stdout >&-; then
+  touch -c - >&- 2> /dev/null || fail=1
+  touch -cm - >&- 2> /dev/null || fail=1
+  touch -ca - >&- 2> /dev/null || fail=1
+fi
 
 (exit $fail); exit $fail




reply via email to

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