summaryrefslogtreecommitdiff
path: root/tests/boot-order-test.c
AgeCommit message (Collapse)AuthorFilesLines
2018-02-14libqos: Use explicit QTestState for fw_cfg operationsEric Blake1-3/+3
Drop one more client of global_qtest by teaching all fw_cfg test functionality (invoked through alloc-pc) to pass in an explicit QTestState, adjusting all callers. In particular, fw_cfg-test had to reorder things to create the test state prior to creating the fw_cfg (and drop a pointless strdup in the meantime), but that test now no longer depends on global_qtest. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> [thuth: Fixed conflict wrt pc_alloc_init() in vhost-user-test.c] Signed-off-by: Thomas Huth <thuth@redhat.com>
2018-02-14tests: Clean up wait for eventMarkus Armbruster1-1/+1
We still use hacks like qmp("") to wait for an event, even though we have qmp_eventwait() since commit 8fe941f, and qmp_eventwait_ref() since commit 7ffe312. Both commits neglected to convert all the existing hacks. Make up what they missed. Bonus: gets rid of empty format strings. A step towards compile-time format string checking without triggering -Wformat-zero-length. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com> [thuth: dropped the hunks from the usb tests - not needed anymore] Signed-off-by: Thomas Huth <thuth@redhat.com>
2017-10-20libqtest: Add qtest_[v]startf()Eric Blake1-7/+4
We have several callers that were formatting the argument strings themselves; consolidate this effort by adding new convenience functions directly in libqtest, and update some call-sites that can benefit from it. Note that the new functions qtest_startf() and qtest_vstartf() behave more like qtest_init() (the caller must assign global_qtest after the fact, rather than getting it implicitly set). This helps us prepare for future patches that get rid of the global variable, by explicitly highlighting which tests still depend on it now. Signed-off-by: Eric Blake <eblake@redhat.com> [thuth: Dropped the hunks that do not apply cleanly to qemu master yet and added the missing g_free(args) in qtest_vstartf()] Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1508336428-20511-2-git-send-email-thuth@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2016-06-07tests: Remove unnecessary glib.h includesPeter Maydell1-1/+0
Remove glib.h includes, as it is provided by osdep.h. This commit was created with scripts/clean-includes. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Eric Blake <eblake@redhat.com> Tested-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-03-22fw_cfg: Split fw_cfg_keys.h off fw_cfg.hMarkus Armbruster1-3/+1
Much of fw_cfg.h's contents is #ifndef NO_QEMU_PROTOS. This lets a few places include it without satisfying the dependencies of the suppressed code. If you somehow include it with NO_QEMU_PROTOS, any future includes are ignored. Unnecessarily unclean. Move the stuff not under NO_QEMU_PROTOS into its own header fw_cfg_keys.h, and include it as appropriate. Tidy up the moved code to please checkpatch. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-02-16tests: Clean up includesPeter Maydell1-1/+1
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: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Eric Blake <eblake@redhat.com> Tested-by: Eric Blake <eblake@redhat.com>
2013-11-19qtest: Use -display none by defaultAndreas Färber1-1/+1
This avoids each test needing to add it to suppress windows popping up. [Commit 7ceeedd016facf8d58e14a0d1417fa7225d71072 ("blockdev-test: add test case for drive_add duplicate IDs") and commit 43cd209803d6cffb1e1a028c9ff2fd0ff4fce954 ("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: Andreas Färber <afaerber@suse.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-11-07libqtest: rename qmp() to qmp_discard_response()Stefan Hajnoczi1-2/+2
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: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de>
2013-07-18boot-order-test: Add tests for Sun4uMarkus Armbruster1-0/+14
Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-id: 1372254743-15808-13-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18boot-order-test: Add tests for Sun4mMarkus Armbruster1-0/+14
Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-id: 1372254743-15808-11-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18boot-order-test: Add tests for PowerPC PREPMarkus Armbruster1-0/+25
Cc: Andreas Färber <afaerber@suse.de> Cc: Alexander Graf <agraf@suse.de> Cc: qemu-ppc@nongnu.org Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-id: 1372254743-15808-10-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18boot-order-test: Code motion for better readabilityMarkus Armbruster1-22/+22
Cc: Andreas Färber <afaerber@suse.de> Cc: Alexander Graf <agraf@suse.de> Cc: qemu-ppc@nongnu.org Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-id: 1372254743-15808-9-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18boot-order-test: Better separate target-specific and generic partsMarkus Armbruster1-57/+91
The initial version did just PC. I didn't bother to separate out generic parts, because I don't like to abstract from a single case. Now we have two cases, PC and PowerMac, and I'm about to add more. Time to do it right. To ease review, this commit changes the code in-place, and the next commit reorders it for better readability. Cc: Andreas Färber <afaerber@suse.de> Cc: Alexander Graf <agraf@suse.de> Cc: qemu-ppc@nongnu.org Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-id: 1372254743-15808-8-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18boot-order-test: Cover -boot once in ppc testsMarkus Armbruster1-0/+1
Cc: Andreas Färber <afaerber@suse.de> Cc: Alexander Graf <agraf@suse.de> Cc: qemu-ppc@nongnu.org Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-id: 1372254743-15808-7-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18boot-order-test: Add tests for PowerMacsAndreas Färber1-1/+49
They set the boot device via fw_cfg, which is then translated to a boot path of "hd" or "cd" in OpenBIOS. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-id: 1372254743-15808-6-git-send-email-armbru@redhat.com Cc: Alexander Graf <agraf@suse.de> Cc: qemu-ppc@nongnu.org Converted to libqos/fw_cfg on Anthony's request. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18boot-order-test: New; covering just PC for nowMarkus Armbruster1-0/+73
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-id: 1372254743-15808-3-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>