Commit Graph

2 Commits

Author SHA1 Message Date
Ivan Vecera 08de5e7a59 selftests/tc-testing: implement tdc parallel test run
JIRA: https://issues.redhat.com/browse/RHEL-36218

commit ac9b8293096465914c1a0b778e759333ceac5cd1
Author: Pedro Tammela <pctammela@mojatatu.com>
Date:   Tue Sep 19 10:54:03 2023 -0300

    selftests/tc-testing: implement tdc parallel test run

    Use a Python process pool to run the tests in parallel.
    Not all tests can run in parallel, for instance tests that are not
    namespaced and tests that use netdevsim, as they can conflict with one
    another.

    The code logic will split the tests into serial and parallel.
    For the parallel tests, we build batches of 32 tests and queue each
    batch on the process pool. For the serial tests, they are queued as a
    whole into the process pool, which in turn executes them concurrently
    with the parallel tests.

    Even though the tests serialize on rtnl_lock in the kernel, this feature
    showed results with a ~3x speedup on the wall time for the entire test suite
    running in a VM:
       Before - 4m32.502s
       After - 1m19.202s

    Examples:
       In order to run tdc using 4 processes:
          ./tdc.py -J4 <...>
       In order to run tdc using 1 process:
          ./tdc.py -J1 <...> || ./tdc.py <...>

    Note that the kernel configuration will affect the speed of the tests,
    especially if such configuration slows down process creation and/or
    fork().

    Tested-by: Davide Caratti <dcaratti@redhat.com>
    Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>
    Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
2024-05-14 13:13:18 +02:00
Lucas Bates dfe465d33e tc-testing: Add new TdcResults module
This module includes new classes for tdc to use in keeping track
of test case results, instead of generating and tracking a lengthy
string.

The new module can be extended to support multiple formal
test result formats to be friendlier to automation.

Signed-off-by: Lucas Bates <lucasb@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-12-07 16:39:03 -08:00