From f48e9e218ccd66c593e9eabf5db70e65b265c294 Mon Sep 17 00:00:00 2001 From: Richard W.M. Jones Date: Feb 27 2023 17:43:05 +0000 Subject: Fix rtl8139-test Patch sent upstream 2023-02-27. --- diff --git a/0001-target-i386-the-sgx_epc_get_section-stub-is-reachabl.patch b/0001-target-i386-the-sgx_epc_get_section-stub-is-reachabl.patch index 3f0bae7..5245b0f 100644 --- a/0001-target-i386-the-sgx_epc_get_section-stub-is-reachabl.patch +++ b/0001-target-i386-the-sgx_epc_get_section-stub-is-reachabl.patch @@ -1,7 +1,7 @@ From e54512fe75f85640c0c73e53e6f8bd0b9d193529 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 1 Feb 2022 20:09:37 +0100 -Subject: [PATCH 1/6] target/i386: the sgx_epc_get_section stub is reachable +Subject: [PATCH 1/7] target/i386: the sgx_epc_get_section stub is reachable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/0002-tests-Disable-pci_virtio_vga-for-ppc64.patch b/0002-tests-Disable-pci_virtio_vga-for-ppc64.patch index c940f0d..48c4203 100644 --- a/0002-tests-Disable-pci_virtio_vga-for-ppc64.patch +++ b/0002-tests-Disable-pci_virtio_vga-for-ppc64.patch @@ -1,7 +1,7 @@ From 2f0a0afbf915d36c39c5cfac1e31c6edc7f47bef Mon Sep 17 00:00:00 2001 From: "Eduardo Lima (Etrunko)" Date: Thu, 1 Sep 2022 12:43:49 -0300 -Subject: [PATCH 2/6] tests: Disable pci_virtio_vga for ppc64 +Subject: [PATCH 2/7] tests: Disable pci_virtio_vga for ppc64 starting QEMU: exec ./qemu-system-ppc64 -qtest unix:/tmp/qtest-2378197.sock -qtest-log /dev/null -chardev socket,path=/tmp/qtest-2378197.qmp,id=char0 -mon chardev=char0,mode=control -display none -vga none -device virtio-vga -accel qtest stderr: diff --git a/0003-Revert-linux-user-add-more-compat-ioctl-definitions.patch b/0003-Revert-linux-user-add-more-compat-ioctl-definitions.patch index e0c2b92..f69907e 100644 --- a/0003-Revert-linux-user-add-more-compat-ioctl-definitions.patch +++ b/0003-Revert-linux-user-add-more-compat-ioctl-definitions.patch @@ -1,7 +1,7 @@ From 5c1d2f920c14d6e8f4ac7abc62714eadaa60f228 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Tue, 10 Jan 2023 12:37:14 -0500 -Subject: [PATCH 3/6] Revert "linux-user: add more compat ioctl definitions" +Subject: [PATCH 3/7] Revert "linux-user: add more compat ioctl definitions" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/0004-Revert-linux-user-fix-compat-with-glibc-2.36-sys-mou.patch b/0004-Revert-linux-user-fix-compat-with-glibc-2.36-sys-mou.patch index b872587..6487990 100644 --- a/0004-Revert-linux-user-fix-compat-with-glibc-2.36-sys-mou.patch +++ b/0004-Revert-linux-user-fix-compat-with-glibc-2.36-sys-mou.patch @@ -1,7 +1,7 @@ From b40cf0a490c28d5b79e05382d061983b92a7b2b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Tue, 10 Jan 2023 12:37:25 -0500 -Subject: [PATCH 4/6] Revert "linux-user: fix compat with glibc >= 2.36 +Subject: [PATCH 4/7] Revert "linux-user: fix compat with glibc >= 2.36 sys/mount.h" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 diff --git a/0005-block-fix-detect-zeroes-with-BDRV_REQ_REGISTERED_BUF.patch b/0005-block-fix-detect-zeroes-with-BDRV_REQ_REGISTERED_BUF.patch index 54ea7bd..419a284 100644 --- a/0005-block-fix-detect-zeroes-with-BDRV_REQ_REGISTERED_BUF.patch +++ b/0005-block-fix-detect-zeroes-with-BDRV_REQ_REGISTERED_BUF.patch @@ -1,7 +1,7 @@ From db788c896eb1378ebc1f20dcc4954616a7631919 Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi Date: Tue, 7 Feb 2023 15:37:16 -0500 -Subject: [PATCH 5/6] block: fix detect-zeroes= with BDRV_REQ_REGISTERED_BUF +Subject: [PATCH 5/7] block: fix detect-zeroes= with BDRV_REQ_REGISTERED_BUF When a write request is converted into a write zeroes request by the detect-zeroes= feature, it is no longer associated with an I/O buffer. diff --git a/0006-PATCH-test-vmstate-fix-bad-GTree-usage-use-after-fre.patch b/0006-PATCH-test-vmstate-fix-bad-GTree-usage-use-after-fre.patch index f4ff87f..7ad17be 100644 --- a/0006-PATCH-test-vmstate-fix-bad-GTree-usage-use-after-fre.patch +++ b/0006-PATCH-test-vmstate-fix-bad-GTree-usage-use-after-fre.patch @@ -1,7 +1,7 @@ From 930def8769940600dd7dd587ec2accd4a8b6e1f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Mon, 27 Feb 2023 16:02:51 +0000 -Subject: [PATCH 6/6] [PATCH] test-vmstate: fix bad GTree usage, use-after-free +Subject: [PATCH 6/7] [PATCH] test-vmstate: fix bad GTree usage, use-after-free MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/0007-tests-Ensure-TAP-version-is-printed-before-other-mes.patch b/0007-tests-Ensure-TAP-version-is-printed-before-other-mes.patch new file mode 100644 index 0000000..c142e77 --- /dev/null +++ b/0007-tests-Ensure-TAP-version-is-printed-before-other-mes.patch @@ -0,0 +1,42 @@ +From 4021e0a116b568c312b864dfc27dfeed3317538a Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Mon, 27 Feb 2023 17:37:10 +0000 +Subject: [PATCH 7/7] tests: Ensure TAP version is printed before other + messages + +These two tests were failing with this error: + + stderr: + TAP parsing error: version number must be on the first line + [...] + Unknown TAP version. The first line MUST be `TAP version `. Assuming version 12. + +This can be fixed by ensuring we always call g_test_init first in the +body of main. + +Thanks: Daniel Berrange, for diagnosing the problem +Signed-off-by: Richard W.M. Jones +--- + tests/qtest/rtl8139-test.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/tests/qtest/rtl8139-test.c b/tests/qtest/rtl8139-test.c +index 8fa3313cc3..90bb616974 100644 +--- a/tests/qtest/rtl8139-test.c ++++ b/tests/qtest/rtl8139-test.c +@@ -196,9 +196,10 @@ int main(int argc, char **argv) + { + int ret; + +- qtest_start("-device rtl8139"); +- + g_test_init(&argc, &argv, NULL); ++ ++ qtest_start("-device rtl8139"); ++ + qtest_add_func("/rtl8139/nop", nop); + qtest_add_func("/rtl8139/timer", test_init); + +-- +2.37.3 + diff --git a/qemu.spec b/qemu.spec index 2ed7574..4a135ad 100644 --- a/qemu.spec +++ b/qemu.spec @@ -357,6 +357,8 @@ Patch: 0005-block-fix-detect-zeroes-with-BDRV_REQ_REGISTERED_BUF.patch # https://gitlab.com/qemu-project/qemu/-/issues/1518 # Patch is NOT UPSTREAM. Patch: 0006-PATCH-test-vmstate-fix-bad-GTree-usage-use-after-fre.patch +# Fix one of the tests. Sent upstream 2023-02-27. +Patch: 0007-tests-Ensure-TAP-version-is-printed-before-other-mes.patch BuildRequires: meson >= %{meson_version} BuildRequires: zlib-devel