summaryrefslogtreecommitdiffstats
path: root/tests/cpu-plug-test.c
Commit message (Collapse)AuthorAgeFilesLines
* qobject: Replace qobject_incref/QINCREF qobject_decref/QDECREFMarc-André Lureau2018-05-041-2/+2
| | | | | | | | | | | | | | | | | | | | | Now that we can safely call QOBJECT() on QObject * as well as its subtypes, we can have macros qobject_ref() / qobject_unref() that work everywhere instead of having to use QINCREF() / QDECREF() for QObject and qobject_incref() / qobject_decref() for its subtypes. The replacement is mechanical, except I broke a long line, and added a cast in monitor_qmp_cleanup_req_queue_locked(). Unlike qobject_decref(), qobject_unref() doesn't accept void *. Note that the new macros evaluate their argument exactly once, thus no need to shout them. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20180419150145.24795-4-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Rebased, semantic conflict resolved, commit message improved] Signed-off-by: Markus Armbruster <armbru@redhat.com>
* Include qapi/qmp/qdict.h exactly where neededMarkus Armbruster2018-02-091-0/+1
| | | | | | | | | | | | | This cleanup makes the number of objects depending on qapi/qmp/qdict.h drop from 4550 (out of 4743) to 368 in my "build everything" tree. For qapi/qmp/qobject.h, the number drops from 4552 to 390. While there, separate #include from file comment with a blank line. Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180201111846.21846-13-armbru@redhat.com>
* Eliminate qapi/qmp/types.hMarkus Armbruster2018-02-091-1/+0Star
| | | | | | | | | | | | | | qapi/qmp/types.h is a convenience header to include a number of qapi/qmp/ headers. Since we rarely need all of the headers qapi/qmp/types.h includes, we bypass it most of the time. Most of the places that use it don't need all the headers, either. Include the necessary headers directly, and drop qapi/qmp/types.h. Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180201111846.21846-9-armbru@redhat.com>
* tests/cpu-plug-test: Test CPU hot-plugging on s390xThomas Huth2018-01-221-0/+39
| | | | | | | | CPU hot-plugging on s390x is possible with both, "cpu-add" and "device_add", so test both. Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
* tests/cpu-plug-test: Check CPU hot-plugging on ppc64, tooThomas Huth2018-01-221-0/+50
| | | | | | | | | | | Hot plugging on ppc64 is possible via "device_add", too. Unlike x86, we must not specify a 'socket-id' and 'thread-id' here, so this needs to be done with a separate function that just specifies the 'core-id' during the "device_add". Reviewed-by: Daniel Barboza <danielhb@linux.vnet.ibm.com> Tested-by: Daniel Barboza <danielhb@linux.vnet.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
* tests/cpu-plug-test: Check the CPU hot-plugging with device_add, tooThomas Huth2018-01-221-2/+45
| | | | | | | | | | Using 'device_add' instead of 'cpu-add' is the new way for hot-plugging CPUs, so we should test this regularly, too. Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com> Tested-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
* tests: Rename pc-cpu-test.c to cpu-plug-test.cThomas Huth2018-01-221-0/+135
The test will be extended to work on other architectures, too, so let's use a more generic name for the file and the functions in here first. Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>