From c7f0f3b1c826901358a0656f80a5fabb88f73c61 Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Wed, 28 Mar 2012 15:42:02 +0200 Subject: qtest: add test framework The idea behind qtest is pretty simple. Instead of executing a CPU via TCG or KVM, rely on an external process to send events to the device model that the CPU would normally generate. qtest presents itself as an accelerator. In addition, a new option is added to establish a qtest server (-qtest) that takes a character device. This is what allows the external process to send CPU events to the device model. qtest uses a simple line based protocol to send the events. Documentation of that protocol is in qtest.c. I considered reusing the monitor for this job. Adding interrupts would be a bit difficult. In addition, logging would also be difficult. qtest has extensive logging support. All protocol commands are logged with time stamps using a new command line option (-qtest-log). Logging is important since ultimately, this is a feature for debugging. Signed-off-by: Anthony Liguori Signed-off-by: Paolo Bonzini Signed-off-by: Anthony Liguori --- qemu-options.hx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'qemu-options.hx') diff --git a/qemu-options.hx b/qemu-options.hx index 662f571527..fe88939805 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2715,6 +2715,14 @@ the @var{simple} tracing backend. @end table ETEXI +DEF("qtest", HAS_ARG, QEMU_OPTION_qtest, + "-qtest CHR specify tracing options\n", + QEMU_ARCH_ALL) + +DEF("qtest-log", HAS_ARG, QEMU_OPTION_qtest_log, + "-qtest-log LOG specify tracing options\n", + QEMU_ARCH_ALL) + HXCOMM This is the last statement. Insert new options before this line! STEXI @end table -- cgit v1.2.3