bug-gnulib
[Top][All Lists]
Advanced

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

Re: z/OS perror test failures due to quirky error handling


From: Bruno Haible
Subject: Re: z/OS perror test failures due to quirky error handling
Date: Wed, 01 Mar 2017 00:48:34 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-64-generic; KDE/5.18.0; x86_64; ; )

Daniel Richard G. wrote:
> Two tests in the Gnulib test suite are currently failing due to z/OS
> idiosyncrasies relating to error messages.
> 
> The first one is test-perror.sh:
> 
>     $ srcdir=/path/to/testdir/gltests /path/to/testdir/gltests/test-perror.sh 
>     test-perror.sh: failed test: result should not contain a number
> 
> The content of the t-perror.tmp file when this failure occurs is
> as follows:
> 
>     EDC5111I Permission denied.
>     EDC8127I Connection timed out.
>     EDC5149I Value Overflow Error.
> 
> I don't understand why the script checks for numbers in the output, but
> the check may need tweaking on this platform.

It tests against numbers in order to catch low-quality implementations that
produce just "error 12". Here's a proposed patch. Please test.

--- a/tests/test-perror.sh
+++ b/tests/test-perror.sh
@@ -2,9 +2,11 @@
 : ${srcdir=.}
 . "$srcdir/init.sh"; path_prepend_ .
 
-# Test NULL prefix. Result should not contain a number.
+# Test NULL prefix. Result should not contain a number, except in lines that
+# start with 'EDC' (IBM z/OS libc produces an error identifier before the
+# error message).
 test-perror 2>&1 >/dev/null | LC_ALL=C tr -d '\r' > t-perror.tmp
-grep '[0-9]' t-perror.tmp > /dev/null \
+grep -v '^EDC' t-perror.tmp | grep '[0-9]' > /dev/null \
   && fail_ "result should not contain a number"
 
 # Test empty prefix. Result should be the same.




reply via email to

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