components/coreutils/patches/tests-misc-expr.patch
author pkidd <patrick.kidd@oracle.com>
Wed, 06 Apr 2016 10:50:15 -0700
branchs11u3-sru
changeset 5735 e1efaec5fd4c
parent 5249 8a7aa7f8367e
permissions -rw-r--r--
Added tag 0.175.3.8.0.1.0, S11.3SRU8.1 for changeset 173f0c0430a8

The tests/misc/expr test is broken by default in version 8.16.

Looking at the ChangeLog for GNU coreutils 8.19, I found:

2012-04-03  Jim Meyering  <[email protected]>
...
        tests: avoid spurious misc/expr failure on AIX 6.1
        * tests/misc/expr: Avoid spurious failure on AIX 6.1 due to
        differing regexp diagnostic.  Reported by Michael Felt.

If I use the .../tests/misc/expr test script from 8.19, it works fine.
So I've added the 'tests-misc-expr.patch' file to do just that.

---  coreutils-8.16/tests/misc/expr.orig	2012-09-03 07:18:28.214998564 -0700
+++  coreutils-8.16/tests/misc/expr	2012-09-03 07:22:12.547808280 -0700
@@ -140,7 +140,11 @@
      ['bre48', '_ : "a\\{1,x"',
       {ERR => "$prog: Unmatched \\{\n"}, {EXIT => 2}],
      ['bre49', '_ : "a\\{32768\\}"',
-      {ERR => "$prog: Invalid content of \\{\\}\n"}, {EXIT => 2}],
+      {ERR => "$prog: Invalid content of \\{\\}\n"}, {EXIT => 2},
+      # Map AIX-6's different diagnostic to the one we expect:
+      {ERR_SUBST =>
+       's,Regular expression too big,Invalid content of \\\\{\\\\},'},
+      ],
      ['bre50', '_ : "a\\{1,0\\}"',
       {ERR => "$prog: Invalid content of \\{\\}\n"}, {EXIT => 2}],
      ['bre51', '"acabc" : ".*ab\\{0,0\\}c"', {OUT => '2'}],
@@ -171,7 +175,7 @@
     );
 
 # If using big numbers fails, remove all /^bignum-/ tests
-`expr $big_prod '*' $big_prod '*' $big_prod`
+qx!expr $big_prod '*' $big_prod '*' $big_prod!
   or @Tests = grep {$_->[0] !~ /^bignum-/} @Tests;
 
 # Append a newline to end of each expected 'OUT' string.