qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/3] iotests: check: multiprocessing support


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH 3/3] iotests: check: multiprocessing support
Date: Fri, 10 Dec 2021 17:46:03 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0

10.12.2021 17:36, Kevin Wolf wrote:
Am 03.12.2021 um 13:22 hat Vladimir Sementsov-Ogievskiy geschrieben:
Add -j <JOBS> parameter, to run tests in several jobs simultaneously.
For realization - simply utilize multiprocessing.Pool class.

Notes:

1. Of course, tests can't run simultaneously in same TEST_DIR. So,
    use subdirectories TEST_DIR/testname/ and SOCK_DIR/testname/
    instead of simply TEST_DIR and SOCK_DIR

2. multiprocessing.Pool.starmap function doesn't support passing
    context managers, so we can't simply pass "self". Happily, we need
    self only for read-only access, and it just works if it is defined
    in global space. So, add a temporary link TestRunner.shared_self
    during run_tests().

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

Just wondering, is it worth even supporting the mp=false case or can we
simplify the code a bit by always going through multiprocessing and
using nice directory names even if only one process is spawned?

Maybe John's observation that directory names get longer might be a
reason not to do that by default. Any other reasons you're aware of?


I just wanted to keep the behavior without a new option unchanged, to not deal with 
possible CI failures on "make check": who know what multiprocessing brings 
together with performance.

--
Best regards,
Vladimir



reply via email to

[Prev in Thread] Current Thread [Next in Thread]