[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [kvm-unit-tests PATCH v2 2/2] run_tests: allow run test
From: |
Radim Krčmář |
Subject: |
Re: [Qemu-devel] [kvm-unit-tests PATCH v2 2/2] run_tests: allow run tests in parallel |
Date: |
Wed, 4 Jan 2017 16:09:39 +0100 |
2017-01-03 18:10+0800, Peter Xu:
> run_task.sh is getting slow. This patch is trying to make it faster by
> running the tests concurrently.
>
> We provide a new parameter "-j" for the run_tests.sh, which can be used
> to specify how many run queues we want for the tests. Default queue
> length is 1, which is the old behavior.
>
> Quick test on my laptop (4 cores, 2 threads each) shows 3x speed boost:
>
> |-----------------+-----------|
> | command | time used |
> |-----------------+-----------|
> | run_test.sh | 75s |
> | run_test.sh -j8 | 27s |
> |-----------------+-----------|
>
> Suggested-by: Radim Krčmář <address@hidden>
> Signed-off-by: Peter Xu <address@hidden>
> ---
> run_tests.sh | 12 ++++++++++--
> scripts/functions.bash | 15 ++++++++++++++-
> scripts/global.bash | 11 +++++++++++
> 3 files changed, 35 insertions(+), 3 deletions(-)
I like this diffstat a lot more, thanks :)
The script doesn't handle ^C well now (at least), which can be worked
around with
trap exit SIGINT
but it would be nice to know if receiving signals in `wait` can't be
fixed.