diff options
author | Jonathan Cameron | 2022-04-29 16:40:40 +0200 |
---|---|---|
committer | Michael S. Tsirkin | 2022-05-13 12:13:36 +0200 |
commit | 33c47ab967558dfb02b3439b37e7dcfcdced0157 (patch) | |
tree | 1eb6ba827bb8bdf384f9c26ed50eceb08c381d45 /tests/qtest/cxl-test.c | |
parent | hw/pxb: Allow creation of a CXL PXB (host bridge) (diff) | |
download | qemu-33c47ab967558dfb02b3439b37e7dcfcdced0157.tar.gz qemu-33c47ab967558dfb02b3439b37e7dcfcdced0157.tar.xz qemu-33c47ab967558dfb02b3439b37e7dcfcdced0157.zip |
qtest/cxl: Introduce initial test for pxb-cxl only.
Initial test with just pxb-cxl. Other tests will be added
alongside functionality.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220429144110.25167-16-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'tests/qtest/cxl-test.c')
-rw-r--r-- | tests/qtest/cxl-test.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/qtest/cxl-test.c b/tests/qtest/cxl-test.c new file mode 100644 index 0000000000..c031049930 --- /dev/null +++ b/tests/qtest/cxl-test.c @@ -0,0 +1,22 @@ +/* + * QTest testcase for CXL + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ + +#include "qemu/osdep.h" +#include "libqtest-single.h" + +static void cxl_basic_pxb(void) +{ + qtest_start("-machine q35,cxl=on -device pxb-cxl,bus=pcie.0"); + qtest_end(); +} + +int main(int argc, char **argv) +{ + g_test_init(&argc, &argv, NULL); + qtest_add_func("/pci/cxl/basic_pxb", cxl_basic_pxb); + return g_test_run(); +} |