All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, "Thomas Huth" <th.huth+qemu@posteo.eu>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH] tests/functional/qemu_test/asset.py: Don't use setxattr when it doesn't exist
Date: Fri, 1 May 2026 13:07:00 +0100	[thread overview]
Message-ID: <afSXZM7Ga7k2BVZS@redhat.com> (raw)
In-Reply-To: <20260501115506.3792110-1-peter.maydell@linaro.org>

On Fri, May 01, 2026 at 12:55:06PM +0100, Peter Maydell wrote:
> The Python os.setxattr() API is Linux-specific, so trying to use
> it on other OSes triggers a failure:
> 
>   File "/Users/pm215/src/qemu/tests/functional/qemu_test/asset.py",
> line 227, in fetch
>     os.setxattr(str(tmp_cache_file), "user.qemu-asset-url",
>     ^^^^^^^^^^^
> AttributeError: module 'os' has no attribute 'setxattr'
> 
> Since we only set the attributes here for informational
> purposes, skip them when os.setxattr() isn't available.
> 
> Cc: qemu-stable@nongnu.org
> Fixes: 9903217a4ed013 ("tests/functional: add a module for handling asset download & caching")
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  tests/functional/qemu_test/asset.py | 13 ++++++++-----
>  1 file changed, 8 insertions(+), 5 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Daniel



  reply	other threads:[~2026-05-01 12:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-01 11:55 [PATCH] tests/functional/qemu_test/asset.py: Don't use setxattr when it doesn't exist Peter Maydell
2026-05-01 12:07 ` Daniel P. Berrangé [this message]
2026-05-01 12:38 ` Alex Bennée
2026-05-01 21:01 ` Thomas Huth
2026-05-11 14:47 ` Peter Maydell
2026-05-11 15:15   ` Daniel P. Berrangé
2026-05-11 15:23     ` Peter Maydell
2026-05-12  4:49   ` 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=afSXZM7Ga7k2BVZS@redhat.com \
    --to=berrange@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=th.huth+qemu@posteo.eu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.