From 4d703ee1005cfc4cc1ff2b8dbbf4469de63d240f Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Mon, 16 Aug 2010 13:36:04 -0700 Subject: [PATCH] Make the LD_PRELOAD path absolute in the tests that use it In some situations, libtool will change directories and perform a link step before executing the libtest test app. Since LD_PRELOAD is in effect for this entire process, the path to the binary must be absolute so it will be valid no matter in which directory the app is running. --- tests/data/test1008 | 2 +- tests/data/test1021 | 2 +- tests/data/test1100 | 2 +- tests/data/test150 | 2 +- tests/data/test155 | 2 +- tests/data/test159 | 2 +- tests/data/test169 | 2 +- tests/data/test209 | 2 +- tests/data/test213 | 2 +- tests/data/test239 | 2 +- tests/data/test243 | 2 +- tests/data/test265 | 2 +- tests/data/test267 | 2 +- tests/data/test547 | 2 +- tests/data/test548 | 2 +- tests/data/test555 | 2 +- tests/data/test67 | 2 +- tests/data/test68 | 2 +- tests/data/test69 | 2 +- tests/data/test81 | 2 +- tests/data/test89 | 2 +- tests/data/test90 | 2 +- tests/data/test91 | 2 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/tests/data/test1008 b/tests/data/test1008 index 563a5c0..5334f85 100644 --- a/tests/data/test1008 +++ b/tests/data/test1008 @@ -90,7 +90,7 @@ HTTP proxy CONNECT auth NTLM with chunked-encoded 407 response # we force our own host name, in order to make the test machine independent CURL_GETHOSTNAME=curlhost # we try to use the LD_PRELOAD hack, if not a debug build -LD_PRELOAD=./libtest/.libs/libhostname.so +LD_PRELOAD=%PWD/libtest/.libs/libhostname.so http://test.remote.haxx.se:1008/path/10080002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel diff --git a/tests/data/test1021 b/tests/data/test1021 index 0bc8af3..5ab7728 100644 --- a/tests/data/test1021 +++ b/tests/data/test1021 @@ -99,7 +99,7 @@ HTTP proxy CONNECT with any proxyauth and proxy offers NTLM and close # we force our own host name, in order to make the test machine independent CURL_GETHOSTNAME=curlhost # we try to use the LD_PRELOAD hack, if not a debug build -LD_PRELOAD=./libtest/.libs/libhostname.so +LD_PRELOAD=%PWD/libtest/.libs/libhostname.so http://test.remote.haxx.se:1021/path/10210002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-anyauth --proxytunnel diff --git a/tests/data/test1100 b/tests/data/test1100 index 00bd644..e38c0e0 100644 --- a/tests/data/test1100 +++ b/tests/data/test1100 @@ -74,7 +74,7 @@ HTTP POST with NTLM authorization and following a 302 redirect # we force our own host name, in order to make the test machine independent CURL_GETHOSTNAME=curlhost # we try to use the LD_PRELOAD hack, if not a debug build -LD_PRELOAD=./libtest/.libs/libhostname.so +LD_PRELOAD=%PWD/libtest/.libs/libhostname.so http://%HOSTIP:%HTTPPORT/1100 -u testuser:testpass --ntlm -L -d "stuff to send away" diff --git a/tests/data/test150 b/tests/data/test150 index fc922e2..cdd4cf6 100644 --- a/tests/data/test150 +++ b/tests/data/test150 @@ -61,7 +61,7 @@ HTTP with NTLM authorization and --fail # we force our own host name, in order to make the test machine independent CURL_GETHOSTNAME=curlhost # we try to use the LD_PRELOAD hack, if not a debug build -LD_PRELOAD=./libtest/.libs/libhostname.so +LD_PRELOAD=%PWD/libtest/.libs/libhostname.so http://%HOSTIP:%HTTPPORT/150 -u testuser:testpass --ntlm --fail diff --git a/tests/data/test155 b/tests/data/test155 index 53ee1db..891aa35 100644 --- a/tests/data/test155 +++ b/tests/data/test155 @@ -79,7 +79,7 @@ HTTP PUT with --anyauth authorization (picking NTLM) # we force our own host name, in order to make the test machine independent CURL_GETHOSTNAME=curlhost # we try to use the LD_PRELOAD hack, if not a debug build -LD_PRELOAD=./libtest/.libs/libhostname.so +LD_PRELOAD=%PWD/libtest/.libs/libhostname.so http://%HOSTIP:%HTTPPORT/155 -T log/put155 -u testuser:testpass --anyauth diff --git a/tests/data/test159 b/tests/data/test159 index ede4624..2b9c832 100644 --- a/tests/data/test159 +++ b/tests/data/test159 @@ -60,7 +60,7 @@ HTTP with NTLM authorization when talking HTTP/1.0 # we force our own host name, in order to make the test machine independent CURL_GETHOSTNAME=curlhost # we try to use the LD_PRELOAD hack, if not a debug build -LD_PRELOAD=./libtest/.libs/libhostname.so +LD_PRELOAD=%PWD/libtest/.libs/libhostname.so http://%HOSTIP:%HTTPPORT/159 -u testuser:testpass --ntlm -0 diff --git a/tests/data/test169 b/tests/data/test169 index 5af7f9f..f7419e6 100644 --- a/tests/data/test169 +++ b/tests/data/test169 @@ -85,7 +85,7 @@ HTTP with proxy-requiring-NTLM to site-requiring-Digest # we force our own host name, in order to make the test machine independent CURL_GETHOSTNAME=curlhost # we try to use the LD_PRELOAD hack, if not a debug build -LD_PRELOAD=./libtest/.libs/libhostname.so +LD_PRELOAD=%PWD/libtest/.libs/libhostname.so http://data.from.server.requiring.digest.hohoho.com/169 --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --proxy-ntlm --digest --user digest:alot diff --git a/tests/data/test209 b/tests/data/test209 index e27b6e3..81cdcbd 100644 --- a/tests/data/test209 +++ b/tests/data/test209 @@ -83,7 +83,7 @@ HTTP proxy CONNECT auth NTLM # we force our own host name, in order to make the test machine independent CURL_GETHOSTNAME=curlhost # we try to use the LD_PRELOAD hack, if not a debug build -LD_PRELOAD=./libtest/.libs/libhostname.so +LD_PRELOAD=%PWD/libtest/.libs/libhostname.so http://test.remote.haxx.se:209/path/2090002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel diff --git a/tests/data/test213 b/tests/data/test213 index 8bab387..bb7763b 100644 --- a/tests/data/test213 +++ b/tests/data/test213 @@ -83,7 +83,7 @@ HTTP 1.0 proxy CONNECT auth NTLM and then POST # we force our own host name, in order to make the test machine independent CURL_GETHOSTNAME=curlhost # we try to use the LD_PRELOAD hack, if not a debug build -LD_PRELOAD=./libtest/.libs/libhostname.so +LD_PRELOAD=%PWD/libtest/.libs/libhostname.so http://test.remote.haxx.se:213/path/2130002 --proxy1.0 http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel -d "postit" diff --git a/tests/data/test239 b/tests/data/test239 index e889089..2748100 100644 --- a/tests/data/test239 +++ b/tests/data/test239 @@ -60,7 +60,7 @@ HTTP proxy-auth NTLM and then POST # we force our own host name, in order to make the test machine independent CURL_GETHOSTNAME=curlhost # we try to use the LD_PRELOAD hack, if not a debug build -LD_PRELOAD=./libtest/.libs/libhostname.so +LD_PRELOAD=%PWD/libtest/.libs/libhostname.so http://%HOSTIP:%HTTPPORT/239 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm -d "postit" diff --git a/tests/data/test243 b/tests/data/test243 index 3effb82..d53a437 100644 --- a/tests/data/test243 +++ b/tests/data/test243 @@ -81,7 +81,7 @@ HTTP POST with --proxy-anyauth, picking NTLM # we force our own host name, in order to make the test machine independent CURL_GETHOSTNAME=curlhost # we try to use the LD_PRELOAD hack, if not a debug build -LD_PRELOAD=./libtest/.libs/libhostname.so +LD_PRELOAD=%PWD/libtest/.libs/libhostname.so http://%HOSTIP:%HTTPPORT/243 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-anyauth -d "postit" diff --git a/tests/data/test265 b/tests/data/test265 index e47dbe8..18d20a6 100644 --- a/tests/data/test265 +++ b/tests/data/test265 @@ -86,7 +86,7 @@ HTTP proxy CONNECT auth NTLM and then POST, response-body in the 407 # we force our own host name, in order to make the test machine independent CURL_GETHOSTNAME=curlhost # we try to use the LD_PRELOAD hack, if not a debug build -LD_PRELOAD=./libtest/.libs/libhostname.so +LD_PRELOAD=%PWD/libtest/.libs/libhostname.so http://test.remote.haxx.se:265/path/2650002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel -d "postit" diff --git a/tests/data/test267 b/tests/data/test267 index aa61b35..479031c 100644 --- a/tests/data/test267 +++ b/tests/data/test267 @@ -67,7 +67,7 @@ HTTP POST with NTLM authorization and added custom headers # we force our own host name, in order to make the test machine independent CURL_GETHOSTNAME=curlhost # we try to use the LD_PRELOAD hack, if not a debug build -LD_PRELOAD=./libtest/.libs/libhostname.so +LD_PRELOAD=%PWD/libtest/.libs/libhostname.so http://%HOSTIP:%HTTPPORT/267 -u testuser:testpass --ntlm -d "data" -H "Header1: yes" -H "Header2: no" diff --git a/tests/data/test547 b/tests/data/test547 index 8ac0c9d..d1e2604 100644 --- a/tests/data/test547 +++ b/tests/data/test547 @@ -84,7 +84,7 @@ HTTP proxy auth NTLM with POST data from read callback # we force our own host name, in order to make the test machine independent CURL_GETHOSTNAME=curlhost # we try to use the LD_PRELOAD hack, if not a debug build -LD_PRELOAD=./libtest/.libs/libhostname.so +LD_PRELOAD=%PWD/libtest/.libs/libhostname.so http://test.remote.haxx.se/path/547 http://%HOSTIP:%HTTPPORT s1lly:pers0n diff --git a/tests/data/test548 b/tests/data/test548 index d811fca..c4942e6 100644 --- a/tests/data/test548 +++ b/tests/data/test548 @@ -84,7 +84,7 @@ HTTP proxy auth NTLM with POST data from CURLOPT_POSTFIELDS # we force our own host name, in order to make the test machine independent CURL_GETHOSTNAME=curlhost # we try to use the LD_PRELOAD hack, if not a debug build -LD_PRELOAD=./libtest/.libs/libhostname.so +LD_PRELOAD=%PWD/libtest/.libs/libhostname.so http://test.remote.haxx.se/path/548 http://%HOSTIP:%HTTPPORT s1lly:pers0n diff --git a/tests/data/test555 b/tests/data/test555 index 74dc210..3222345 100644 --- a/tests/data/test555 +++ b/tests/data/test555 @@ -89,7 +89,7 @@ HTTP proxy auth NTLM with POST data from read callback multi-if # we force our own host name, in order to make the test machine independent CURL_GETHOSTNAME=curlhost # we try to use the LD_PRELOAD hack, if not a debug build -LD_PRELOAD=./libtest/.libs/libhostname.so +LD_PRELOAD=%PWD/libtest/.libs/libhostname.so http://test.remote.haxx.se/path/555 http://%HOSTIP:%HTTPPORT s1lly:pers0n diff --git a/tests/data/test67 b/tests/data/test67 index d6d60ef..bfe6edd 100644 --- a/tests/data/test67 +++ b/tests/data/test67 @@ -67,7 +67,7 @@ HTTP with NTLM authorization # we force our own host name, in order to make the test machine independent CURL_GETHOSTNAME=curlhost # we try to use the LD_PRELOAD hack, if not a debug build -LD_PRELOAD=./libtest/.libs/libhostname.so +LD_PRELOAD=%PWD/libtest/.libs/libhostname.so http://%HOSTIP:%HTTPPORT/67 -u testuser:testpass --ntlm diff --git a/tests/data/test68 b/tests/data/test68 index 5b79a7a..10b4429 100644 --- a/tests/data/test68 +++ b/tests/data/test68 @@ -66,7 +66,7 @@ HTTP with NTLM authorization and wrong password # we force our own host name, in order to make the test machine independent CURL_GETHOSTNAME=curlhost # we try to use the LD_PRELOAD hack, if not a debug build -LD_PRELOAD=./libtest/.libs/libhostname.so +LD_PRELOAD=%PWD/libtest/.libs/libhostname.so http://%HOSTIP:%HTTPPORT/68 -u testuser:testpass --ntlm diff --git a/tests/data/test69 b/tests/data/test69 index d6b8de6..441aed7 100644 --- a/tests/data/test69 +++ b/tests/data/test69 @@ -83,7 +83,7 @@ HTTP with NTLM, Basic or Wild-and-crazy authorization # we force our own host name, in order to make the test machine independent CURL_GETHOSTNAME=curlhost # we try to use the LD_PRELOAD hack, if not a debug build -LD_PRELOAD=./libtest/.libs/libhostname.so +LD_PRELOAD=%PWD/libtest/.libs/libhostname.so http://%HOSTIP:%HTTPPORT/69 -u testuser:testpass --anyauth diff --git a/tests/data/test81 b/tests/data/test81 index 47b37e9..0da0bdc 100644 --- a/tests/data/test81 +++ b/tests/data/test81 @@ -66,7 +66,7 @@ HTTP with proxy using NTLM authorization # we force our own host name, in order to make the test machine independent CURL_GETHOSTNAME=curlhost # we try to use the LD_PRELOAD hack, if not a debug build -LD_PRELOAD=./libtest/.libs/libhostname.so +LD_PRELOAD=%PWD/libtest/.libs/libhostname.so http://%HOSTIP:%HTTPPORT/81 --proxy-user testuser:testpass -x http://%HOSTIP:%HTTPPORT --proxy-ntlm diff --git a/tests/data/test89 b/tests/data/test89 index 3512fbe..f348eb6 100644 --- a/tests/data/test89 +++ b/tests/data/test89 @@ -100,7 +100,7 @@ HTTP with NTLM and follow-location # we force our own host name, in order to make the test machine independent CURL_GETHOSTNAME=curlhost # we try to use the LD_PRELOAD hack, if not a debug build -LD_PRELOAD=./libtest/.libs/libhostname.so +LD_PRELOAD=%PWD/libtest/.libs/libhostname.so http://%HOSTIP:%HTTPPORT/89 -u testuser:testpass --ntlm -L diff --git a/tests/data/test90 b/tests/data/test90 index 55c98f4..24a7ff4 100644 --- a/tests/data/test90 +++ b/tests/data/test90 @@ -138,7 +138,7 @@ HTTP with NTLM via --anyauth, and then follow-location with NTLM again # we force our own host name, in order to make the test machine independent CURL_GETHOSTNAME=curlhost # we try to use the LD_PRELOAD hack, if not a debug build -LD_PRELOAD=./libtest/.libs/libhostname.so +LD_PRELOAD=%PWD/libtest/.libs/libhostname.so http://%HOSTIP:%HTTPPORT/90 -u testuser:testpass --anyauth -L diff --git a/tests/data/test91 b/tests/data/test91 index 90ace92..e6f34ae 100644 --- a/tests/data/test91 +++ b/tests/data/test91 @@ -84,7 +84,7 @@ HTTP with NTLM/Negotiate/Basic, anyauth and user with domain, with size 0 # we force our own host name, in order to make the test machine independent CURL_GETHOSTNAME=curlhost # we try to use the LD_PRELOAD hack, if not a debug build -LD_PRELOAD=./libtest/.libs/libhostname.so +LD_PRELOAD=%PWD/libtest/.libs/libhostname.so http://%HOSTIP:%HTTPPORT/91 --anyauth -u mydomain\\myself:secret -- 2.7.4