[{"id":3685108,"web_url":"http://patchwork.ozlabs.org/comment/3685108/","msgid":"<afSXZM7Ga7k2BVZS@redhat.com>","list_archive_url":null,"date":"2026-05-01T12:07:00","subject":"Re: [PATCH] tests/functional/qemu_test/asset.py: Don't use setxattr\n when it doesn't exist","submitter":{"id":2694,"url":"http://patchwork.ozlabs.org/api/people/2694/","name":"Daniel P. Berrangé","email":"berrange@redhat.com"},"content":"On Fri, May 01, 2026 at 12:55:06PM +0100, Peter Maydell wrote:\n> The Python os.setxattr() API is Linux-specific, so trying to use\n> it on other OSes triggers a failure:\n> \n>   File \"/Users/pm215/src/qemu/tests/functional/qemu_test/asset.py\",\n> line 227, in fetch\n>     os.setxattr(str(tmp_cache_file), \"user.qemu-asset-url\",\n>     ^^^^^^^^^^^\n> AttributeError: module 'os' has no attribute 'setxattr'\n> \n> Since we only set the attributes here for informational\n> purposes, skip them when os.setxattr() isn't available.\n> \n> Cc: qemu-stable@nongnu.org\n> Fixes: 9903217a4ed013 (\"tests/functional: add a module for handling asset download & caching\")\n> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>\n> ---\n>  tests/functional/qemu_test/asset.py | 13 ++++++++-----\n>  1 file changed, 8 insertions(+), 5 deletions(-)\n\nReviewed-by: Daniel P. Berrangé <berrange@redhat.com>\n\n\nDaniel","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=YnGPYDQ0;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g6VDL6qnrz1y04\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 01 May 2026 22:08:01 +1000 (AEST)","from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wImeR-0000sT-Td; Fri, 01 May 2026 08:07:23 -0400","from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <berrange@redhat.com>)\n id 1wImeM-0000pm-3R\n for qemu-devel@nongnu.org; Fri, 01 May 2026 08:07:18 -0400","from us-smtp-delivery-124.mimecast.com ([170.10.133.124])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <berrange@redhat.com>)\n id 1wImeH-0002Kg-OS\n for qemu-devel@nongnu.org; Fri, 01 May 2026 08:07:16 -0400","from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-570-m0hb3-MRNhm7wzxXH8li9A-1; Fri,\n 01 May 2026 08:07:07 -0400","from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 1D67C180036E; Fri,  1 May 2026 12:07:06 +0000 (UTC)","from redhat.com (unknown [10.44.48.117])\n by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with\n ESMTPS\n id 453DD1955D84; Fri,  1 May 2026 12:07:03 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1777637230;\n h=from:from:reply-to:reply-to:subject:subject:date:date:\n message-id:message-id:to:to:cc:cc:mime-version:mime-version:\n content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=yv3PFsZDODSeVRw4vULv9dCBDZRW6K/QoLtv3+2ILlo=;\n b=YnGPYDQ05GmY8NBYQrMa4KLOHTT5/jcZzDf6cXm9S5IHxUqtJaoEAoZATZheSm3P6DPKb0\n V46BLThB/vTIOCDrd3LbbOUeytKKTc05fHJPz6gWFVyvl0xvuuvIKFdRtGl/EaWi7IVZRl\n CNClpP/2hdz615awGNHfOO84cBjppAg=","X-MC-Unique":"m0hb3-MRNhm7wzxXH8li9A-1","X-Mimecast-MFC-AGG-ID":"m0hb3-MRNhm7wzxXH8li9A_1777637226","Date":"Fri, 1 May 2026 13:07:00 +0100","From":"Daniel =?utf-8?b?UC4gQmVycmFuZ8Op?= <berrange@redhat.com>","To":"Peter Maydell <peter.maydell@linaro.org>","Cc":"qemu-devel@nongnu.org, Thomas Huth <th.huth+qemu@posteo.eu>, Philippe\n\t=?utf-8?q?Mathieu-Daud=C3=A9?= <philmd@linaro.org>","Subject":"Re: [PATCH] tests/functional/qemu_test/asset.py: Don't use setxattr\n when it doesn't exist","Message-ID":"<afSXZM7Ga7k2BVZS@redhat.com>","References":"<20260501115506.3792110-1-peter.maydell@linaro.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20260501115506.3792110-1-peter.maydell@linaro.org>","User-Agent":"Mutt/2.3.1 (2026-03-20)","X-Scanned-By":"MIMEDefang 3.0 on 10.30.177.17","Received-SPF":"pass client-ip=170.10.133.124;\n envelope-from=berrange@redhat.com;\n helo=us-smtp-delivery-124.mimecast.com","X-Spam_score_int":"-20","X-Spam_score":"-2.1","X-Spam_bar":"--","X-Spam_report":"(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001,\n SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no","X-Spam_action":"no action","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"qemu development <qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<https://lists.nongnu.org/archive/html/qemu-devel>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Reply-To":"Daniel =?utf-8?b?UC4gQmVycmFuZ8Op?= <berrange@redhat.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"}},{"id":3685118,"web_url":"http://patchwork.ozlabs.org/comment/3685118/","msgid":"<875x57e24c.fsf@draig.linaro.org>","list_archive_url":null,"date":"2026-05-01T12:38:27","subject":"Re: [PATCH] tests/functional/qemu_test/asset.py: Don't use setxattr\n when it doesn't exist","submitter":{"id":39532,"url":"http://patchwork.ozlabs.org/api/people/39532/","name":"Alex Bennée","email":"alex.bennee@linaro.org"},"content":"Peter Maydell <peter.maydell@linaro.org> writes:\n\n> The Python os.setxattr() API is Linux-specific, so trying to use\n> it on other OSes triggers a failure:\n>\n>   File \"/Users/pm215/src/qemu/tests/functional/qemu_test/asset.py\",\n> line 227, in fetch\n>     os.setxattr(str(tmp_cache_file), \"user.qemu-asset-url\",\n>     ^^^^^^^^^^^\n> AttributeError: module 'os' has no attribute 'setxattr'\n>\n> Since we only set the attributes here for informational\n> purposes, skip them when os.setxattr() isn't available.\n>\n> Cc: qemu-stable@nongnu.org\n> Fixes: 9903217a4ed013 (\"tests/functional: add a module for handling asset download & caching\")\n> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>\n> ---\n>  tests/functional/qemu_test/asset.py | 13 ++++++++-----\n>  1 file changed, 8 insertions(+), 5 deletions(-)\n>\n> diff --git a/tests/functional/qemu_test/asset.py b/tests/functional/qemu_test/asset.py\n> index 51a434b2b7..0abd89e0a3 100644\n> --- a/tests/functional/qemu_test/asset.py\n> +++ b/tests/functional/qemu_test/asset.py\n> @@ -223,11 +223,14 @@ def fetch(self):\n>              raise AssetError(self, \"Download retries exceeded\", transient=True)\n>  \n>          try:\n> -            # Set these just for informational purposes\n> -            os.setxattr(str(tmp_cache_file), \"user.qemu-asset-url\",\n> -                        self.url.encode('utf8'))\n> -            os.setxattr(str(tmp_cache_file), \"user.qemu-asset-hash\",\n> -                        self.hash.encode('utf8'))\n> +            # Set these just for informational purposes. Note that\n> +            # setxattr is Linux-only; as this is only informational\n> +            # we can simply skip it on other platforms.\n> +            if hasattr(os, \"setxattr\"):\n> +                os.setxattr(str(tmp_cache_file), \"user.qemu-asset-url\",\n> +                            self.url.encode('utf8'))\n> +                os.setxattr(str(tmp_cache_file), \"user.qemu-asset-hash\",\n> +                            self.hash.encode('utf8'))\n\nWell TIL:\n\n  attr -g qemu-asset-url /home/alex/.cache/qemu/download/ff9d7dd7c6bdba325bd85ee85c02db61ff653e129558aeffe6aff55bffb6763a\n  Attribute \"qemu-asset-url\" had a 73 byte value for /home/alex/.cache/qemu/download/ff9d7dd7c6bdba325bd85ee85c02db61ff653e129558aeffe6aff55bffb6763a:\n  https://qemu-advcal.gitlab.io/qac-best-of-multiarch/download/day20.tar.xz\n\nReviewed-by: Alex Bennée <alex.bennee@linaro.org>\n\n>          except OSError as e:\n>              self.log.debug(\"Unable to set xattr on %s: %s\", tmp_cache_file, e)","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=xTM/JRyQ;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g6Vwm1l0Dz1y04\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 01 May 2026 22:39:34 +1000 (AEST)","from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wIn8z-0005tF-3T; Fri, 01 May 2026 08:38:57 -0400","from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <alex.bennee@linaro.org>)\n id 1wIn8e-0005rf-C7\n for qemu-devel@nongnu.org; Fri, 01 May 2026 08:38:42 -0400","from mail-wm1-x344.google.com ([2a00:1450:4864:20::344])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <alex.bennee@linaro.org>)\n id 1wIn8b-0002AZ-0C\n for qemu-devel@nongnu.org; Fri, 01 May 2026 08:38:35 -0400","by mail-wm1-x344.google.com with SMTP id\n 5b1f17b1804b1-488ab2db91aso22307415e9.3\n for <qemu-devel@nongnu.org>; Fri, 01 May 2026 05:38:31 -0700 (PDT)","from draig.lan ([185.124.0.195]) by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-44a981dee90sm4690322f8f.22.2026.05.01.05.38.28\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 01 May 2026 05:38:28 -0700 (PDT)","from draig (localhost [IPv6:::1])\n by draig.lan (Postfix) with ESMTP id A19885F8FC;\n Fri, 01 May 2026 13:38:27 +0100 (BST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1777639109; x=1778243909; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:message-id:date:user-agent\n :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=2UFB+YuhL6KiZIr86vLelBiy5ZXx2GLumTYKovzQNMc=;\n b=xTM/JRyQ1k3bsZAOdOg95JtQZZO/r8QhRgmuTQ2ysKzwoX4O2rstEHMEIjGUxBg5mg\n LQd0d8lI5SwqEYX7abXROEaqe1QQhCw8oEeBzmEVluhZjZExMSSKo0FQCbvF4AEEQtSS\n vylchHlCA2GDlanxHmzYYdrqtP99XsuNFUf+9NrfhCxo2DbwWn5o3LwRwrDLvN8S1ycs\n iLqU8hSr2WIvHCnNjxaswkAmOY1toAHdbpMsMjDgQdNlTdkgsf8bXWIfP6JHOpFF31oG\n UBLpagnFhHEnT7E3///cFthElfXn7He80bnCdqPgO8bmRKT6SBvbRgaXa7Pr1AIARMbJ\n 0khQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777639109; x=1778243909;\n h=content-transfer-encoding:mime-version:message-id:date:user-agent\n :references:in-reply-to:subject:cc:to:from:x-gm-gg\n :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n bh=2UFB+YuhL6KiZIr86vLelBiy5ZXx2GLumTYKovzQNMc=;\n b=PxUapXoIGGgAau7jPMn3wcXfYZ8XKCkvdXzmHHh13hxWBpfrNWRsArggg6UNPBxkHN\n tuv2nyVlxjO3xRRCRYBcaR8akaAbsNBN6cCE0D6bW3lSRv2f7dtyIsZ2QJ6ONOcy2g0y\n cpVX0Nyc9Xnnro14pR9rGGqpcP4rCNuhdJBlOmDBQtYpsGxjW9VO82niN3xV2KyCSr4L\n vK0p+NypT7ThoS+5SOoMLmbiodWdikGlSm0L9uz8AEvLLUYKN70OPYCJD9J7Pb73XUsV\n K3MR3KWULh8A2BZs2MaccvJaFL+Fy4ZTM6kPfK6nidcDJc1F1PBNxXEg1rMEF/E3O03B\n F7uQ==","X-Gm-Message-State":"AOJu0Yz8Vr6rNS94pWbPmP7A3Yo6o7AOD2C0SCin2oAPSUpd84wsGkuf\n 72OcArrfjkOIhUNHj88DFTWjcM/yi5Vu9E9MU8Xra7xm3gCm++W8TXIGZfK0KqD3gLM=","X-Gm-Gg":"AeBDiesxGaBmGjSFQvGaunxdNt4xNQjBgJVMZnACanU/BxHgLhpvxiL1Cm+TtQM7seL\n XdztkCs37Ipo/jmYF8MOUUrSz7OJmR97t9HypDlh4+kPChGRDO9P23aTU0Eb1UWrX8LCAjHRgE3\n cEVis0bbBnbOzNLtwwUpjw6SY3V4zouNwfeK1XvuNb0t5uw9GapBc0us2eLJQxkjOpop0YG41SB\n ENBFt2nZYb6fie9T3kAFJPokLTRhljVaangF0iv39bSzr2svHtQXBxihoJR8fpKKhlKMsPzr+Hr\n uzC+EFTK6SYGoBZiYdGM0BX7/4UMF9vnc9zVWgWImtKxxDOTN6eAAho7Y5xKp36OA5uS6QMl+0k\n l59ZnhbbNXJyrZ/+8n1Jjh6Pgi3YHvUQeUSuj1vi64f0NRQrg+R60mAgv/fQseDWxt90CJuvD+Z\n 3EY0I+5FRhxtoRxd7ylQYHhk02LNaeA3EQKg==","X-Received":"by 2002:a05:6000:2408:b0:43e:aa43:243 with SMTP id\n ffacd0b85a97d-4493f428324mr11916146f8f.43.1777639109473;\n Fri, 01 May 2026 05:38:29 -0700 (PDT)","From":"=?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>","To":"Peter Maydell <peter.maydell@linaro.org>","Cc":"qemu-devel@nongnu.org,  Thomas Huth <th.huth+qemu@posteo.eu>,  Daniel P.\n\t=?utf-8?b?QmVycmFuZ8Op?= <berrange@redhat.com>,  Philippe =?utf-8?q?Mathieu?=\n\t=?utf-8?q?-Daud=C3=A9?= <philmd@linaro.org>","Subject":"Re: [PATCH] tests/functional/qemu_test/asset.py: Don't use setxattr\n when it doesn't exist","In-Reply-To":"<20260501115506.3792110-1-peter.maydell@linaro.org> (Peter\n Maydell's message of \"Fri, 1 May 2026 12:55:06 +0100\")","References":"<20260501115506.3792110-1-peter.maydell@linaro.org>","User-Agent":"mu4e 1.14.1-pre3; emacs 30.1","Date":"Fri, 01 May 2026 13:38:27 +0100","Message-ID":"<875x57e24c.fsf@draig.linaro.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"quoted-printable","Received-SPF":"pass client-ip=2a00:1450:4864:20::344;\n envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x344.google.com","X-Spam_score_int":"-20","X-Spam_score":"-2.1","X-Spam_bar":"--","X-Spam_report":"(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=ham autolearn_force=no","X-Spam_action":"no action","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"qemu development <qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<https://lists.nongnu.org/archive/html/qemu-devel>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"}},{"id":3685226,"web_url":"http://patchwork.ozlabs.org/comment/3685226/","msgid":"<20260501230124.19b10492@tpx1>","list_archive_url":null,"date":"2026-05-01T21:01:26","subject":"Re: [PATCH] tests/functional/qemu_test/asset.py: Don't use setxattr\n when it doesn't exist","submitter":{"id":92808,"url":"http://patchwork.ozlabs.org/api/people/92808/","name":"Thomas Huth","email":"th.huth+qemu@posteo.eu"},"content":"Am Fri,  1 May 2026 12:55:06 +0100\nschrieb Peter Maydell <peter.maydell@linaro.org>:\n\n> The Python os.setxattr() API is Linux-specific, so trying to use\n> it on other OSes triggers a failure:\n> \n>   File \"/Users/pm215/src/qemu/tests/functional/qemu_test/asset.py\",\n> line 227, in fetch\n>     os.setxattr(str(tmp_cache_file), \"user.qemu-asset-url\",\n>     ^^^^^^^^^^^\n> AttributeError: module 'os' has no attribute 'setxattr'\n> \n> Since we only set the attributes here for informational\n> purposes, skip them when os.setxattr() isn't available.\n> \n> Cc: qemu-stable@nongnu.org\n> Fixes: 9903217a4ed013 (\"tests/functional: add a module for handling asset download & caching\")\n> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>\n> ---\n>  tests/functional/qemu_test/asset.py | 13 ++++++++-----\n>  1 file changed, 8 insertions(+), 5 deletions(-)\n> \n> diff --git a/tests/functional/qemu_test/asset.py b/tests/functional/qemu_test/asset.py\n> index 51a434b2b7..0abd89e0a3 100644\n> --- a/tests/functional/qemu_test/asset.py\n> +++ b/tests/functional/qemu_test/asset.py\n> @@ -223,11 +223,14 @@ def fetch(self):\n>              raise AssetError(self, \"Download retries exceeded\", transient=True)\n>  \n>          try:\n> -            # Set these just for informational purposes\n> -            os.setxattr(str(tmp_cache_file), \"user.qemu-asset-url\",\n> -                        self.url.encode('utf8'))\n> -            os.setxattr(str(tmp_cache_file), \"user.qemu-asset-hash\",\n> -                        self.hash.encode('utf8'))\n> +            # Set these just for informational purposes. Note that\n> +            # setxattr is Linux-only; as this is only informational\n> +            # we can simply skip it on other platforms.\n> +            if hasattr(os, \"setxattr\"):\n> +                os.setxattr(str(tmp_cache_file), \"user.qemu-asset-url\",\n> +                            self.url.encode('utf8'))\n> +                os.setxattr(str(tmp_cache_file), \"user.qemu-asset-hash\",\n> +                            self.hash.encode('utf8'))\n>          except OSError as e:\n>              self.log.debug(\"Unable to set xattr on %s: %s\", tmp_cache_file, e)\n>  \n\nReviewed-by: Thomas Huth <th.huth+qemu@posteo.eu>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=posteo.eu header.i=@posteo.eu header.a=rsa-sha256\n header.s=2017 header.b=ijsq7bh3;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g6k4w4rDSz1yHZ\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 02 May 2026 07:02:23 +1000 (AEST)","from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wIuzY-000890-G5; Fri, 01 May 2026 17:01:47 -0400","from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <th.huth+qemu@posteo.eu>)\n id 1wIuzO-00087n-3q\n for qemu-devel@nongnu.org; Fri, 01 May 2026 17:01:38 -0400","from mout01.posteo.de ([185.67.36.65])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <th.huth+qemu@posteo.eu>)\n id 1wIuzK-0007Ok-Pt\n for qemu-devel@nongnu.org; Fri, 01 May 2026 17:01:33 -0400","from submission (posteo.de [185.67.36.169])\n by mout01.posteo.de (Postfix) with ESMTPS id E751A240027\n for <qemu-devel@nongnu.org>; Fri,  1 May 2026 23:01:26 +0200 (CEST)","from customer (localhost [127.0.0.1])\n by submission (posteo.de) with ESMTPSA id 4g6k3n5YzLz9rxB;\n Fri,  1 May 2026 23:01:24 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=posteo.eu; s=2017;\n t=1777669286; bh=SXp3lqNottE16XwA+SbILwJnDouUeIfZ8Pmh8bmucgM=;\n h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type:\n Content-Transfer-Encoding:From;\n b=ijsq7bh3E+IuJpMeSl3Mwfk37x+6/p8eR5NPa9AaFR3TYwV0+AH9++LcRvOKsg7/u\n EsebkSz3Rn7OdPxirQm0SnEIFZiYMyIZJi49CKqGywluwks3FqXUX0bIKfhVaMVOjh\n /Ux6Ewc0vwVdryy+r2cHNPTS2L2z+hsCq0hVlmg4TAow3QvUA0vezpqR/L46Eans+V\n ZNlxnAt+6CmaskvoLn55JlxuUUr2NvyejHagmb8D87j4Kb2mD8pIk0sHsSgIYqEEBy\n 9rjKz+GWeXDf84MjsZ2pf9/8Mt43OW0HrUyImGqNSKuT98Lb6URSGqo0nTY+meFf45\n 4ggQHohFWmwKQ==","Date":"Fri, 01 May 2026 21:01:26 +0000","From":"Thomas Huth <th.huth+qemu@posteo.eu>","To":"Peter Maydell <peter.maydell@linaro.org>","Cc":"qemu-devel@nongnu.org,\n \"Daniel P. =?utf-8?b?QmVycmFuZ8Op?= \" <berrange@redhat.com>, Philippe\n\t=?utf-8?q?Mathieu-Daud=C3=A9?= <philmd@linaro.org>","Subject":"Re: [PATCH] tests/functional/qemu_test/asset.py: Don't use setxattr\n when it doesn't exist","Message-ID":"<20260501230124.19b10492@tpx1>","In-Reply-To":"<20260501115506.3792110-1-peter.maydell@linaro.org>","References":"<20260501115506.3792110-1-peter.maydell@linaro.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","Content-Transfer-Encoding":"7bit","Received-SPF":"pass client-ip=185.67.36.65;\n envelope-from=th.huth+qemu@posteo.eu;\n helo=mout01.posteo.de","X-Spam_score_int":"-43","X-Spam_score":"-4.4","X-Spam_bar":"----","X-Spam_report":"(-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001,\n SPF_PASS=-0.001 autolearn=ham autolearn_force=no","X-Spam_action":"no action","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"qemu development <qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<https://lists.nongnu.org/archive/html/qemu-devel>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"}}]