test-multi-target fails when igvm is enabled if both arm and
aarch64 targets are enabled:

  $ tests/unit/test-multi-target
  TAP version 14
  # random seed: R02S0c27cf3526927aa4a7f822f0a8315b3e
  1..2
  # Start of multi-targets tests
  # Start of qom-types-are-unique tests
  Registering `vm-launch-update' which already exists
  # child process (/multi-targets/qom-types-are-unique/aarch64 [1982534]) 
killed by signal 6 (Aborted)
  # child process (/multi-targets/qom-types-are-unique/aarch64 [1982534]) 
stdout: ""
  # child process (/multi-targets/qom-types-are-unique/aarch64 [1982534]) 
stderr: "Registering `vm-launch-update' which already exists\n"
  **
  ERROR:../tests/unit/test-multi-target.c:41:test_qom_types_are_unique: child 
process (/multi-targets/qom-types-are-unique/aarch64 [1982534]) failed 
unexpectedly
  not ok /multi-targets/qom-types-are-unique/aarch64 - 
ERROR:../tests/unit/test-multi-target.c:41:test_qom_types_are_unique: child 
process (/multi-targets/qom-types-are-unique/aarch64 [1982534]) failed 
unexpectedly
  Bail out!
  Aborted                    (core dumped) tests/unit/test-multi-target

This is because it is linked twice into test-multi-target
and thus the same device class object code is duplicated and
thus the class name gets registered twice.

Signed-off-by: Daniel P. Berrangé <[email protected]>
---
 hw/misc/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/misc/meson.build b/hw/misc/meson.build
index fc3800baec0..7a071af82b0 100644
--- a/hw/misc/meson.build
+++ b/hw/misc/meson.build
@@ -170,7 +170,7 @@ specific_ss.add(when: 'CONFIG_MIPS_ITU', if_true: 
files('mips_itu.c'))
 specific_ss.add(when: 'CONFIG_RISCV_MIPS_CMGCR', if_true: 
files('riscv_cmgcr.c'))
 specific_ss.add(when: 'CONFIG_RISCV_MIPS_CPC', if_true: files('riscv_cpc.c'))
 if igvm.found()
-   specific_ss.add(when: 'CONFIG_FW_CFG_DMA', if_true: 
files('vmlaunchupdate.c'))
+   system_ss.add(when: 'CONFIG_FW_CFG_DMA', if_true: files('vmlaunchupdate.c'))
 endif
 
 system_ss.add(when: 'CONFIG_SBSA_REF', if_true: files('sbsa_ec.c'))
-- 
2.56.0


Reply via email to