aboutsummaryrefslogtreecommitdiff
path: root/qtest.c
AgeCommit message (Collapse)AuthorFilesLines
2012-04-24qtest: Fix tv_usec != longRichard Henderson1-4/+4
Sparc Debian 5.0.8 does not define __suseconds_t as long, but FMT_timeval expects %ld. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net> Cc: Anthony Liguori <aliguori@us.ibm.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-04-03qtest: Add missing GCC_FMT_ATTRStefan Weil1-1/+2
gcc reports an error when the code is compiled with -Wmissing-format-attribute. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-04-02qtest: use qemu_gettimeofday()Anthony Liguori1-7/+7
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 <aliguori@us.ibm.com>
2012-03-30qtest: fix 32-bit buildAnthony Liguori1-1/+1
time_t appears to be an unsigned long so use %ld. Reported-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-30qtest: add clock managementPaolo Bonzini1-0/+45
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. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-30qtest: IRQ interception infrastructurePaolo Bonzini1-24/+68
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 <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-30qtest: add test frameworkAnthony Liguori1-0/+354
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 <aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>