From 46fbd3088c0e9d9cb793d1e8f2205c75b64da2a5fc20255c1e62a223eb8f772d Mon Sep 17 00:00:00 2001
From: Li Zhang
Date: Thu, 24 Mar 2022 11:21:17 +0000
Subject: [PATCH] Accepting request 964640 from
home:lizhang:branches:Virtualization
Fix some problems for testsuit building
* Patches added:
Fix-the-module-building-problem-for-s390.patch
tests-qemu-iotests-040-Skip-TestCommitWi.patch
tests-qemu-iotests-testrunner-Quote-case.patch
OBS-URL: https://build.opensuse.org/request/show/964640
OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=697
---
...the-module-building-problem-for-s390.patch | 31 +++++++++++++
bundles.tar.xz | 4 +-
qemu.changes | 8 ++++
qemu.spec | 6 +++
...s-qemu-iotests-040-Skip-TestCommitWi.patch | 33 ++++++++++++++
...s-qemu-iotests-testrunner-Quote-case.patch | 43 +++++++++++++++++++
6 files changed, 123 insertions(+), 2 deletions(-)
create mode 100644 Fix-the-module-building-problem-for-s390.patch
create mode 100644 tests-qemu-iotests-040-Skip-TestCommitWi.patch
create mode 100644 tests-qemu-iotests-testrunner-Quote-case.patch
diff --git a/Fix-the-module-building-problem-for-s390.patch b/Fix-the-module-building-problem-for-s390.patch
new file mode 100644
index 00000000..a8497bb0
--- /dev/null
+++ b/Fix-the-module-building-problem-for-s390.patch
@@ -0,0 +1,31 @@
+From: Li Zhang
+Date: Thu, 24 Mar 2022 11:47:08 +0100
+Subject: Fix the module building problem for s390
+
+When building the testsuit for s390, it reports errors as the following:
+
+hw-display-virtio-gpu.so: undefined symbol: virtio_vmstate_info
+hw-display-virtio-gpu-gl.so: undefined symbol: virtio_gpu_ctrl_response
+hw-display-virtio-gpu-pci.so: undefined symbol: virtio_pci_types_register
+hw-display-virtio-gpu-pci-gl.so: undefined symbol: virtio_pci_types_register
+
+Signed-off-by: Li Zhang
+---
+ util/module.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/util/module.c b/util/module.c
+index 8370d4c6209eda4319342b202f6b..03896b7c469dedc5a80695aa7dee 100644
+--- a/util/module.c
++++ b/util/module.c
+@@ -125,6 +125,10 @@ bool s390x_blocklist(const char *name)
+ "hw-display-qxl",
+ "hw-display-virtio-vga",
+ "hw-display-virtio-vga-gl",
++ "hw-display-virtio-gpu",
++ "hw-display-virtio-gpu-gl",
++ "hw-display-virtio-gpu-pci",
++ "hw-display-virtio-gpu-pci-gl",
+ "hw-usb-host",
+ "hw-usb-redirect",
+ "hw-usb-smartcard"
diff --git a/bundles.tar.xz b/bundles.tar.xz
index 7c65ccb2..2ecdf15c 100644
--- a/bundles.tar.xz
+++ b/bundles.tar.xz
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:29f01672b01bdb2faf4fafe05c4f46f722be2e8b373e66dea35172397c9bcf83
-size 84340
+oid sha256:16f22f31ecdfe57207430cb48bea8cc3496c98346e48b387a3ef234dcc080b62
+size 88100
diff --git a/qemu.changes b/qemu.changes
index 008906d3..ff02fcdd 100644
--- a/qemu.changes
+++ b/qemu.changes
@@ -1,3 +1,11 @@
+-------------------------------------------------------------------
+Thu Mar 24 11:18:54 UTC 2022 - Li Zhang
+
+* Patches added:
+ Fix-the-module-building-problem-for-s390.patch
+ tests-qemu-iotests-040-Skip-TestCommitWi.patch
+ tests-qemu-iotests-testrunner-Quote-case.patch
+
-------------------------------------------------------------------
Wed Mar 23 07:46:11 UTC 2022 - Dario Faggioli
diff --git a/qemu.spec b/qemu.spec
index be22404c..566e9bfe 100644
--- a/qemu.spec
+++ b/qemu.spec
@@ -218,6 +218,9 @@ Patch00071: hw-scsi-megasas-check-for-NULL-frame-in-.patch
Patch00072: hw-nvram-at24-return-0xff-if-1-byte-addr.patch
Patch00073: hw-i386-amd_iommu-Fix-maybe-uninitialize.patch
Patch00074: tools-virtiofsd-Add-rseq-syscall-to-the-.patch
+Patch00075: tests-qemu-iotests-040-Skip-TestCommitWi.patch
+Patch00076: tests-qemu-iotests-testrunner-Quote-case.patch
+Patch00077: Fix-the-module-building-problem-for-s390.patch
# Patches applied in roms/seabios/:
Patch01000: seabios-use-python2-explicitly-as-needed.patch
Patch01001: seabios-switch-to-python3-as-needed.patch
@@ -1215,6 +1218,9 @@ This package records qemu testsuite results and represents successful testing.
%patch00072 -p1
%patch00073 -p1
%patch00074 -p1
+%patch00075 -p1
+%patch00076 -p1
+%patch00077 -p1
%patch01000 -p1
%patch01001 -p1
%patch01002 -p1
diff --git a/tests-qemu-iotests-040-Skip-TestCommitWi.patch b/tests-qemu-iotests-040-Skip-TestCommitWi.patch
new file mode 100644
index 00000000..f14eb081
--- /dev/null
+++ b/tests-qemu-iotests-040-Skip-TestCommitWi.patch
@@ -0,0 +1,33 @@
+From: Thomas Huth
+Date: Wed, 23 Feb 2022 13:31:27 +0100
+Subject: tests/qemu-iotests/040: Skip TestCommitWithFilters without 'throttle'
+
+Git-commit: 024354ea9164d3c4b6fd766784939fe39fa4e166
+
+iotest 040 already has some checks for the availability of the 'throttle'
+driver, but some new code has been added in the course of time that
+depends on 'throttle' but does not check for its availability. Add
+a check to the TestCommitWithFilters class so that this iotest now
+also passes again if 'throttle' has not been enabled in the QEMU
+binaries.
+
+Signed-off-by: Thomas Huth
+Message-Id: <20220223123127.3206042-1-thuth@redhat.com>
+Signed-off-by: Hanna Reitz
+Signed-off-by: Li Zhang
+---
+ tests/qemu-iotests/040 | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tests/qemu-iotests/040 b/tests/qemu-iotests/040
+index 6af5ab9e764cc5a061712a622a81..0e1cfd7e49d1b02f41d286c95f74 100755
+--- a/tests/qemu-iotests/040
++++ b/tests/qemu-iotests/040
+@@ -744,6 +744,7 @@ class TestCommitWithFilters(iotests.QMPTestCase):
+ pattern_file)
+ self.assertFalse('Pattern verification failed' in result)
+
++ @iotests.skip_if_unsupported(['throttle'])
+ def setUp(self):
+ qemu_img('create', '-f', iotests.imgfmt, self.img0, '64M')
+ qemu_img('create', '-f', iotests.imgfmt, self.img1, '64M')
diff --git a/tests-qemu-iotests-testrunner-Quote-case.patch b/tests-qemu-iotests-testrunner-Quote-case.patch
new file mode 100644
index 00000000..e6c88e4f
--- /dev/null
+++ b/tests-qemu-iotests-testrunner-Quote-case.patch
@@ -0,0 +1,43 @@
+From: Thomas Huth
+Date: Wed, 23 Feb 2022 13:43:53 +0100
+Subject: tests/qemu-iotests/testrunner: Quote "case not run" lines in TAP mode
+
+Git-commit: db4b2133b8d3012dfd1977dc12d48d6bf46543d6
+
+In TAP mode, the stdout is reserved for the TAP protocol, so we
+have to make sure to mark other lines with a comment '#' character
+at the beginning to avoid that the TAP parser at the other end
+gets confused.
+
+To test this condition, run "configure" for example with:
+
+ --block-drv-rw-whitelist=copy-before-write,qcow2,raw,file,host_device,blkdebug,null-co,copy-on-read
+
+so that iotest 041 will report that some tests are not run due to
+the missing "quorum" driver. Without this change, "make check-block"
+fails since the meson tap parser gets confused by these messages.
+
+Signed-off-by: Thomas Huth
+Message-Id: <20220223124353.3273898-1-thuth@redhat.com>
+Signed-off-by: Hanna Reitz
+Signed-off-by: Li Zhang
+---
+ tests/qemu-iotests/testrunner.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunner.py
+index 0e29c2fddddb2e7c611f5ad1f366..a7e2c16e09559054e53da60a1ac9 100644
+--- a/tests/qemu-iotests/testrunner.py
++++ b/tests/qemu-iotests/testrunner.py
+@@ -305,7 +305,10 @@ class TestRunner(ContextManager['TestRunner']):
+ test_field_width=test_field_width)
+
+ if res.casenotrun:
+- print(res.casenotrun)
++ if self.tap:
++ print('#' + res.casenotrun.replace('\n', '\n#'))
++ else:
++ print(res.casenotrun)
+
+ return res
+