author | Rich Burridge <rich.burridge@oracle.com> |
Mon, 17 Mar 2014 13:28:32 -0700 | |
branch | s11u1-sru |
changeset 2988 | 83fae5048c6c |
permissions | -rw-r--r-- |
2988
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
1 |
The various curl NTLM tests try to LD_PRELOAD a test library |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
2 |
called .../tests/libtest/.libs/libhostname.so that's been |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
3 |
created as a pre-requisite to running the numerous Perl tests. |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
4 |
|
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
5 |
This patch adjusts LD_PRELOAD to be LD_PRELOAD_32 or LD_PRELOAD_64 |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
6 |
depending upon whether we are running the 32 or 64 bit tests. |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
7 |
|
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
8 |
As this is Solaris specific, this patch will not be pushed upstream. |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
9 |
|
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
10 |
--- tests/runtests.pl.orig 2013-11-18 07:12:48.748872794 -0800 |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
11 |
+++ tests/runtests.pl 2013-11-18 07:15:32.604982653 -0800 |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
12 |
@@ -2405,10 +2405,21 @@ |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
13 |
delete $ENV{$var} if($ENV{$var}); |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
14 |
} |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
15 |
else { |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
16 |
- if(($var =~ /^LD_PRELOAD/) && |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
17 |
- ($debug_build || ($has_shared ne "yes"))) { |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
18 |
- # print "Skipping LD_PRELOAD due to no release shared build\n"; |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
19 |
- next; |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
20 |
+ if($var =~ /^LD_PRELOAD/) { |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
21 |
+ if(exe_ext() && (exe_ext() eq '.exe')) { |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
22 |
+ # print "Skipping LD_PRELOAD due to lack of OS support\n"; |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
23 |
+ next; |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
24 |
+ } |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
25 |
+ if($debug_build || ($has_shared ne "yes")) { |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
26 |
+ # print "Skipping LD_PRELOAD due to no release shared build\n"; |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
27 |
+ next; |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
28 |
+ } |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
29 |
+ # make this LD_PRELOAD_{bits} |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
30 |
+ open(FP, "/bin/file $content |"); |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
31 |
+ my $bits = <FP>; |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
32 |
+ if ($bits =~ /^.+ELF\s(\d\d)-bit.+$/) { |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
33 |
+ $var .= '_'.$1; |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
34 |
+ } |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
35 |
} |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
36 |
$ENV{$var} = "$content"; |
83fae5048c6c
17335413 problem in LIBRARY/CURL
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
37 |
} |