qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Cleber Rosa <crosa@redhat.com>
Cc: qemu-devel@nongnu.org,
	"Marcin Juszkiewicz" <marcin.juszkiewicz@linaro.org>,
	"Pavel Dovgalyuk" <pavel.dovgaluk@ispras.ru>,
	"Radoslaw Biernacki" <rad@semihalf.com>,
	"Troy Lee" <leetroy@gmail.com>,
	"Akihiko Odaki" <akihiko.odaki@daynix.com>,
	"Beraldo Leal" <bleal@redhat.com>,
	kvm@vger.kernel.org, "Joel Stanley" <joel@jms.id.au>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Aurelien Jarno" <aurelien@aurel32.net>,
	"Sriram Yagnaraman" <sriram.yagnaraman@ericsson.com>,
	"Cédric Le Goater" <clg@kaod.org>, "Paul Durrant" <paul@xen.org>,
	"Eric Auger" <eric.auger@redhat.com>,
	"David Woodhouse" <dwmw2@infradead.org>,
	qemu-arm@nongnu.org,
	"Andrew Jeffery" <andrew@codeconstruct.com.au>,
	"Jamin Lin" <jamin_lin@aspeedtech.com>,
	"Steven Lee" <steven_lee@aspeedtech.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Yoshinori Sato" <ysato@users.sourceforge.jp>,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Leif Lindholm" <quic_llindhol@quicinc.com>
Subject: Re: [PATCH v2 9/9] Avocado tests: allow for parallel execution of tests
Date: Thu, 15 Aug 2024 18:02:34 +0200	[thread overview]
Message-ID: <6ecd8981-f5d5-42d0-9769-82fbde55df23@redhat.com> (raw)
In-Reply-To: <CA+bd_6LTqGbx2+GOyYHyJ4d5gpg4v8Ddx5apjghiB0vjt8Abhg@mail.gmail.com>

On 15/08/2024 16.08, Cleber Rosa wrote:
> On Mon, Aug 12, 2024 at 6:17 AM Thomas Huth <thuth@redhat.com> wrote:
>> ...
>>> diff --git a/tests/Makefile.include b/tests/Makefile.include
>>> index 537804d101..545b5155f9 100644
>>> --- a/tests/Makefile.include
>>> +++ b/tests/Makefile.include
>>> @@ -94,6 +94,9 @@ TESTS_RESULTS_DIR=$(BUILD_DIR)/tests/results
>>>    ifndef AVOCADO_TESTS
>>>        AVOCADO_TESTS=tests/avocado
>>>    endif
>>> +ifndef AVOCADO_PARALLEL
>>> +     AVOCADO_PARALLEL=1
>>> +endif
>>>    # Controls the output generated by Avocado when running tests.
>>>    # Any number of command separated loggers are accepted.  For more
>>>    # information please refer to "avocado --help".
>>> @@ -141,7 +144,8 @@ check-avocado: check-venv $(TESTS_RESULTS_DIR) get-vm-images
>>>                --show=$(AVOCADO_SHOW) run --job-results-dir=$(TESTS_RESULTS_DIR) \
>>>                $(if $(AVOCADO_TAGS),, --filter-by-tags-include-empty \
>>>                        --filter-by-tags-include-empty-key) \
>>> -            $(AVOCADO_CMDLINE_TAGS) --max-parallel-tasks=1 \
>>> +            $(AVOCADO_CMDLINE_TAGS) --max-parallel-tasks=$(AVOCADO_PARALLEL) \
>>> +                     -p timeout_factor=$(AVOCADO_PARALLEL) \
>>>                $(if $(GITLAB_CI),,--failfast) $(AVOCADO_TESTS), \
>>>                "AVOCADO", "tests/avocado")
>>
>> I think it was nicer in the previous attempt to bump the avocado version:
>>
>> https://gitlab.com/qemu-project/qemu/-/commit/ec5ffa0056389c3c10ea2de1e783
>>
>> This re-used the "-j" option from "make", so you could do "make -j$(nproc)
>> check-avocado" just like with the other "check" targets.
>>
> 
> Hi Thomas,
> 
> I can see why it looks better, but in practice, I'm not getting the
> best behavior with such a change.
> 
> First, the fact that it enables the parallelization by default, while
> there still seems to be issues with test timeout issues, and even
> existing races between tests (which this series tried to address as
> much as possible) will not result in the best experience IMO.  On my
> 12 core machine, and also on GitLab CI, having 4 tests running in
> parallel gets a nice speed up (as others have reported) while still
> being very stable.
> 
> I'd say making the number of parallel tests equal to `nproc` is best
> kept for a future round.
> 
> Let me know if this sounds reasonable to you.

  Hi Cleber,

