diff options
author | Bin Meng <bin.meng@windriver.com> | 2022-08-24 17:39:56 +0800 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2022-08-25 15:24:09 +0200 |
commit | 84efa8aa4e7c568c996b9575947474c734f128b3 (patch) | |
tree | d7e4f1526c4dacc56c0b4044c541d595841fdd0a /tests/qtest/cxl-test.c | |
parent | bc67e31c3ebc284bf3fee284c1cd8f2f8ef489d1 (diff) | |
download | qemu-84efa8aa4e7c568c996b9575947474c734f128b3.zip qemu-84efa8aa4e7c568c996b9575947474c734f128b3.tar.gz qemu-84efa8aa4e7c568c996b9575947474c734f128b3.tar.bz2 |
tests/qtest: Build cases that use memory-backend-file for posix only
As backends/meson.build tells us, hostmem-file.c is only supported on
POSIX platforms, hence any test case that utilizes the memory backend
file should be guarded by CONFIG_POSIX too.
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Acked-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220824094029.1634519-19-bmeng.cn@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/qtest/cxl-test.c')
-rw-r--r-- | tests/qtest/cxl-test.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/qtest/cxl-test.c b/tests/qtest/cxl-test.c index 4e6d285..2e14da7 100644 --- a/tests/qtest/cxl-test.c +++ b/tests/qtest/cxl-test.c @@ -89,6 +89,7 @@ static void cxl_2root_port(void) qtest_end(); } +#ifdef CONFIG_POSIX static void cxl_t3d(void) { g_autoptr(GString) cmdline = g_string_new(NULL); @@ -133,6 +134,7 @@ static void cxl_2pxb_4rp_4t3d(void) qtest_start(cmdline->str); qtest_end(); } +#endif /* CONFIG_POSIX */ int main(int argc, char **argv) { @@ -144,8 +146,10 @@ int main(int argc, char **argv) qtest_add_func("/pci/cxl/pxb_x2_with_window", cxl_2pxb_with_window); qtest_add_func("/pci/cxl/rp", cxl_root_port); qtest_add_func("/pci/cxl/rp_x2", cxl_2root_port); +#ifdef CONFIG_POSIX qtest_add_func("/pci/cxl/type3_device", cxl_t3d); qtest_add_func("/pci/cxl/rp_x2_type3_x2", cxl_1pxb_2rp_2t3d); qtest_add_func("/pci/cxl/pxb_x2_root_port_x4_type3_x4", cxl_2pxb_4rp_4t3d); +#endif return g_test_run(); } |