On Wednesday 01 October 2014 15:02:52 Tim Ruehsen wrote: > On Wednesday 01 October 2014 17:39:37 Darshit Shah wrote: > > Answering in-line > > > > On 10/01, Tim Rühsen wrote: > > >On Wednesday 01 October 2014 15:48:21 Darshit Shah wrote: > > >> Test-proxied-https.px runs perfectly when executed directly but will > > >> *always* fail when executed through make check. > > > > > >Maybe not always. "make check -j4" works here without failure, BUT Wget > > >has > > >to try twice (can be seen in the logs) - which is not how it should be. I > > >did not see this before the rebase/top_srcdir->srcdir change. > > > > > >I'll investigate this after lunch. > > > > Okay, not always. Right now, it worked for me straight out of the box. > > This > > behavior only adds more credence to my claim that there's a race condition > > in the test suite that is affecting the results. > > > > The original log file I sent shows how the test suite takes an exit code > > of > > 256 but there's nothing that supports such an exit from Wget's own output. > > > > >> The print statement at line 18 in Test-proxied-https.px complains about > > >> an > > >> uninitialized variable when the test is executed directly. > > > > > >Just one question: are you talking about Test-proxied-https-auth.px ? > > >Because there is no Test-proxied-https.px here... uah, I forgot to remove > > >a debugging print line (line 18). I'll fix that after lunch. > > > > Yes, I meant Test-proxied-https-auth.px. > > > > >> The Test-iri* tests all fail, *always", when either executed directly > > >> or > > >> when make check is called from the tests/ directory. They execute > > >> successfully when make check is invoked from the root directory of the > > >> repository. Hence, I believe the issue lies in the test suite and not > > >> in > > >> Wget. > > > > > >You are right. 'make check' from the root dir runs Wget with LC_ALL=C > > >while > > >the other two variants use your current locale settings. There is an > > >issue > > >in Wget or the tests itself - that has to be investigated. > > > > I'll try to write the tests in the Python based tests. That should give as > > an answer as to where the problem lies. > > One problem seems starting the test server... of course the perl test suite > has to wait until the server is ready... right now, it looks like this does > not happen. So sometimes, Wget fails for the first time and retries. > > You should be able to reproduce with > $ make check -j4 > $ grep -i retry tests/*.log > > Try this several times and you'll see different outputs from grep. > > An example (tests/Test-cookies-401.log): > Running test Test-cookies-401 > Calling ../src/wget http://localhost:43447/one.txt > http://localhost:43447/two.txt > --2014-10-01 14:55:25-- http://localhost:43447/one.txt > Resolving localhost (localhost)... 127.0.0.1 > Connecting to localhost (localhost)|127.0.0.1|:43447... connected. > HTTP request sent, awaiting response... 401 Forbidden > > Username/Password Authentication Failed. > --2014-10-01 14:55:25-- http://localhost:43447/two.txt > Reusing existing connection to localhost:43447. > HTTP request sent, awaiting response... Read error (Connection reset by > peer) in headers. > Retrying. > > --2014-10-01 14:55:26-- (try: 2) http://localhost:43447/two.txt > Connecting to localhost (localhost)|127.0.0.1|:43447... connected. > HTTP request sent, awaiting response... 200 Ok > Length: 12 > Saving to: 'two.txt' > > 0K 100% 2.23M=0s > > 2014-10-01 14:55:26 (2.23 MB/s) - 'two.txt' saved [12/12] > > FINISHED --2014-10-01 14:55:26-- > Total wall clock time: 1.0s > Downloaded: 1 files, 12 in 0s (2.23 MB/s) > Test successful. > > > This really looks like race - the parallel test suite just enforces the race > to come out more often (as you already mentioned in a previous post). > > I'll come back later with more information...
The perl HTTP server seems to be ok - it has a child/parent sync mechanism which looks good to me. While there might be more than one problem, at least one is the naming of the tests. The name given to HTTPServer->new() should always be unique because is is taken as a temporary working directory. Some tests have wrong name (copy&paste I guess) and thus randomly fail when running in parallel ! Here is a patch to fix this. Tim
From 4a5fd2244545c2c05f40cb7a2dfba7866919d047 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim Rühsen?= <[email protected]> Date: Wed, 1 Oct 2014 16:42:04 +0200 Subject: [PATCH] fixed test suite race conditions due to double usage of names --- tests/ChangeLog | 9 +++++++++ tests/Test--post-file.px | 2 +- tests/Test-N-no-info.px | 2 +- tests/Test-N-smaller.px | 2 +- tests/Test-c-shorter.px | 2 +- tests/Test-proxied-https-auth.px | 2 +- tests/Test-proxy-auth-basic.px | 2 +- 7 files changed, 15 insertions(+), 6 deletions(-) diff --git a/tests/ChangeLog b/tests/ChangeLog index 8b3b2e5..5ec5f0c 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,12 @@ +2014-10-01 Tim Ruehsen <[email protected]> + + * Test--post-file.px: name => "Test--post-file" (fixing race condition) + * Test-N-no-info.px: name => "Test-N-no-info" (fixing race condition) + * Test-N-smaller.px: name => "Test-N-smaller" (fixing race condition) + * Test-c-shorter.px: name => "Test-c-shorter" (fixing race condition) + * Test-proxy-auth-basic.px: name => "Test-proxy-auth-basic" (fixing race condition) + * Test-proxied-https-auth.px: removed debug print line + 2014-09-25 Tim Ruehsen <[email protected]> * Makefile.am: Modified to use parallel test harness diff --git a/tests/Test--post-file.px b/tests/Test--post-file.px index 1212af6..1493858 100755 --- a/tests/Test--post-file.px +++ b/tests/Test--post-file.px @@ -15,7 +15,7 @@ my $expected_error_code = 3; ############################################################################### -my $the_test = HTTPTest->new (name => "Test-missing-file", +my $the_test = HTTPTest->new (name => "Test--post-file", cmdline => $cmdline, errcode => $expected_error_code); exit $the_test->run(); diff --git a/tests/Test-N-no-info.px b/tests/Test-N-no-info.px index 725be81..bd28400 100755 --- a/tests/Test-N-no-info.px +++ b/tests/Test-N-no-info.px @@ -52,7 +52,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-N-current", +my $the_test = HTTPTest->new (name => "Test-N-no-info", input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-N-smaller.px b/tests/Test-N-smaller.px index c89910c..79c3f01 100755 --- a/tests/Test-N-smaller.px +++ b/tests/Test-N-smaller.px @@ -55,7 +55,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-N-current", +my $the_test = HTTPTest->new (name => "Test-N-smaller", input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-c-shorter.px b/tests/Test-c-shorter.px index 64b35e1..bbca4d1 100755 --- a/tests/Test-c-shorter.px +++ b/tests/Test-c-shorter.px @@ -53,7 +53,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-c-partial", +my $the_test = HTTPTest->new (name => "Test-c-shorter", input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, diff --git a/tests/Test-proxied-https-auth.px b/tests/Test-proxied-https-auth.px index 28f147a..cc987ff 100755 --- a/tests/Test-proxied-https-auth.px +++ b/tests/Test-proxied-https-auth.px @@ -15,7 +15,7 @@ if (@ARGV) { } elsif (defined $ENV{srcdir}) { $srcdir = $ENV{srcdir}; } -print "srcdir=",$ENV{srcdir},"\n"; + if (defined $srcdir) { $key_path = "$srcdir/certs/server-key.pem"; $cert_path = "$srcdir/certs/server-cert.pem"; diff --git a/tests/Test-proxy-auth-basic.px b/tests/Test-proxy-auth-basic.px index 909d106..d638976 100755 --- a/tests/Test-proxy-auth-basic.px +++ b/tests/Test-proxy-auth-basic.px @@ -38,7 +38,7 @@ my %expected_downloaded_files = ( ############################################################################### -my $the_test = HTTPTest->new (name => "Test-auth-basic", +my $the_test = HTTPTest->new (name => "Test-proxy-auth-basic", input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, -- 2.1.1
signature.asc
Description: This is a digitally signed message part.
