Alexey Kardashevskiy | 04e9a20 | 2014-02-10 14:52:56 +1100 | [diff] [blame] | 1 | /* |
| 2 | * QTest testcase for SPAPR PHB |
| 3 | * |
| 4 | * Authors: |
| 5 | * Alexey Kardashevskiy <aik@ozlabs.ru> |
| 6 | * |
| 7 | * This work is licensed under the terms of the GNU GPL, version 2 or later. |
| 8 | * See the COPYING file in the top-level directory. |
| 9 | */ |
Emanuele Giuseppe Esposito | dca0630 | 2018-08-17 13:35:12 +0200 | [diff] [blame] | 10 | |
Peter Maydell | 681c28a | 2016-02-08 18:08:51 +0000 | [diff] [blame] | 11 | #include "qemu/osdep.h" |
Marc-André Lureau | 907b510 | 2022-03-30 13:39:05 +0400 | [diff] [blame] | 12 | #include "libqtest.h" |
Markus Armbruster | 0b8fa32 | 2019-05-23 16:35:07 +0200 | [diff] [blame] | 13 | #include "qemu/module.h" |
Emanuele Giuseppe Esposito | dca0630 | 2018-08-17 13:35:12 +0200 | [diff] [blame] | 14 | #include "libqos/qgraph.h" |
Alexey Kardashevskiy | 04e9a20 | 2014-02-10 14:52:56 +1100 | [diff] [blame] | 15 | |
Emanuele Giuseppe Esposito | dca0630 | 2018-08-17 13:35:12 +0200 | [diff] [blame] | 16 | /* Tests only initialization so far. TODO: Replace with functional tests, |
| 17 | * for example by producing pci-bus. |
| 18 | */ |
| 19 | static void test_phb_device(void *obj, void *data, QGuestAllocator *alloc) |
Alexey Kardashevskiy | 04e9a20 | 2014-02-10 14:52:56 +1100 | [diff] [blame] | 20 | { |
| 21 | } |
| 22 | |
Emanuele Giuseppe Esposito | dca0630 | 2018-08-17 13:35:12 +0200 | [diff] [blame] | 23 | static void register_phb_test(void) |
Alexey Kardashevskiy | 04e9a20 | 2014-02-10 14:52:56 +1100 | [diff] [blame] | 24 | { |
Emanuele Giuseppe Esposito | dca0630 | 2018-08-17 13:35:12 +0200 | [diff] [blame] | 25 | qos_add_test("spapr-phb-test", "ppc64/pseries", |
| 26 | test_phb_device, &(QOSGraphTestOptions) { |
| 27 | .edge.before_cmd_line = "-device spapr-pci-host-bridge" |
| 28 | ",index=30", |
| 29 | }); |
Alexey Kardashevskiy | 04e9a20 | 2014-02-10 14:52:56 +1100 | [diff] [blame] | 30 | } |
Emanuele Giuseppe Esposito | dca0630 | 2018-08-17 13:35:12 +0200 | [diff] [blame] | 31 | |
| 32 | libqos_init(register_phb_test); |