Skip to content

Parallel test suite execution causes test to segfault and fail #8

Description

@enter-github-username

Hey,

running the test suite in parallel via the -j<number of tests to run in parallel> flag of make currently sometimes leads to test failures, as testwrapper-testlwes-event-printing-listener becomes flaky.

Here is the log file of testwrapper-testlwes-event-printing-listener when it fails:

read of 0 chars, total 0 read [] when expecting 957 for [TypeChecker[15]
{
        anIPAddress = 224.0.0.100;
        anInt16 = -1;
        anInt64 = -1;
        ReceiptTime = �������������;
        SenderIP = ���������;
        aUInt32 = 4294967295;
        string_null_array = [ , "a", , "ccc",  ];
        aUInt16 = 65535;
        aUInt64 = 18446744073709551615;
        SenderPort = �����;
        uint16_array = [ 123, 234, 345 ];
        aBoolean = true;
        aString = "http://www.test.com";
        string_array = [ "a", "bb", "ccc", "d" ];
        anInt32 = -1;
}
ArrayTestEvent[16]
{
        end = "This is the end field.";
        uint16Ar = [ 1, 2, 3, 5, 7, 11, 13 ];
        ReceiptTime = �������������;
        stringNAr = [ "a", , "bb", , "ccc", , "dddd",  ];
        SenderIP = ���������;
        x_svc_versions = "gateway/11.117.0";
        e_version = 90136;
        stringAr = [ "won", "too", "Free", "for" ];
        x_app_name = "gateway";
        start = "This is the start field.";
        e_id = -6772852554325794715;
        SenderPort = �����;
        bite = 42;
        floating = 602000017271895229464576.000000;
        uint16NAr = [ 1, 2, , 3, , 5, , 7, , , , 11, , 13 ];
        dub = 3.141593;
}
]
testlwes-event-printing-listener: testlwes-event-printing-listener.c:204: read_and_compare: Assertion `n == 1 || (fprintf (stderr, "read of %d chars, total %d read [%s] when " "expecting %d for [%s]\n", n, j, tmpline, num_to_read, data), 0)' failed.
Aborted (core dumped)
FAIL testwrapper-testlwes-event-printing-listener (exit status: 134)

I'm not totally sure what the exact reason for the failure is, but I guess it is caused by the tests using the same port (9111). If they run at the same time, this may cause the tests testwrapper-testlwes-event-counting-listener and testwrapper-testlwes-event-printing-listener to interfere with each other.

Metadata

Metadata

Assignees

No one assigned

    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