summary refs log tree commit diff stats
path: root/include
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2022-07-26 00:37:45 +0200
committerAlex Bennée <alex.bennee@linaro.org>2022-07-29 09:48:01 +0100
commit0882caf4d607bcfb1efa99034f5f045f30eb43d7 (patch)
treecddc59ef1f87b6d6c6346423dddd81a02966d119 /include
parent9b1268f55ceb0d9390a051cad299b3021dfa9896 (diff)
downloadfocaccia-qemu-0882caf4d607bcfb1efa99034f5f045f30eb43d7.tar.gz
focaccia-qemu-0882caf4d607bcfb1efa99034f5f045f30eb43d7.zip
qapi: Add exit-failure PanicAction
Currently QEMU exits with code 0 on both panic an shutdown. For tests
it is useful to return 1 on panic, so that it counts as a test
failure.

Introduce a new exit-failure PanicAction that makes main() return
EXIT_FAILURE. Tests can use -action panic=exit-failure option to
activate this behavior.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-Id: <20220725223746.227063-2-iii@linux.ibm.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/sysemu/sysemu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index 812f66a31a..31aa45160b 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
@@ -103,7 +103,7 @@ void qemu_boot_set(const char *boot_order, Error **errp);
 bool defaults_enabled(void);
 
 void qemu_init(int argc, char **argv, char **envp);
-void qemu_main_loop(void);
+int qemu_main_loop(void);
 void qemu_cleanup(void);
 
 extern QemuOptsList qemu_legacy_drive_opts;