[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
PATCH: Fix massive IRIX 6 testsuite failures with perl 5.8.0
From: |
Rainer Orth |
Subject: |
PATCH: Fix massive IRIX 6 testsuite failures with perl 5.8.0 |
Date: |
Fri, 16 Aug 2002 22:50:50 +0200 (MEST) |
Building and checking autoconf 2.53 on IRIX 6.2 with perl 5.8.0 revealed
many testsuite failues (131 out of 163 ;-). An example is
% ./testsuite -v -d 3
## ----------------------------- ##
## GNU Autoconf 2.53 test suite. ##
## ----------------------------- ##
3. tools.at:122: testing autoconf --trace: user macros...
tools.at:167: autoconf -t TRACE1 -t TRACE2
tools.at:190: autoconf -t TRACE1:'
[$1], [$2], [$3].'
--- /dev/null Fri Aug 16 21:25:12 2002
+++ /vol/gcc/obj/autoconf-2.53-bug/tests/testsuite.dir/at-stderr Fri Aug
16 21:25:13 2002
@@ -0,0 +1,2 @@
+autom4te: cannot do autom4te.cache/requests: No such file or directory
+ at /vol/gcc/obj/autoconf-2.53-bug/bin/autom4te line 1111
This happens although a system call trace with par clearly shows that
autom4te.cache/requests has been opened and read successfully.
I could finally trace this down to a bug in autom4te: Request::load tested
$! to determine if "do" couldn't open $file. As in C (testing errno
without a previous syscall failure return gives you the error code from the
last failed system call) this is wrong: as explained in perlfunc(1), the
correct idiom to test for "do" read failures is to test whether the "do"
return value is defined:
If "do" cannot read the file, it returns undef and
sets $! to the error.
After the trivial patch (against CVS autoconf) below, make check completes
successfully on mips-sgi-irix6.2 (both with 2.53 and CVS HEAD).
Rainer
Fri Aug 16 19:03:12 2002 Rainer Orth <address@hidden>
* bin/autom4te.in (Request::load): Correctly test for "do" read
failure.
Index: bin/autom4te.in
===================================================================
RCS file: /cvs/autoconf/bin/autom4te.in,v
retrieving revision 1.67
diff -u -p -r1.67 autom4te.in
--- bin/autom4te.in 30 Jul 2002 00:42:58 -0000 1.67
+++ bin/autom4te.in 16 Aug 2002 17:13:21 -0000
@@ -214,7 +214,7 @@ sub load
(my $return) = do "$file";
croak "$me: cannot parse $file: address@hidden" if $@;
- croak "$me: cannot do $file: $!\n" if $!;
+ croak "$me: cannot do $file: $!\n" unless defined $return;
croak "$me: cannot run $file\n" unless $return;
}
- PATCH: Fix massive IRIX 6 testsuite failures with perl 5.8.0,
Rainer Orth <=