[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 34/51] tests/qtest: bios-tables-test: Adapt the case for win3
From: |
Ani Sinha |
Subject: |
Re: [PATCH 34/51] tests/qtest: bios-tables-test: Adapt the case for win32 |
Date: |
Wed, 24 Aug 2022 18:12:00 +0530 (IST) |
User-agent: |
Alpine 2.22 (DEB 394 2020-01-19) |
On Wed, 24 Aug 2022, Bin Meng wrote:
> From: Bin Meng <bin.meng@windriver.com>
>
> Single quotes in the arguments (oem_id='CRASH ') are not removed in
> the Windows environment before it is passed to the QEMU executable.
> The space in the argument causes the "-acpitable" option parser to
> think that all of its parameters are done, hence it complains:
>
> '-acpitable' requires one of 'data' or 'file'
>
> Change to use double quotes which works fine on all platforms.
>
> Also /dev/null does not work on win32, and nul should be used.
>
> Signed-off-by: Bin Meng <bin.meng@windriver.com>
> ---
>
> tests/qtest/bios-tables-test.c | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
> index 36783966b0..0148ce388c 100644
> --- a/tests/qtest/bios-tables-test.c
> +++ b/tests/qtest/bios-tables-test.c
> @@ -1615,6 +1615,12 @@ static void test_acpi_virt_viot(void)
> free_test_data(&data);
> }
>
> +#ifndef _WIN32
> +# define DEV_NULL "/dev/null"
> +#else
> +# define DEV_NULL "nul"
> +#endif
> +
> static void test_acpi_q35_slic(void)
> {
> test_data data = {
> @@ -1622,9 +1628,9 @@ static void test_acpi_q35_slic(void)
> .variant = ".slic",
> };
>
> - test_acpi_one("-acpitable sig=SLIC,oem_id='CRASH ',oem_table_id='ME',"
> - "oem_rev=00002210,asl_compiler_id='qemu',"
> - "asl_compiler_rev=00000000,data=/dev/null",
> + test_acpi_one("-acpitable sig=SLIC,oem_id=\"CRASH \",oem_table_id=ME,"
> + "oem_rev=00002210,asl_compiler_id=qemu,"
ME and qemu should be surrounded by quotes. They are string arguments.
https://www.qemu.org/docs/master/interop/qemu-qmp-ref.html?highlight=oem_table_id
> + "asl_compiler_rev=00000000,data=" DEV_NULL,
> &data);
> free_test_data(&data);
> }
> --
> 2.34.1
>
>
- [PATCH 27/51] tests/qtest: Use send/recv for socket communication, (continued)
- [PATCH 27/51] tests/qtest: Use send/recv for socket communication, Bin Meng, 2022/08/24
- [PATCH 28/51] tests/qtest: libqtest: Exclude the *_fds APIs for win32, Bin Meng, 2022/08/24
- [PATCH 29/51] tests/qtest: libqtest: Install signal handler via signal(), Bin Meng, 2022/08/24
- [PATCH 30/51] tests: Skip iotests and qtest when '--without-default-devices', Bin Meng, 2022/08/24
- [PATCH 31/51] tests/qtest: Support libqtest to build and run on Windows, Bin Meng, 2022/08/24
- [PATCH 32/51] tests/qtest: Fix ERROR_SHARING_VIOLATION for win32, Bin Meng, 2022/08/24
- [PATCH 34/51] tests/qtest: bios-tables-test: Adapt the case for win32, Bin Meng, 2022/08/24
- Re: [PATCH 34/51] tests/qtest: bios-tables-test: Adapt the case for win32,
Ani Sinha <=
- [PATCH 39/51] tests/qtest: virtio-net-failover: Disable migration tests for win32, Bin Meng, 2022/08/24
- [PATCH 43/51] tests/qtest: npcm7xx_emc-test: Skip running test_{tx, rx} on win32, Bin Meng, 2022/08/24
- [PATCH 33/51] tests/qtest: {ahci, ide}-test: Use relative path for temporary files, Bin Meng, 2022/08/24
- [PATCH 38/51] tests/qtest: {ahci,ide}-test: Open file in binary mode, Bin Meng, 2022/08/24
- [PATCH 35/51] tests/qtest: device-plug-test: Reverse the usage of double/single quotes, Bin Meng, 2022/08/24