• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Révision8c5d50236b48571f5eaf64339c13539a03cf5eb5 (tree)
l'heure2020-03-16 00:12:48
AuteurRichard Henderson <richard.henderson@lina...>
CommiterYoshinori Sato

Message de Log

hw/rx: Honor -accel qtest

Issue an error if no kernel, no bios, and not qtest'ing.
Fixes make check-qtest-rx: test/qom-test.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Message-Id: <20190607091116.49044-16-ysato@users.sourceforge.jp>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
We could squash this with the previous patch

Change Summary

Modification

--- a/hw/rx/rx62n.c
+++ b/hw/rx/rx62n.c
@@ -21,12 +21,14 @@
2121
2222 #include "qemu/osdep.h"
2323 #include "qapi/error.h"
24+#include "qemu/error-report.h"
2425 #include "hw/hw.h"
2526 #include "hw/rx/rx62n.h"
2627 #include "hw/loader.h"
2728 #include "hw/sysbus.h"
2829 #include "hw/qdev-properties.h"
2930 #include "sysemu/sysemu.h"
31+#include "sysemu/qtest.h"
3032 #include "cpu.h"
3133
3234 /*
@@ -191,8 +193,14 @@ static void rx62n_realize(DeviceState *dev, Error **errp)
191193 memory_region_init_rom(&s->c_flash, NULL, "codeflash",
192194 RX62N_CFLASH_SIZE, errp);
193195 memory_region_add_subregion(s->sysmem, RX62N_CFLASH_BASE, &s->c_flash);
196+
194197 if (!s->kernel) {
195- rom_add_file_fixed(bios_name, RX62N_CFLASH_BASE, 0);
198+ if (bios_name) {
199+ rom_add_file_fixed(bios_name, RX62N_CFLASH_BASE, 0);
200+ } else if (!qtest_enabled()) {
201+ error_report("No bios or kernel specified");
202+ exit(1);
203+ }
196204 }
197205
198206 /* Initialize CPU */