- 16 6月, 2016 1 次提交
-
-
由 Andrea Arcangeli 提交于
I kept getting timeouts and unix socket accept failures under high load, the patch fixes it. Signed-off-by: NAndrea Arcangeli <aarcange@redhat.com> Reviewed-by: NMarcel Apfelbaum <marcel@redhat.com> Message-id: 1465816605-29488-6-git-send-email-dgilbert@redhat.com Message-Id: <1465816605-29488-6-git-send-email-dgilbert@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com>
-
- 07 6月, 2016 1 次提交
-
-
由 Peter Maydell 提交于
Remove glib.h includes, as it is provided by osdep.h. This commit was created with scripts/clean-includes. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NEric Blake <eblake@redhat.com> Tested-by: NEric Blake <eblake@redhat.com> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
- 16 2月, 2016 1 次提交
-
-
由 Peter Maydell 提交于
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NEric Blake <eblake@redhat.com> Tested-by: NEric Blake <eblake@redhat.com>
-
- 05 12月, 2015 1 次提交
-
-
由 Markus Armbruster 提交于
We have several function parameters declared as void (*fn). This is just a stupid way to write void *, and the only purpose writing it like that could serve is obscuring the sin of bypassing the type system without need. The original sin is commit 49ee3590: its qtest_add_func() is a wrapper for g_test_add_func(). Fix the parameter type to match g_test_add_func()'s. This uncovers type errors in ide-test.c; fix them. Commit 7949c0e3 faithfully repeated the sin for qtest_add_data_func(). Fix it the same way, along with a harmless type error uncovered in vhost-user-test.c. Commit 063c23d9 repeated it for qtest_add_abrt_handler(). The screwy parameter gets assigned to GHook member func, so change its type to match. Requires wrapping kill_qemu() to keep the type checker happy. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> [AF/armbru: Inline GTestFunc/GTestDataFunc typedef for old GLib] Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 26 11月, 2015 1 次提交
-
-
由 Paolo Bonzini 提交于
Even though we still have the "streamer" concept, the tokens can now be deleted as they are read. While doing so convert from QList to GQueue, since the next step will make tokens not a QObject and we will have to do the conversion anyway. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Message-Id: <1448300659-23559-4-git-send-email-pbonzini@redhat.com> Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
- 25 10月, 2015 1 次提交
-
-
由 Marc-André Lureau 提交于
Allow a test to add abort handlers, use GHook for all handlers. There is currently no way to remove a handler, but it could be later added if needed. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NClaudio Fontana <claudio.fontana@huawei.com>
-
- 20 10月, 2015 1 次提交
-
-
由 Marc-André Lureau 提交于
Add a few functions to interact with qmp via a simple fd. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NMichael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
-
- 09 10月, 2015 2 次提交
-
-
由 Markus Armbruster 提交于
New convenience function hmp() to facilitate use of human-monitor-command in tests. Use it to simplify its existing uses. To blend into existing libqtest code, also add qtest_hmpv() and qtest_hmp(). That, and the egregiously verbose GTK-Doc comment format make this patch look bigger than it is. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Reviewed-by: NThomas Huth <thuth@redhat.com> Message-Id: <1443689999-12182-7-git-send-email-armbru@redhat.com>
-
由 Markus Armbruster 提交于
Unused since commit d7668251. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Message-Id: <1443689999-12182-6-git-send-email-armbru@redhat.com> Reviewed-by: NThomas Huth <thuth@redhat.com>
-
- 23 5月, 2015 3 次提交
-
-
由 John Snow 提交于
Instead of converting each byte one-at-a-time and then sending each byte over the wire, use sprintf() to pre-compute all of the hex nibs into a single buffer, then send the entire buffer all at once. This gives a moderate speed boost to memread() and memwrite() functions. Signed-off-by: NJohn Snow <jsnow@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Message-id: 1431021095-7558-2-git-send-email-jsnow@redhat.com
-
由 John Snow 提交于
Previously, memset was just a frontend to write() and only stupidly sent the pattern many times across the wire. Let's not discuss who stupidly wrote it like that in the first place. (Hint: It was me.) Signed-off-by: NJohn Snow <jsnow@redhat.com> Message-id: 1430864578-22072-4-git-send-email-jsnow@redhat.com
-
由 John Snow 提交于
For larger pieces of data that won't need to be debugged and viewing the hex nibbles is unlikely to be useful, we can encode data using base64 instead of encoding each byte as %02x, which leads to some space savings and faster reads/writes. For now, the default is left as hex nibbles in memwrite() and memread(). For the purposes of making qtest io easier to read and debug, some callers may want to specify using the old encoding format for small patches of data where the savings from base64 wouldn't be that profound. memwrite/memread use a data encoding that takes 2x the size of the original buffer, but base64 uses "only" (4/3)x, so for larger buffers we can save a decent amount of time and space. Signed-off-by: NJohn Snow <jsnow@redhat.com> Message-id: 1430864578-22072-3-git-send-email-jsnow@redhat.com
-
- 29 4月, 2015 3 次提交
-
-
由 Ed Maste 提交于
Signed-off-by: NEd Maste <emaste@freebsd.org> Reviewed-by: NJohn Snow <jsnow@redhat.com> Message-id: 1427911244-22565-1-git-send-email-emaste@freebsd.org Signed-off-by: NJohn Snow <jsnow@redhat.com>
-
由 John Snow 提交于
Add qmp_async, which lets us send QMP commands asynchronously. This is useful when we want to send commands that will trigger event responses, but we don't know in what order to expect them. Sometimes the event responses may arrive even before the command confirmation will show up, so it is convenient to leave the responses in the stream. Signed-off-by: NJohn Snow <jsnow@redhat.com> Message-id: 1426018503-821-5-git-send-email-jsnow@redhat.com
-
由 John Snow 提交于
Allow the user to poll until a desired interrupt occurs. Signed-off-by: NJohn Snow <jsnow@redhat.com> Message-id: 1426018503-821-4-git-send-email-jsnow@redhat.com
-
- 31 3月, 2015 1 次提交
-
-
由 Andreas Färber 提交于
It calls g_test_add_data_func() with a path supplemented by the architecture, like qtest_add_func() does. Reviewed-by: NJohn Snow <jsnow@redhat.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 08 9月, 2014 1 次提交
-
-
由 Marc Marí 提交于
Add functions to read and write virtio header fields. Add status bit setting in virtio-blk-device. Signed-off-by: NMarc Marí <marc.mari.barcelo@gmail.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 28 8月, 2014 1 次提交
-
-
由 Stefan Hajnoczi 提交于
No test case actually uses the audio backend. Disable audio to prevent warnings on hosts with no sound hardware present: GTESTER check-qtest-aarch64 sdl: SDL_OpenAudio failed sdl: Reason: No available audio device sdl: SDL_OpenAudio failed sdl: Reason: No available audio device audio: Failed to create voice `lm4549.out' Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 16 8月, 2014 4 次提交
-
-
由 Marc Marí 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NMarc Marí <marc.mari.barcelo@gmail.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 John Snow 提交于
Fixes a small memory leak inside of libqtest. After we produce a test path and glib copies the string for itself, we should clean up our temporary copy. Signed-off-by: NJohn Snow <jsnow@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 John Snow 提交于
Currently, libqtest allows for memread and memwrite, but does not offer a simple way to zero out regions of memory. This patch adds a simple function to do so. Signed-off-by: NJohn Snow <jsnow@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NJohn Snow <jsnow@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 01 7月, 2014 1 次提交
-
-
由 Paolo Bonzini 提交于
libqtest is using g_strdup_printf to format QMP commands, but this does not work if the argument strings need to be escaped. Instead, use the fancy %-formatting functionality of QObject. The only change required in tests is that strings have to be formatted as %s, not '%s' or \"%s\". Luckily this usage of parameterized QMP commands is not that frequent. The leak is in socket_sendf. Since we are extracting the send loop to a new function, fix it now. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 06 5月, 2014 3 次提交
-
-
由 Andreas Färber 提交于
POSIX specifies that address_len shall on output specify the length of the stored address; it does not however specify whether it may get updated on failure as well to, e.g., zero. In case EINTR occurs, re-initialize the variable to the desired value. Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
We're not using the GLib infrastructure here, to allow cleaning up the sockets. Still, knowing why a certain test run failed can be valuable. Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
In practice this seems very unlikely, so cleanup is neglected, as done for bind(). Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 01 4月, 2014 3 次提交
-
-
由 Andreas Färber 提交于
Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Stefan Hajnoczi 提交于
Keep track of active qtest instances so we can kill them when the test aborts. This ensures no QEMU processes are left running after test failure. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NMarcel Apfelbaum <marcel.a@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Stefan Hajnoczi 提交于
It turns out there are test cases that use multiple libqtest instances. We cannot use a global qtest instance in the SIGABRT handler. This reverts commit cb201b48. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NMarcel Apfelbaum <marcel.a@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 14 3月, 2014 1 次提交
-
-
由 Stefan Hajnoczi 提交于
If an assertion fails during qtest_init() the SIGABRT handler is invoked. This is the correct behavior since we need to kill the QEMU process to avoid leaking it when the test dies. The global_qtest pointer used by the SIGABRT handler is currently only assigned after qtest_init() returns. This results in a segfault if an assertion failure occurs during qtest_init(). Move global_qtest assignment inside qtest_init(). Not pretty but let's face it - the signal handler depends on global state. Reported-by: NMarcel Apfelbaum <marcel.a@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Tested-by: NMarcel Apfelbaum <marcel.a@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 13 3月, 2014 2 次提交
-
-
由 Peter Maydell 提交于
Older versions of gcc (eg 4.6) can't handle varargs functions declared inline for anything other than completely trivial uses, and complain: tests/qom-test.c: In function 'qmp': tests/libqtest.h:359:60: sorry, unimplemented: function 'qmp' can never be inlined because it uses variable argument lists Avoid this problem by putting the functions into libqtest.c instead of using inline definitions in libqtest.h. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NAndreas Färber <afaerber@suse.de>
-
由 Marcel Apfelbaum 提交于
'socket_accept' waits for QEMU to init its unix socket. If QEMU encounters an error during command line parsing, it can exit before initializing the communication channel. Using a timeout for sockets fixes the issue. Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NMarcel Apfelbaum <marcel.a@redhat.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 19 2月, 2014 3 次提交
-
-
由 Stefan Hajnoczi 提交于
The QEMU process stays running if the test case fails. This patch fixes the leak by installing a SIGABRT signal handler which invokes qtest_end(). Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Stefan Hajnoczi 提交于
qtest_init() cannot use exec*p() to launch QEMU since the exec*p() functions take an argument array while qtest_init() takes char *extra_args. Therefore we execute /bin/sh -c <command-line> and let the shell parse the argument string. This left /bin/sh as our child process and our child's child was QEMU. We still want QEMU's pid so the -pidfile option was used to let QEMU report its pid. The pidfile needs to be unlinked when the test case exits or fails. In other words, the pidfile creates a new problem for us! Simplify all this using the shell 'exec' command. It allows us to replace the /bin/sh process with QEMU. Then we no longer need to use -pidfile because we already know our fork child's pid. Note: Yes, it seems silly to exec /bin/sh when we could just exec QEMU directly. But remember qtest_init() takes a single char *extra_args command-line fragment instead of a real argv[] array, so we need /bin/sh's argument parsing behavior. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
-
由 Stefan Hajnoczi 提交于
Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
-
- 03 2月, 2014 2 次提交
-
-
由 Stefan Hajnoczi 提交于
UNIX domain sockets are leaked when tests call abort(3) (indirectly via glib assert functions). Unlink the files immediately after the connection has been established to avoid leaks. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Stefan Hajnoczi 提交于
After starting the QEMU process and initializing the QMP connection, we can read the pid file and unlink it. Just stash away the pid instead of the pid filename. This way we can avoid pid file leaks since running tests may abort(3) without cleanup. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 19 11月, 2013 1 次提交
-
-
由 Andreas Färber 提交于
This avoids each test needing to add it to suppress windows popping up. [Commit 7ceeedd0 ("blockdev-test: add test case for drive_add duplicate IDs") and commit 43cd2098 ("qdev-monitor-test: add device_add leak test cases") added qtest tests without specifying -display none. As a result, "make check" now tries to use graphics (GTK or SDL). Since graphics are not used by the test and inappropriate for headless "make check" runs, add the missing -display none. This fixes "make check" in the QEMU buildbot. -- Stefan] Signed-off-by: NAndreas Färber <afaerber@suse.de> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 07 11月, 2013 2 次提交
-
-
由 Stefan Hajnoczi 提交于
Add a qtest qmp() function that returns the response object. This allows test cases to verify the result or to check for error responses. It also allows waiting for QMP events. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Reviewed-by: NAndreas Färber <afaerber@suse.de>
-
由 Stefan Hajnoczi 提交于
Existing qmp() callers do not expect a response object. In order to implement real QMP test cases it will be necessary to inspect the response object. Rename qmp() to qmp_discard_response(). Later patches will introduce a qmp() function that returns the response object and tests that use it. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Reviewed-by: NAndreas Färber <afaerber@suse.de>
-