qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Thomas Huth" <thuth@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Kevin Wolf" <kwolf@redhat.com>,
	"Hanna Reitz" <hreitz@redhat.com>,
	qemu-block@nongnu.org (open list:Block layer core)
Subject: [PULL 05/14] tests/qemu-iotests: Check for a functional "secret" object before using it
Date: Fri,  5 Dec 2025 16:41:16 +0000	[thread overview]
Message-ID: <20251205164125.2122504-6-alex.bennee@linaro.org> (raw)
In-Reply-To: <20251205164125.2122504-1-alex.bennee@linaro.org>

From: Thomas Huth <thuth@redhat.com>

QEMU iotests 049, 134 and 158 are currently failing if you compiled
QEMU without the crypto libraries. Thus make sure that the "secret"
object is really usable and skip the tests otherwise.

Reported-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251205130014.693799-1-thuth@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

diff --git a/tests/qemu-iotests/049 b/tests/qemu-iotests/049
index ed12fa49d7f..a1b922060db 100755
--- a/tests/qemu-iotests/049
+++ b/tests/qemu-iotests/049
@@ -39,6 +39,8 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 
 _supported_fmt qcow2
 _supported_proto file
+_require_secret
+
 
 filter_test_dir()
 {
diff --git a/tests/qemu-iotests/134 b/tests/qemu-iotests/134
index b2c3c03f08b..cc1e35eb161 100755
--- a/tests/qemu-iotests/134
+++ b/tests/qemu-iotests/134
@@ -39,6 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 
 _supported_fmt qcow qcow2
 _supported_proto file
+_require_secret
 
 
 size=128M
diff --git a/tests/qemu-iotests/158 b/tests/qemu-iotests/158
index 3a9ad7eed03..8fc4e986532 100755
--- a/tests/qemu-iotests/158
+++ b/tests/qemu-iotests/158
@@ -39,6 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 
 _supported_fmt qcow qcow2
 _supported_proto file
+_require_secret
 
 
 size=128M
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index e977cb4eb61..10d83d8361b 100644
--- a/tests/qemu-iotests/common.rc
+++ b/tests/qemu-iotests/common.rc
@@ -1053,6 +1053,20 @@ _require_one_device_of()
     _notrun "$* not available"
 }
 
+_require_secret()
+{
+    if [ -e "$TEST_IMG" ]; then
+        echo "unwilling to overwrite existing file"
+        exit 1
+    fi
+    if $QEMU_IMG create -f $IMGFMT --object secret,id=sec0,data=123 \
+                 -o encryption=on,encrypt.key-secret=sec0 "$TEST_IMG" 1M 2>&1 \
+                 | grep "Unsupported cipher" ; then
+        _notrun "missing cipher support"
+    fi
+    rm -f "$TEST_IMG"
+}
+
 _qcow2_dump_header()
 {
     if [[ "$1" == "--no-filter-compression" ]]; then
-- 
2.47.3



  parent reply	other threads:[~2025-12-05 16:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-05 16:41 [PULL 00/14] Final fixes for 10.2 (gitlab, testing, docker, docs, plugins) Alex Bennée
2025-12-05 16:41 ` [PULL 01/14] gitlab: drop --disable-pie from aarch64-all-linux-static build Alex Bennée
2025-12-05 16:41 ` [PULL 02/14] gitlab: drop explicit pxe-test from the build-tci job Alex Bennée
2025-12-05 16:41 ` [PULL 03/14] gitlab-ci.d/cirrus: Update the FreeBSD job to v14.3 Alex Bennée
2025-12-05 16:41 ` [PULL 04/14] tests/tcg: honour the available QEMU binaries when running check-tcg Alex Bennée
2025-12-05 16:41 ` Alex Bennée [this message]
2025-12-05 16:41 ` [PULL 06/14] tests/lcitool: add bzip2 to the minimal dependency list Alex Bennée
2025-12-05 16:41 ` [PULL 07/14] tests/docker: transition debian-all-test-cross to lcitool Alex Bennée
2025-12-05 16:41 ` [PULL 08/14] tests/docker: drop --disable-[tools|system] from all-test-cross Alex Bennée
2025-12-05 16:41 ` [PULL 09/14] docs/devel: update build environment setup documentation Alex Bennée
2025-12-05 16:41 ` [PULL 10/14] docs/devel: Correct typo Alex Bennée
2025-12-05 16:41 ` [PULL 11/14] MAINTAINERS: update the custom runner entries Alex Bennée
2025-12-05 16:41 ` [PULL 12/14] plugins/core: allow reading of registers during discon events Alex Bennée
2025-12-05 16:41 ` [PULL 13/14] contrib/plugins/uftrace_symbols.py: unbreak --no-prefix-symbols Alex Bennée
2025-12-05 16:41 ` [PULL 14/14] aspeed: Deprecate the fby35 machine Alex Bennée
2025-12-05 20:54 ` [PULL 00/14] Final fixes for 10.2 (gitlab, testing, docker, docs, plugins) Richard Henderson

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=20251205164125.2122504-6-alex.bennee@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.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).