| Branch: | Revision:

root / qtest.c @ feature-archipelago

History | View | Annotate | Download (13.8 kB)

# Date Author Comment
23802b4f 02/14/2014 10:12 pm Fam Zheng

qtest: Don't segfault with invalid -qtest option

This prints an error message, instead of core dump, when "-qtest"
option value is invalid, e.g.:

$ ./x86_64-softmmu/qemu-system-x86_64 -qtest unknown
qemu-system-x86_64: Failed to initialize device for qtest:...
b3be57c3 02/13/2014 06:47 pm Michael S. Tsirkin

qtest: don't report signals if qtest driver enabled

qtest driver always uses signals to kill qemu
no need to report it, whatever the accelerator state.

Add API to detect qtest driver, and suppress reporting
signals in this case.

Reported-by: Andreas Färber <>...

d4fce24f 12/10/2013 12:29 pm Paolo Bonzini

qtest: split configuration of qtest accelerator and chardev

qtest uses the icount infrastructure to implement a test-driven vm_clock. This
however is not necessary when using qtest as a "probe" together with a normal
, KVM- or Xen-based virtual machine. Hence, split out the call to...

35aa3fb3 09/02/2013 07:08 pm Richard Henderson

qtest: Fix FMT_timeval vs time_t

Since FMT_timeval unconditionally uses %ld for both tv_sec and tv_usec,
and already casts tv_usec to long, also cast tv_sec to long.

Cc: Andreas Färber <>
Reviewed-by: Aurelien Jarno <>...

40daca54 08/22/2013 08:14 pm Alex Bligh

aio / timers: Rearrange timer.h & make legacy functions call non-legacy

Rearrange timer.h so it is in order by function type.

Make legacy functions call non-legacy functions rather than vice-versa.

Convert cpus.c to use new API.

Signed-off-by: Alex Bligh <>...

bc72ad67 08/22/2013 08:14 pm Alex Bligh

aio / timers: Switch entire codebase to the new timer API

This is an autogenerated patch using scripts/switch-timer-api.

Switch the entire code base to using the new timer API.

Note this patch may introduce some line length issues.

Signed-off-by: Alex Bligh <>...

ac70aafc 08/22/2013 08:10 pm Alex Bligh

aio / timers: Use all timerlists in icount warp calculations

Notify all timerlists derived from vm_clock in icount warp

When calculating timer delay based on vm_clock deadline, use
all timerlists.

For compatibility, maintain an apparent bug where when using...

ba646ff6 07/18/2013 09:27 pm Markus Armbruster

qtest: Don't reset on qtest chardev connect

libqtest's qtest_init() connecting to the qtest socket triggers reset.
This was coded in the hope we could use the same QEMU process for
multiple tests that way. Never used. Injects an extra reset even
when it's not used, and that can mess up tests such as the one of...

56863d4f 04/22/2013 05:11 pm Peter Maydell

qtest: Handle addresses and values for {in, out}[bwl] as unsigned

Handle the addresses and values for {in,out}[bwl] as unsigned (ie
with strtoul), as per the protocol specification comment. This fixes
a test failure in test_i440fx_defaults on 32-bit hosts where the test...

dccfcd0e 04/15/2013 07:19 pm Paolo Bonzini

sysemu: avoid proliferation of include/ subdirectories

Signed-off-by: Paolo Bonzini <>

0fbf01fe 03/26/2013 05:08 pm Anthony Liguori

qtest: use synchronous I/O for char device

Peter reported that rtc-test would periodically hang. It turns out
this was due to an EAGAIN occurring on qemu_chr_fe_write.

Instead of heavily refactoring qtest, just use a synchronous version
of the write operation for qemu_chr_fe_write to address this problem....

872536bf 02/18/2013 04:39 pm Andreas Färber

qtest: Add MMIO support

Introduce [qtest_]{read,write}[bwlq]() libqtest functions and
corresponding QTest protocol commands to replace local versions in

Also convert m48t59-test's cmos_{read,write}_mmio() to {read,write}b().

Signed-off-by: Andreas Färber <>...

5dd6be06 02/11/2013 09:22 pm Andreas Färber

qtest: Use strtoull() for uint64_t

On 32-bit hosts, unsigned long may be uint32_t and uint64_t may be
unsigned long long. Account for this by always using strtoull().
We were already using strtoll() for int64_t.

Signed-off-by: Andreas Färber <>...

d5286af5 02/01/2013 11:08 pm liguang

accel: change {xen, kvm, tcg, qtest}_allowed from int to bool

Signed-off-by: liguang <>
Signed-off-by: Anthony Liguori <>

927d4878 12/19/2012 09:32 am Paolo Bonzini

softmmu: move remaining include files to include/ subdirectories

Signed-off-by: Paolo Bonzini <>

9c17d615 12/19/2012 09:32 am Paolo Bonzini

softmmu: move include files to include/sysemu/

Signed-off-by: Paolo Bonzini <>

022c62cb 12/19/2012 09:31 am Paolo Bonzini

exec: move include files to include/exec/

Signed-off-by: Paolo Bonzini <>

7f3bf92f 04/24/2012 05:50 pm Richard Henderson

qtest: Fix tv_usec != long

Sparc Debian 5.0.8 does not define __suseconds_t as long,
but FMT_timeval expects %ld.

Reviewed-by: Paolo Bonzini <>
Signed-off-by: Richard Henderson <>
Cc: Anthony Liguori <>...

3f97fd85 04/03/2012 11:34 am Stefan Weil

qtest: Add missing GCC_FMT_ATTR

gcc reports an error when the code is compiled with -Wmissing-format-attribute.

Signed-off-by: Stefan Weil <>
Signed-off-by: Stefan Hajnoczi <>

6e92466a 04/02/2012 05:43 pm Anthony Liguori

qtest: use qemu_gettimeofday()

On linux, qemu_timeval will always be two long ints. On windows, we use our
own struct definition. This should fix win64.

Signed-off-by: Anthony Liguori <>

6b7cff76 03/30/2012 08:56 pm Anthony Liguori

qtest: fix 32-bit build

time_t appears to be an unsigned long so use %ld.

Reported-by: Stefan Weil <>
Signed-off-by: Anthony Liguori <>

c7f0f3b1 03/30/2012 04:14 pm Anthony Liguori

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...

20288345 03/30/2012 04:14 pm Paolo Bonzini

qtest: IRQ interception infrastructure

Since /i440fx/piix3 is being removed from the composition tree, the
IO-APIC is placed under /i440fx. This is wrong and should be changed
as soon as the /i440fx/piix3 path is put back.

Signed-off-by: Paolo Bonzini <>...

8156be56 03/30/2012 04:14 pm Paolo Bonzini

qtest: add clock management

This patch combines qtest and -icount together to turn the vm_clock
into a source that can be fully managed by the client. To this end new
commands clock_step and clock_set are added. Hooking them with libqtest
is left as an exercise to the reader....