bug-coreutils
[Top][All Lists]
Advanced

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

Re: test failures building 5.93 and hpux compiler patch


From: Jim Meyering
Subject: Re: test failures building 5.93 and hpux compiler patch
Date: Wed, 16 Nov 2005 10:30:43 +0100

Peter O'Gorman <address@hidden> wrote:
> Hi,
> I've attached the non-root verbose test failures here and a patch.

Thanks for all of the detailed test output.

The close-stdout failure is due to the fact that HP-UX's (up to and
including 11.23) exec-family functions redirect initially-closed standard
file descriptors to /dev/null even for non-set-ID programs.  That is
contrary to POSIX, which allows that behavior only for set-ID programs.
With their implementation, a command like `cat /etc/passwd 1>&-', which
should fail due to the attempt to write to a closed file descriptor,
mistakenly succeeds, writing its output to /dev/null.

The sort failures all correspond to tests using -c that should
have exited successfully.  Can you use a debugger to see what's
going wrong?

The cp/fail-perm failures are because HPUX appears to fail with EACCES
rather than EPERM.  I've tweaked that test script to accept their
differing diagnostic.  Patch below.  Would you please confirm that
it fixes the problem?

Regarding the date failures, would you please try running a few
of the commands manually, e.g.,
env TZ=UTC+4 ./date -u -d '08/01/97 6:00' '+%D,%H:%M'
./date -u -d '08/01/97 6:00 UTC +4 hours' '+%D,%H:%M'

And this
  env TZ=UTC+1 ./date -u --file=f '+%Y-%m-%d %T'
using an input file, `f' containing these two lines:
1997-01-19 08:17:48
1997-01-19 08:17:48

> The patch may seem a little strange, it is. The HP-UX-10.20 compiler
> does not like 64 bit types in switch statements! The HP-UX-11.00
> compiler crashed when it saw  *copy_into_self |= local_copy_into_self
> and other perfectly valid constructs.
>
> 2005-11-??  Peter O'Gorman <address@hidden>
>
>       * src/nl.c, src/copy.c, src/ptx.c, src/pt.c: Workaround some
>       broken HP-UX compiler issues.

Thanks for all of that work.
Can you get newer versions of those compilers from HP
or use gcc instead?

Is there a strong argument for continuing to use HP's compilers?
I'm very reluctant to make changes like these just to work around
such buggy compilers -- it's a battle you're guaranteed to lose.
If we made a habit of doing that, the sources would have long
since become unmaintainable.

Index: tests/cp/fail-perm
===================================================================
RCS file: /fetish/cu/tests/cp/fail-perm,v
retrieving revision 1.8
diff -u -p -r1.8 fail-perm
--- tests/cp/fail-perm  28 Jun 2004 18:47:24 -0000      1.8
+++ tests/cp/fail-perm  16 Nov 2005 09:07:19 -0000
@@ -45,9 +45,15 @@ cp: accessing `symlink': Permission deni
 EOF
 
 cp F symlink 2> out && fail=1
+# HPUX appears to fail with EACCES rather than EPERM.
+# Transform their diagnostic
+#   ...: The file access permissions do not allow the specified action.
+# to the expected one:
+sed 's/: The file access permissions.*/: Permission denied/'<out>o1;mv o1 out
 cmp out exp || { (diff -c out exp) 2> /dev/null; fail=1; }
 
 cp --target-directory=symlink F 2> out && fail=1
+sed 's/: The file access permissions.*/: Permission denied/'<out>o1;mv o1 out
 cmp out exp || { (diff -c out exp) 2> /dev/null; fail=1; }
 
 chmod 700 D





reply via email to

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