SHA256
1
0
forked from pool/qemu

Accepting request 919603 from home:jziviani:branches:Virtualization

- Fix testsuite dependencies (bsc#1190573)
* Patches added:
  modules-quick-fix-a-fundamental-error-in.patch

OBS-URL: https://build.opensuse.org/request/show/919603
OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=674
This commit is contained in:
José Ricardo Ziviani 2021-09-16 23:21:22 +00:00 committed by Git OBS Bridge
parent 7987d2bc69
commit 9a6945b9db
4 changed files with 32 additions and 12 deletions

View File

@ -8,7 +8,7 @@
</conditions>
<hardware>
<disk>
<size unit="G">15</size>
<size unit="G">10</size>
</disk>
</hardware>
</overwrite>
@ -32,7 +32,7 @@
</conditions>
<hardware>
<memory>
<size unit="M">4096</size>
<size unit="M">1200</size>
</memory>
</hardware>
</overwrite>
@ -42,7 +42,6 @@
<arch>i586</arch>
<arch>x86_64</arch>
<arch>ppc64le</arch>
<arch>s390x</arch>
<package>qemu:testsuite</package>
</conditions>
<hardware>
@ -68,7 +67,6 @@
<conditions>
<arch>aarch64</arch>
<arch>x86_64</arch>
<arch>s390x</arch>
<package>qemu</package>
</conditions>
<hardware>

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:daf109e90b1e668fee14e71cc9d7f0e34416473336233161394915d1aef98172
size 44824
oid sha256:75b23e881e084f164f0e4cc474a7141d1a6ec4a3b5a3494ffc5f5e61d516f8a5
size 45100

View File

@ -2,11 +2,26 @@ From: "Jose R. Ziviani" <jziviani@suse.de>
Date: Thu, 16 Sep 2021 00:52:34 -0300
Subject: modules: quick-fix a fundamental error in modules
Git-commit: 00000000000000000000000000000000000000000
References: bsc#1190573
modinfo.c is generated regarding the arch being built. However, if we
build multiple arch targets at once, modinfo.c will list modules that
might not be supported by all these targets. When trying to run these
targets, errors[1] will appear.
This patch is a bandaid specific to s390x. It will be removed as soon
as a better approach is fixed upstream.
[1]
$ qemu-system-s390x -nodefaults -display none -accel qtest -M none -device help
Failed to open module: /home/jose/qemu/build/hw-display-virtio-vga.so: undefined symbol: vmstate_vga_common
Signed-off-by: Jose R. Ziviani <jziviani@suse.de>
---
include/qemu/module.h | 1 +
util/module.c | 26 ++++++++++++++++++++++++++
2 files changed, 27 insertions(+)
util/module.c | 33 +++++++++++++++++++++++++++++++++
2 files changed, 34 insertions(+)
diff --git a/include/qemu/module.h b/include/qemu/module.h
index 3deac0078b9d4d62d0549427b7ec..49d46532000e8c7211d43f7b705c 100644
@ -21,10 +36,10 @@ index 3deac0078b9d4d62d0549427b7ec..49d46532000e8c7211d43f7b705c 100644
/**
* DOC: module info annotation macros
diff --git a/util/module.c b/util/module.c
index 6bb4ad915a1c86f1601a4913a29c..485c137c79e9d4e45c4708bb8017 100644
index 6bb4ad915a1c86f1601a4913a29c..8370d4c6209eda4319342b202f6b 100644
--- a/util/module.c
+++ b/util/module.c
@@ -119,6 +119,28 @@ static const QemuModinfo module_info_stub[] = { {
@@ -119,6 +119,35 @@ static const QemuModinfo module_info_stub[] = { {
static const QemuModinfo *module_info = module_info_stub;
static const char *module_arch;
@ -41,6 +56,13 @@ index 6bb4ad915a1c86f1601a4913a29c..485c137c79e9d4e45c4708bb8017 100644
+
+ const size_t len = sizeof(blocklist) / sizeof(blocklist[0]);
+
+ if (strcmp(module_arch, "x86_64") == 0 ||
+ strcmp(module_arch, "i386") == 0 ||
+ strcmp(module_arch, "arm") == 0 ||
+ strcmp(module_arch, "aarch64") == 0) {
+ return false;
+ }
+
+ for (size_t i = 0; i < len; i++) {
+ if (strcmp(blocklist[i], name) == 0) {
+ return true;
@ -53,7 +75,7 @@ index 6bb4ad915a1c86f1601a4913a29c..485c137c79e9d4e45c4708bb8017 100644
void module_init_info(const QemuModinfo *info)
{
module_info = info;
@@ -131,6 +153,10 @@ void module_allow_arch(const char *arch)
@@ -131,6 +160,10 @@ void module_allow_arch(const char *arch)
static bool module_check_arch(const QemuModinfo *modinfo)
{

View File

@ -1,7 +1,7 @@
-------------------------------------------------------------------
Thu Sep 16 03:55:52 UTC 2021 - José Ricardo Ziviani <jose.ziviani@suse.com>
- Fix testsuite dependencies
- Fix testsuite dependencies (bsc#1190573)
* Patches added:
modules-quick-fix-a-fundamental-error-in.patch