components/coreutils/patches/tests-misc-expr.patch
author Rich Burridge <rich.burridge@oracle.com>
Mon, 19 Dec 2016 15:41:53 -0800
branchs11u3-sru
changeset 7509 5f98694fa5a6
parent 5249 8a7aa7f8367e
permissions -rw-r--r--
25216284 problem in UTILITY/TCSH
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5249
8a7aa7f8367e 16575074 stat could support birthtime/crtime on ZFS
Rich Burridge <rich.burridge@oracle.com>
parents: 2399
diff changeset
     1
The tests/misc/expr test is broken by default in version 8.16.
8a7aa7f8367e 16575074 stat could support birthtime/crtime on ZFS
Rich Burridge <rich.burridge@oracle.com>
parents: 2399
diff changeset
     2
8a7aa7f8367e 16575074 stat could support birthtime/crtime on ZFS
Rich Burridge <rich.burridge@oracle.com>
parents: 2399
diff changeset
     3
Looking at the ChangeLog for GNU coreutils 8.19, I found:
8a7aa7f8367e 16575074 stat could support birthtime/crtime on ZFS
Rich Burridge <rich.burridge@oracle.com>
parents: 2399
diff changeset
     4
8a7aa7f8367e 16575074 stat could support birthtime/crtime on ZFS
Rich Burridge <rich.burridge@oracle.com>
parents: 2399
diff changeset
     5
2012-04-03  Jim Meyering  <[email protected]>
8a7aa7f8367e 16575074 stat could support birthtime/crtime on ZFS
Rich Burridge <rich.burridge@oracle.com>
parents: 2399
diff changeset
     6
...
8a7aa7f8367e 16575074 stat could support birthtime/crtime on ZFS
Rich Burridge <rich.burridge@oracle.com>
parents: 2399
diff changeset
     7
        tests: avoid spurious misc/expr failure on AIX 6.1
8a7aa7f8367e 16575074 stat could support birthtime/crtime on ZFS
Rich Burridge <rich.burridge@oracle.com>
parents: 2399
diff changeset
     8
        * tests/misc/expr: Avoid spurious failure on AIX 6.1 due to
8a7aa7f8367e 16575074 stat could support birthtime/crtime on ZFS
Rich Burridge <rich.burridge@oracle.com>
parents: 2399
diff changeset
     9
        differing regexp diagnostic.  Reported by Michael Felt.
8a7aa7f8367e 16575074 stat could support birthtime/crtime on ZFS
Rich Burridge <rich.burridge@oracle.com>
parents: 2399
diff changeset
    10
8a7aa7f8367e 16575074 stat could support birthtime/crtime on ZFS
Rich Burridge <rich.burridge@oracle.com>
parents: 2399
diff changeset
    11
If I use the .../tests/misc/expr test script from 8.19, it works fine.
8a7aa7f8367e 16575074 stat could support birthtime/crtime on ZFS
Rich Burridge <rich.burridge@oracle.com>
parents: 2399
diff changeset
    12
So I've added the 'tests-misc-expr.patch' file to do just that.
8a7aa7f8367e 16575074 stat could support birthtime/crtime on ZFS
Rich Burridge <rich.burridge@oracle.com>
parents: 2399
diff changeset
    13
2399
20c46127e17a PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    14
---  coreutils-8.16/tests/misc/expr.orig	2012-09-03 07:18:28.214998564 -0700
20c46127e17a PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    15
+++  coreutils-8.16/tests/misc/expr	2012-09-03 07:22:12.547808280 -0700
20c46127e17a PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    16
@@ -140,7 +140,11 @@
20c46127e17a PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    17
      ['bre48', '_ : "a\\{1,x"',
20c46127e17a PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    18
       {ERR => "$prog: Unmatched \\{\n"}, {EXIT => 2}],
20c46127e17a PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    19
      ['bre49', '_ : "a\\{32768\\}"',
20c46127e17a PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    20
-      {ERR => "$prog: Invalid content of \\{\\}\n"}, {EXIT => 2}],
20c46127e17a PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    21
+      {ERR => "$prog: Invalid content of \\{\\}\n"}, {EXIT => 2},
20c46127e17a PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    22
+      # Map AIX-6's different diagnostic to the one we expect:
20c46127e17a PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    23
+      {ERR_SUBST =>
20c46127e17a PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    24
+       's,Regular expression too big,Invalid content of \\\\{\\\\},'},
20c46127e17a PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    25
+      ],
20c46127e17a PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    26
      ['bre50', '_ : "a\\{1,0\\}"',
20c46127e17a PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    27
       {ERR => "$prog: Invalid content of \\{\\}\n"}, {EXIT => 2}],
20c46127e17a PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    28
      ['bre51', '"acabc" : ".*ab\\{0,0\\}c"', {OUT => '2'}],
20c46127e17a PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    29
@@ -171,7 +175,7 @@
20c46127e17a PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    30
     );
20c46127e17a PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    31
 
20c46127e17a PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    32
 # If using big numbers fails, remove all /^bignum-/ tests
20c46127e17a PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    33
-`expr $big_prod '*' $big_prod '*' $big_prod`
20c46127e17a PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    34
+qx!expr $big_prod '*' $big_prod '*' $big_prod!
20c46127e17a PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    35
   or @Tests = grep {$_->[0] !~ /^bignum-/} @Tests;
20c46127e17a PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    36
 
20c46127e17a PSARC 2012/170 GNU coreutils 8.16
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    37
 # Append a newline to end of each expected 'OUT' string.