From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org,
Richard Henderson <richard.henderson@linaro.org>,
Peter Maydell <peter.maydell@linaro.org>
Cc: Bin Meng <bin.meng@windriver.com>
Subject: [PULL 08/23] tests/qtest: Build cases that use memory-backend-file for posix only
Date: Tue, 30 Aug 2022 20:39:57 +0200 [thread overview]
Message-ID: <20220830184012.77978-9-thuth@redhat.com> (raw)
In-Reply-To: <20220830184012.77978-1-thuth@redhat.com>
From: Bin Meng <bin.meng@windriver.com>
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>
---
tests/qtest/bios-tables-test.c | 10 ++++++++++
tests/qtest/cxl-test.c | 4 ++++
tests/qtest/meson.build | 3 ++-
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
index 7c5f736b51..36783966b0 100644
--- a/tests/qtest/bios-tables-test.c
+++ b/tests/qtest/bios-tables-test.c
@@ -1461,6 +1461,7 @@ static void test_acpi_piix4_tcg_acpi_hmat(void)
test_acpi_tcg_acpi_hmat(MACHINE_PC);
}
+#ifdef CONFIG_POSIX
static void test_acpi_erst(const char *machine)
{
gchar *tmp_path = g_dir_make_tmp("qemu-test-erst.XXXXXX", NULL);
@@ -1511,6 +1512,7 @@ static void test_acpi_microvm_acpi_erst(void)
g_free(tmp_path);
free_test_data(&data);
}
+#endif /* CONFIG_POSIX */
static void test_acpi_virt_tcg(void)
{
@@ -1551,6 +1553,7 @@ static void test_acpi_q35_viot(void)
free_test_data(&data);
}
+#ifdef CONFIG_POSIX
static void test_acpi_q35_cxl(void)
{
gchar *tmp_path = g_dir_make_tmp("qemu-test-cxl.XXXXXX", NULL);
@@ -1593,6 +1596,7 @@ static void test_acpi_q35_cxl(void)
g_free(tmp_path);
free_test_data(&data);
}
+#endif /* CONFIG_POSIX */
static void test_acpi_virt_viot(void)
{
@@ -1805,8 +1809,10 @@ int main(int argc, char *argv[])
qtest_add_func("acpi/q35/dimmpxm", test_acpi_q35_tcg_dimm_pxm);
qtest_add_func("acpi/piix4/acpihmat", test_acpi_piix4_tcg_acpi_hmat);
qtest_add_func("acpi/q35/acpihmat", test_acpi_q35_tcg_acpi_hmat);
+#ifdef CONFIG_POSIX
qtest_add_func("acpi/piix4/acpierst", test_acpi_piix4_acpi_erst);
qtest_add_func("acpi/q35/acpierst", test_acpi_q35_acpi_erst);
+#endif
qtest_add_func("acpi/q35/applesmc", test_acpi_q35_applesmc);
qtest_add_func("acpi/q35/pvpanic-isa", test_acpi_q35_pvpanic_isa);
qtest_add_func("acpi/microvm", test_acpi_microvm_tcg);
@@ -1818,7 +1824,9 @@ int main(int argc, char *argv[])
qtest_add_func("acpi/q35/ivrs", test_acpi_q35_tcg_ivrs);
if (strcmp(arch, "x86_64") == 0) {
qtest_add_func("acpi/microvm/pcie", test_acpi_microvm_pcie_tcg);
+#ifdef CONFIG_POSIX
qtest_add_func("acpi/microvm/acpierst", test_acpi_microvm_acpi_erst);
+#endif
}
}
if (has_kvm) {
@@ -1826,7 +1834,9 @@ int main(int argc, char *argv[])
qtest_add_func("acpi/q35/kvm/dmar", test_acpi_q35_kvm_dmar);
}
qtest_add_func("acpi/q35/viot", test_acpi_q35_viot);
+#ifdef CONFIG_POSIX
qtest_add_func("acpi/q35/cxl", test_acpi_q35_cxl);
+#endif
qtest_add_func("acpi/q35/slic", test_acpi_q35_slic);
} else if (strcmp(arch, "aarch64") == 0) {
if (has_tcg) {
diff --git a/tests/qtest/cxl-test.c b/tests/qtest/cxl-test.c
index 4e6d285061..2e14da7dee 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();
}
diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
index 9d0f82bf1c..e910cb32ca 100644
--- a/tests/qtest/meson.build
+++ b/tests/qtest/meson.build
@@ -71,7 +71,8 @@ qtests_i386 = \
(config_all_devices.has_key('CONFIG_SB16') ? ['fuzz-sb16-test'] : []) + \
(config_all_devices.has_key('CONFIG_SDHCI_PCI') ? ['fuzz-sdcard-test'] : []) + \
(config_all_devices.has_key('CONFIG_ESP_PCI') ? ['am53c974-test'] : []) + \
- (config_all_devices.has_key('CONFIG_ACPI_ERST') ? ['erst-test'] : []) + \
+ (config_host.has_key('CONFIG_POSIX') and \
+ config_all_devices.has_key('CONFIG_ACPI_ERST') ? ['erst-test'] : []) + \
(config_all_devices.has_key('CONFIG_VIRTIO_NET') and \
config_all_devices.has_key('CONFIG_Q35') and \
config_all_devices.has_key('CONFIG_VIRTIO_PCI') and \
--
2.31.1
next prev parent reply other threads:[~2022-08-30 18:59 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-30 18:39 [PULL 00/23] First testing patches for QEMU 7.2 Thomas Huth
2022-08-30 18:39 ` [PULL 01/23] tests/qtest: Use g_setenv() Thomas Huth
2022-08-30 18:39 ` [PULL 02/23] tests/qtest: Use g_mkdtemp() Thomas Huth
2022-08-30 18:39 ` [PULL 03/23] tests: Use g_mkdir_with_parents() Thomas Huth
2022-08-30 18:39 ` [PULL 04/23] tests/qtest: migration-test: Handle link() for win32 Thomas Huth
2022-08-30 18:39 ` [PULL 05/23] backends/tpm: Exclude headers and macros that don't exist on win32 Thomas Huth
2022-08-30 18:39 ` [PULL 06/23] tests/qtest: Adapt {m48t59,rtc}-test cases for win32 Thomas Huth
2022-08-30 18:39 ` [PULL 07/23] tests/qtest: Build e1000e-test for posix only Thomas Huth
2022-08-30 18:39 ` Thomas Huth [this message]
2022-08-30 18:39 ` [PULL 09/23] tests/qtest: i440fx-test: Skip running request_{bios, pflash} for win32 Thomas Huth
2022-08-30 18:39 ` [PULL 10/23] tests/qtest: migration-test: Skip running test_migrate_fd_proto on win32 Thomas Huth
2022-08-30 18:40 ` [PULL 11/23] tests/qtest: libqos: Drop inclusion of <sys/wait.h> Thomas Huth
2022-08-30 18:40 ` [PULL 12/23] tests/qtest: libqos: Rename malloc.h to libqos-malloc.h Thomas Huth
2022-08-30 18:40 ` [PULL 13/23] tests/qtest: device-plug-test: Reverse the usage of double/single quotes Thomas Huth
2022-08-30 18:40 ` [PULL 14/23] tests/qtest: machine-none-test: Use double quotes to pass the cpu option Thomas Huth
2022-08-30 18:40 ` [PULL 15/23] tests/qtest: npcm7xx_emc-test: Skip running test_{tx, rx} on win32 Thomas Huth
2022-08-30 18:40 ` [PULL 16/23] tests/qtest: prom-env-test: Use double quotes to pass the prom-env option Thomas Huth
2022-08-30 18:40 ` [PULL 17/23] tests/vm: Add libslirp to the VM tests Thomas Huth
2022-08-30 18:40 ` [PULL 18/23] tests/avocado: Do not run tests that require libslirp if it is not available Thomas Huth
2022-08-30 18:40 ` [PULL 19/23] tests/avocado: Fix trivial typo Thomas Huth
2022-08-30 18:40 ` [PULL 20/23] docs/devel/testing: fix minor typo Thomas Huth
2022-08-30 18:40 ` [PULL 21/23] gitlab-ci: Only use one process in Windows jobs for compilation Thomas Huth
2022-08-30 18:40 ` [PULL 22/23] tests/qtest/ac97-test: Correct reference to driver Thomas Huth
2022-08-30 18:40 ` [PULL 23/23] tests/avocado/migration: Get find_free_port() from the ports Thomas Huth
2022-08-31 23:54 ` [PULL 00/23] First testing patches for QEMU 7.2 Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220830184012.77978-9-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=bin.meng@windriver.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).