curl-library
Re: [PATCH 0/2] runtests.pl: Fix LD_PRELOAD with ASAN libs
Date: Fri, 14 Nov 2014 16:22:14 +0100
On Friday 14 November 2014 10:11:34 Tor Arntsen wrote:
> On 13 November 2014 15:45, Peter Wu <peter_at_lekensteyn.nl> wrote:
> > Heya,
> >
> > Another round of patches around the test suite. This time the patches
> > fix tests that run under LD_PRELOAD=libhostname.so and when cURL is
> > built with Address Sanitizer (-fsanitize=address).
> >
> > The first patch ("runtests.pl: simplify command environment handling")
> > actually contains three changes:
> [..]
>
> I would like to check out the patches on my non-Linux build systems.
> Could you re-send the patches as attachments please? The best practice
> is probably to both include as well as attach the diffs.
>
> (The included diffs look fine, it's just that Google (I use gmail to
> read list material due to the high traffic) in their infinite wisdown
> changed the user interface so that it's no longer possible to actually
> save an email to file (it's nearly impossible to copy and paste even,
> and never accurately). Something that worked fine before. But as
> usual, each and every gmail update downgrades the user interface to
> even closer to useless.)
You can find the patches in raw form (with '@' mangled in addresses) at
http://curl.haxx.se/mail/lib-2014-11/0213.html
I also push out changes to
https://github.com/Lekensteyn/curl/compare/master...fix-cmake
Note that I also introduced two bugs with the Text::ParseWords and IPC::Run
replacements. The Text::ParseWords implementation has an issue which is fixed
below (incorporated in the attached patch):
diff --git a/tests/runtests.pl b/tests/runtests.pl
index 265b9f8..b465ae9 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -563,5 +563,5 @@ sub cmd_tostring {
# Splits a shell command into an array that can be passed to exec.
sub splitcmd {
- shift;
+ my $cmdline = shift;
my @args;
my $arg;
@@ -569,5 +569,5 @@ sub splitcmd {
# Text::ParseWords is broken in this regards as it converts "\{\}\n" to
# "{}n" instead of keeping the backslashes here.
- while (/
+ while ($cmdline =~ /
# Double quote
(")((?:[^\\"]+|\\.)*)"|
The other bug is in the redirection of stdout/stderr to a variable. The output
is redirected to a scalar reference... but since the process has forked, there
is no way that this output is available to the caller. I am working on a fix for
this. Hopefully these bugs did not waste your time.
For reference, this is my test output (runtests.pl -n -a -k) with these patches:
TESTDONE: 489 tests out of 489 reported OK: 100%
TESTDONE: 955 tests were considered during 398 seconds.
TESTINFO: 466 tests were skipped due to these restraints:
TESTINFO: "curl lacks debug support" 76 times (67, 68, 69, 81, 89, 90, 91, 150, 155 and 67 more)
TESTINFO: "failed starting SMTP server" 38 times (900, 901, 902, 903, 904, 905, 908, 909, 910 and 29 more)
TESTINFO: "failed starting TFTP server" 13 times (271, 283, 284, 285, 286, 1007, 1009, 1049, 1093 and 4 more)
TESTINFO: "failed starting IMAP server" 33 times (800, 801, 802, 803, 804, 805, 806, 807, 808 and 24 more)
TESTINFO: "configured as DISABLED" 8 times (594, 836, 882, 938, 1209, 1211, 1316, 1512)
TESTINFO: "curl lacks TrackMemory support" 2 times (96, 558)
TESTINFO: "curl lacks large_file support" 3 times (99, 1044, 1063)
TESTINFO: "no stunnel" 28 times (300, 301, 302, 303, 304, 305, 306, 307, 308 and 19 more)
TESTINFO: "failed starting HTTP-pipe server" 4 times (1900, 1901, 1902, 1903)
TESTINFO: "failed starting FTP-IPv6 server" 6 times (252, 253, 254, 255, 1048, 1050)
TESTINFO: "curl lacks Metalink support" 16 times (2005, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 and 7 more)
TESTINFO: "curl lacks unittest support" 16 times (1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308 and 7 more)
TESTINFO: "curl lacks TLS-SRP support" 5 times (320, 321, 322, 323, 324)
TESTINFO: "failed starting POP3 server" 29 times (850, 851, 852, 853, 854, 855, 856, 857, 858 and 20 more)
TESTINFO: "precheck command error" 2 times (241, 1083)
TESTINFO: "curl lacks NTLM_WB support" 1 times (1310)
TESTINFO: "failed starting FTP server" 186 times (100, 101, 102, 103, 104, 105, 106, 107, 108 and 177 more)
-- Kind regards, Peter https://lekensteyn.nlReceived on 2014-11-14