From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [kvm-unit-tests PATCH v2 2/2] run_tests: allow run tests in parallel Date: Wed, 4 Jan 2017 16:09:39 +0100 Message-ID: <20170104150938.GA9029@potion> References: <1483438205-31110-1-git-send-email-peterx@redhat.com> <1483438205-31110-3-git-send-email-peterx@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, Paolo Bonzini , Andrew Jones To: Peter Xu Return-path: Received: from mx1.redhat.com ([209.132.183.28]:46436 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966877AbdADPJm (ORCPT ); Wed, 4 Jan 2017 10:09:42 -0500 Content-Disposition: inline In-Reply-To: <1483438205-31110-3-git-send-email-peterx@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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ář > Signed-off-by: Peter Xu > --- > 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.