components/curl/patches/009-runtests.pl.patch
author Yiteng Zhang <yiteng.zhang@oracle.com>
Thu, 20 Aug 2015 02:21:19 -0700
branchs11u2-sru
changeset 4800 5aa28a7db635
permissions -rw-r--r--
20419429 Upgrade curl to version 7.40.0 (add missing files)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4800
5aa28a7db635 20419429 Upgrade curl to version 7.40.0 (add missing files)
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
diff changeset
     1
The various curl NTLM tests try to LD_PRELOAD a test library
5aa28a7db635 20419429 Upgrade curl to version 7.40.0 (add missing files)
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
diff changeset
     2
called .../tests/libtest/.libs/libhostname.so that's been
5aa28a7db635 20419429 Upgrade curl to version 7.40.0 (add missing files)
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
diff changeset
     3
created as a pre-requisite to running the numerous Perl tests.
5aa28a7db635 20419429 Upgrade curl to version 7.40.0 (add missing files)
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
diff changeset
     4
5aa28a7db635 20419429 Upgrade curl to version 7.40.0 (add missing files)
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
diff changeset
     5
This patch adjusts LD_PRELOAD to be LD_PRELOAD_32 or LD_PRELOAD_64
5aa28a7db635 20419429 Upgrade curl to version 7.40.0 (add missing files)
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
diff changeset
     6
depending upong whether we are running the 32 or 64 bit tests.
5aa28a7db635 20419429 Upgrade curl to version 7.40.0 (add missing files)
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
diff changeset
     7
5aa28a7db635 20419429 Upgrade curl to version 7.40.0 (add missing files)
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
diff changeset
     8
As this is Solaris specific, this patch will not be pushed upstream.
5aa28a7db635 20419429 Upgrade curl to version 7.40.0 (add missing files)
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
diff changeset
     9
5aa28a7db635 20419429 Upgrade curl to version 7.40.0 (add missing files)
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
diff changeset
    10
--- tests/runtests.pl.orig	2014-09-10 12:26:52.624143266 -0700
5aa28a7db635 20419429 Upgrade curl to version 7.40.0 (add missing files)
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
diff changeset
    11
+++ tests/runtests.pl	2014-09-10 16:51:13.663390869 -0700
5aa28a7db635 20419429 Upgrade curl to version 7.40.0 (add missing files)
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
diff changeset
    12
@@ -3060,6 +3060,12 @@
5aa28a7db635 20419429 Upgrade curl to version 7.40.0 (add missing files)
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
diff changeset
    13
                             # print "Skipping LD_PRELOAD due to no release shared build\n";
5aa28a7db635 20419429 Upgrade curl to version 7.40.0 (add missing files)
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
diff changeset
    14
                             next;
5aa28a7db635 20419429 Upgrade curl to version 7.40.0 (add missing files)
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
diff changeset
    15
                         }
5aa28a7db635 20419429 Upgrade curl to version 7.40.0 (add missing files)
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
diff changeset
    16
+                        # make this LD_PRELOAD_{bits}
5aa28a7db635 20419429 Upgrade curl to version 7.40.0 (add missing files)
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
diff changeset
    17
+                        open(FP, "/bin/file $content |");
5aa28a7db635 20419429 Upgrade curl to version 7.40.0 (add missing files)
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
diff changeset
    18
+                        my $bits = <FP>;
5aa28a7db635 20419429 Upgrade curl to version 7.40.0 (add missing files)
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
diff changeset
    19
+                        if ($bits =~ /^.+ELF\s(\d\d)-bit.+$/) {
5aa28a7db635 20419429 Upgrade curl to version 7.40.0 (add missing files)
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
diff changeset
    20
+                            $var .= '_'.$1;
5aa28a7db635 20419429 Upgrade curl to version 7.40.0 (add missing files)
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
diff changeset
    21
+                        }
5aa28a7db635 20419429 Upgrade curl to version 7.40.0 (add missing files)
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
diff changeset
    22
                     }
5aa28a7db635 20419429 Upgrade curl to version 7.40.0 (add missing files)
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
diff changeset
    23
                     $ENV{$var} = "$content";
5aa28a7db635 20419429 Upgrade curl to version 7.40.0 (add missing files)
Yiteng Zhang <yiteng.zhang@oracle.com>
parents:
diff changeset
    24
                 }