that patch that I linked did not set the default number of parallel tests to 
$(nproc), it just used the value of the "-j" option of make. So if you just 
run "make check-avocado" there, you only get single threaded execution as 
before. You explicitely have to run "make -jX check-avocado" to get X 
parallel threads. IMHO using "-j" is more intuitive than using yet another 
environment variable.

  Thomas



  reply	other threads:[~2024-08-15 16:03 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-06 17:31 [PATCH v2 0/9] Bump Avocado to 103.0 LTS and update tests for compatibility and new features Cleber Rosa
2024-08-06 17:31 ` [PATCH v2 1/9] Bump avocado to 103.0 Cleber Rosa
2024-08-06 17:31 ` [PATCH v2 2/9] tests/avocado: apply proper skipUnless decorator Cleber Rosa
2024-08-06 19:28   ` Philippe Mathieu-Daudé
2024-08-12 10:21   ` Thomas Huth
2024-08-06 17:31 ` [PATCH v2 3/9] tests/avocado: add cdrom permission related tests Cleber Rosa
2024-08-16 14:46   ` Thomas Huth
2024-08-06 17:31 ` [PATCH v2 4/9] tests/avocado: machine aarch64: standardize location and RO access Cleber Rosa
2024-08-06 17:31 ` [PATCH v2 5/9] tests/avocado: simplify parameters on fetch_asset with name only Cleber Rosa
2024-08-06 17:31 ` [PATCH v2 6/9] tests/avocado/boot_xen.py: fetch kernel during test setUp() Cleber Rosa
2024-08-06 17:31 ` [PATCH v2 7/9] tests/avocado/tuxrun_baselines.py: use Avocado's zstd support Cleber Rosa
2024-08-06 18:20   ` Marcin Juszkiewicz
2024-08-07 17:26     ` Cleber Rosa
2024-08-06 17:31 ` [PATCH v2 8/9] tests/avocado/machine_aarch64_sbsaref.py: allow for rw usage of image Cleber Rosa
2024-08-06 19:30   ` Philippe Mathieu-Daudé
2024-08-07 17:26     ` Cleber Rosa
2024-08-06 17:31 ` [PATCH v2 9/9] Avocado tests: allow for parallel execution of tests Cleber Rosa
2024-08-12 10:17   ` Thomas Huth
2024-08-15 14:08     ` Cleber Rosa
2024-08-15 16:02       ` Thomas Huth [this message]
2024-08-15 22:35         ` Richard Henderson
2024-08-06 18:20 ` [PATCH v2 0/9] Bump Avocado to 103.0 LTS and update tests for compatibility and new features Marcin Juszkiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6ecd8981-f5d5-42d0-9769-82fbde55df23@redhat.com \
    --to=thuth@redhat.com \
    --cc=akihiko.odaki@daynix.com \
    --cc=alex.bennee@linaro.org \
    --cc=andrew@codeconstruct.com.au \
    --cc=aurelien@aurel32.net \
    --cc=bleal@redhat.com \
    --cc=clg@kaod.org \
    --cc=crosa@redhat.com \
    --cc=dwmw2@infradead.org \
    --cc=eric.auger@redhat.com \
    --cc=jamin_lin@aspeedtech.com \
    --cc=joel@jms.id.au \
    --cc=kvm@vger.kernel.org \
    --cc=leetroy@gmail.com \
    --cc=marcin.juszkiewicz@linaro.org \
    --cc=paul@xen.org \
    --cc=pavel.dovgaluk@ispras.ru \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quic_llindhol@quicinc.com \
    --cc=rad@semihalf.com \
    --cc=sriram.yagnaraman@ericsson.com \
    --cc=steven_lee@aspeedtech.com \
    --cc=wainersm@redhat.com \
    --cc=ysato@users.sourceforge.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).