History | View | Annotate | Download (11.7 kB)
qtest: don't use system command to avoid double fork
Currently we waitpid on the child process we spawn off that doesnothing more than system() another process. While this does notappear to be incorrect, it's wasteful and confusing so get rid ofit.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
qtest: Add MMIO support
Introduce [qtest_]{read,write}[bwlq]() libqtest functions andcorresponding QTest protocol commands to replace local versions inlibi2c-omap.c.
Also convert m48t59-test's cmos_{read,write}_mmio() to {read,write}b().
Signed-off-by: Andreas Färber <afaerber@suse.de>...
libqtest: Introduce qtest_qmpv() and convert remaining macro
In order to convert qmp() macro to an inline function, expose aqtest_qmpv() function, reused by qtest_qmp().
We can't apply GCC_FMT_ATTR() since fdc-test is using zero-length formatstrings, which would result in warnings treated as errors....
libqtest: Wait for the right child PID after killing QEMU
When running "make check" with gcov enabled, we get the followingmessage:
hw/tmp105.gcda:cannot open data file, assuming not executed
The problem happens because:
misc: move include files to include/qemu/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qtest: implement QTEST_STOP
It is quite difficult to debug qtest test cases without extra wrapperscripts for QEMU or similar. This patch adds a simple environmentvariable-based trigger that sends a STOP signal to the QEMU instanceunder test, before attempting to connect to its QMP session....
qtest: Tidy up temporary files properly
Each test litters /tmp with several files: a pid file and twosockets. Tidy up.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qtest: fix infinite loop when QEMU aborts abruptly
From Markus:
Makes "make check" hang:
QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 gtester -k --verbose -m=quick tests/crash-test tests/rtc-test TEST: tests/crash-test... (pid=972) qemu-system-x86_64: Device needs media, but drive is empty...
libqtest: Fix socket_accept() to pass address_len
accept() expects address_len to point to the length of the sockaddr oninput. Initialize it accordingly.
Resolves an assertion due to EFAULT on illumos.
Signed-off-by: Andreas Färber <andreas.faerber@web.de>...
qtest: Add function to send QMP commands
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
qtest: Fix more format errors with qtest_sendf
After adding GCC_FMT_ATTR to qtest_sendf, more format errors are reportedby the compiler. These are fixed here.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qtest: fix memread and memwrite on 32 bit hosts
Use PRIx64 to print 64 bit values to avoid truncationon 32 bit hosts.
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
qtest: add C version of test infrastructure
This also includes a qtest wrapper script to make it easier to launch qtesttests directly.
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>