Skip to content

Test 1902 is random on AIX #355

Closed
Closed

Description

@trex58

Hi,
Port of Curl 7.43.0 on AIX is OK, except that test 1902 succeeds randomly (2 success out of 50 runs), instead of 100% success on Ubuntu/Intel.

I think that the issue deals with the way the expected data and the generated data are compared.

test 1902...[HTTP GET using pipelining, broken pipe]
1902: data FAILED:
--- log/check-expected 2015-07-24 14:15:47 +0200
+++ log/check-generated 2015-07-24 14:15:47 +0200
@@ -6,9 +6,9 @@
Adding handle 4[LF]
Adding handle 5[LF]
Adding handle 6[LF]
-Handle 1 Completed with status 0[LF]
Handle 4 Completed with status 0[LF]
Handle 5 Completed with status 0[LF]
Handle 6 Completed with status 0[LF]
+Handle 1 Completed with status 0[LF]
Handle 2 Completed with status 0[LF]
Handle 3 Completed with status 0[LF]

Looking at these 2 files, they only differ due to the ordering of the lines, which depends on when each parallel sub-response ends.

Expected:
Handle 1 Completed with status 0[LF]
Handle 4 Completed with status 0[LF]
Handle 5 Completed with status 0[LF]
Handle 6 Completed with status 0[LF]
Handle 2 Completed with status 0[LF]
Handle 3 Completed with status 0[LF]

Generated:
Handle 4 Completed with status 0[LF]
Handle 5 Completed with status 0[LF]
Handle 6 Completed with status 0[LF]
Handle 1 Completed with status 0[LF]
Handle 2 Completed with status 0[LF]
Handle 3 Completed with status 0[LF]

In getpart.pm there is a showdiff routine, which does:
diff -u $file2 $file1 2>/dev/null

Sorting the 2 files log/check-expected log/check-generated
before comparing them does fix the issue.

Activity

  1. bagder commented on Jul 24, 2015

    @bagder
    Member

    It proves the test needs to be adjusted to always run in the same order... :-/

  2. self-assigned this
    on Jul 24, 2015
  3. jay commented on Jul 24, 2015

    @jay
    Member

    hm does it though? As you're well aware of when you have a multi with several requests they will not go done in the same order every time even if it's to the same host. I haven't tested this with pipelining but I assume the principle is the same, the requests are not sequential because they don't have to wait for the reply before the next request (assume optional limitations aside).

    I've noticed that often when I'm looking at PRs I see the tests have failed, and when I go through the logs I can see it's due to tests marked with keyword flaky, usually. So I wonder if maybe the reporter might be on to something here. Certainly flaky is a very generic type of statement but perhaps there is a need for something more narrow, like an out-of-order-ok tag or something?

  4. bagder commented on Jul 25, 2015

    @bagder
    Member

    Well "flaky" is just another word for "needs to be fixed as something makes it unreliable". The test scripts compares what a test spews out with what it is expected to output and we should make sure that successful test runs outputs the presumed data. That would mean that we should make sure our tests always outputs the same things in the same order (if we check for the output). Our multi API does in fact not guarantee that we fire off the requests in the same order the easy handles were added, if they're added on the same millisecond.

    One way to fix this test is to sort the output before it gets compared, another way is probably to not output the data the way it currently gets output.

  5. added a commit that references this issue on Oct 19, 2015
    d4a3bb1
  6. locked as resolved and limited conversation to collaborators on May 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions