From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
Thomas Huth <thuth@redhat.com>
Subject: Re: [PATCH 5/5] tests/functional: skip mem addr test on 32-bit hosts
Date: Wed, 5 Feb 2025 16:53:40 +0000 [thread overview]
Message-ID: <Z6OXlPu0fw_S9iy6@redhat.com> (raw)
In-Reply-To: <9edd3138-3411-4459-96c3-d48c30e197e0@linaro.org>
On Wed, Feb 05, 2025 at 05:40:48PM +0100, Philippe Mathieu-Daudé wrote:
> On 5/2/25 16:59, Daniel P. Berrangé wrote:
> > The test_mem_addr_space is validating handling of QEMU with various
> > memory address settings. All of the test cases are setting 'maxmem'
> > to a value that exceeds the 32-bit address space, so these must all
> > be skipped on 32-bit hosts.
> >
> > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > ---
> > tests/functional/qemu_test/__init__.py | 2 +-
> > tests/functional/qemu_test/decorators.py | 12 ++++++++++++
> > tests/functional/test_mem_addr_space.py | 17 ++++++++++++++++-
> > 3 files changed, 29 insertions(+), 2 deletions(-)
>
>
> > diff --git a/tests/functional/qemu_test/decorators.py b/tests/functional/qemu_test/decorators.py
> > index 1651eb739a..d3a8cf0483 100644
> > --- a/tests/functional/qemu_test/decorators.py
> > +++ b/tests/functional/qemu_test/decorators.py
> > @@ -5,6 +5,7 @@
> > import importlib
> > import os
> > import platform
> > +import sys
> > from unittest import skipUnless
> > from .cmd import which
> > @@ -118,3 +119,14 @@ def skipIfMissingImports(*args):
> > return skipUnless(has_imports, 'required import(s) "%s" not installed' %
> > ", ".join(args))
> > +
> > +'''
> > +Decorator to skip execution of a test on 32-bit targets
> > +Example:
> > +
> > + @skipIf32BitTarget()
> > +'''
> > +def skipIf32BitTarget():
> > + enoughBits = sys.maxsize > 2**32
> > + return skipUnless(enoughBits,
> > + 'Test requires a host with 64-bit address space')
>
> skipIf32BitHost?
I don't mind either way.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2025-02-05 16:54 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-05 15:59 [PATCH 0/5] tests/functional: a few misc cleanups and fixes Daniel P. Berrangé
2025-02-05 15:59 ` [PATCH 1/5] tests/functional: skip test if QEMU_TEST_QEMU_BINARY is not set Daniel P. Berrangé
2025-02-06 9:01 ` Thomas Huth
2025-02-28 9:50 ` Daniel P. Berrangé
2025-02-05 15:59 ` [PATCH 2/5] tests/functional: remove unused 'bin_prefix' variable Daniel P. Berrangé
2025-02-06 9:23 ` Thomas Huth
2025-02-05 15:59 ` [PATCH 3/5] tests/functional: set 'qemu_bin' as an object level field Daniel P. Berrangé
2025-02-06 9:24 ` Thomas Huth
2025-02-05 15:59 ` [PATCH 4/5] tests/functional: remove all class level fields Daniel P. Berrangé
2025-02-06 9:27 ` Thomas Huth
2025-02-05 15:59 ` [PATCH 5/5] tests/functional: skip mem addr test on 32-bit hosts Daniel P. Berrangé
2025-02-05 16:40 ` Philippe Mathieu-Daudé
2025-02-05 16:53 ` Daniel P. Berrangé [this message]
2025-02-05 18:08 ` Philippe Mathieu-Daudé
2025-02-05 18:25 ` Richard Henderson
2025-02-06 9:29 ` Thomas Huth
2025-02-05 18:24 ` Richard Henderson
2025-02-05 18:47 ` Daniel P. Berrangé
2025-02-05 18:50 ` Richard Henderson
2025-02-06 9:35 ` Daniel P. Berrangé
2025-02-06 9:46 ` Thomas Huth
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=Z6OXlPu0fw_S9iy6@redhat.com \
--to=berrange@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/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).