From: Igor Mammedov <imammedo@redhat.com>
To: Bibo Mao <maobibo@loongson.cn>
Cc: "Fabiano Rosas" <farosas@suse.de>,
"Laurent Vivier" <lvivier@redhat.com>,
"Michael S . Tsirkin" <mst@redhat.com>,
"Ani Sinha" <anisinha@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Gerd Hoffmann" <kraxel@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [PATCH 3/6] tests/qtest/bios-tables-test: Add basic testing for LoongArch64
Date: Tue, 1 Apr 2025 15:41:04 +0200 [thread overview]
Message-ID: <20250401154104.13219e16@imammedo.users.ipa.redhat.com> (raw)
In-Reply-To: <20250228092729.543097-4-maobibo@loongson.cn>
On Fri, 28 Feb 2025 17:27:26 +0800
Bibo Mao <maobibo@loongson.cn> wrote:
> Add basic ACPI table test case for LoongArch64.
>
> Signed-off-by: Bibo Mao <maobibo@loongson.cn>
> ---
> tests/qtest/bios-tables-test.c | 62 ++++++++++++++++++++++++++++++++++
> 1 file changed, 62 insertions(+)
>
> diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
> index 0a333ec435..008d7a0497 100644
> --- a/tests/qtest/bios-tables-test.c
> +++ b/tests/qtest/bios-tables-test.c
> @@ -2420,6 +2420,59 @@ static void test_acpi_aarch64_virt_oem_fields(void)
> g_free(args);
> }
>
> +#define LOONGARCH64_INIT_TEST_DATA(data) \
> + test_data data = { \
> + .machine = "virt", \
> + .arch = "loongarch64", \
> + .tcg_only = true, \
> + .uefi_fl1 = "pc-bios/edk2-loongarch64-code.fd", \
> + .uefi_fl2 = "pc-bios/edk2-loongarch64-vars.fd", \
> + .cd = "tests/data/uefi-boot-images/" \
> + "bios-tables-test.loongarch64.iso.qcow2", \
> + .ram_start = 0, \
> + .scan_len = 128ULL * 1024 * 1024, \
while it consistent with other test, we should switch to using MiB macro
so I'd like to ask
* 1st convert all similar places in bios-tables-test.c 'x * MiB' style
* fix up this patch to use that as well
> + }
> +
> +static void test_acpi_loongarch64_virt(void)
> +{
> + LOONGARCH64_INIT_TEST_DATA(data);
> +
> + test_acpi_one("-cpu la464 ", &data);
> + free_test_data(&data);
> +}
> +
> +static void test_acpi_loongarch64_virt_topology(void)
> +{
> + LOONGARCH64_INIT_TEST_DATA(data);
> +
> + data.variant = ".topology";
> + test_acpi_one("-cpu la464 -smp sockets=1,cores=4,threads=2", &data);
> + free_test_data(&data);
> +}
> +
> +static void test_acpi_loongarch64_virt_numamem(void)
> +{
> + LOONGARCH64_INIT_TEST_DATA(data);
> +
> + data.variant = ".numamem";
> + test_acpi_one(" -cpu la464 -object memory-backend-ram,id=ram0,size=128M"
> + " -numa node,memdev=ram0", &data);
> + free_test_data(&data);
> +}
> +
> +static void test_acpi_loongarch64_virt_memhp(void)
> +{
> + LOONGARCH64_INIT_TEST_DATA(data);
> +
> + data.variant = ".memhp";
> + test_acpi_one(" -cpu la464 -m 128,slots=3,maxmem=1G"
> + " -object memory-backend-ram,id=ram0,size=64M"
> + " -object memory-backend-ram,id=ram1,size=64M"
> + " -numa node,memdev=ram0 -numa node,memdev=ram1"
> + " -numa dist,src=0,dst=1,val=21",
I'd test numa specific stuff in test_acpi_loongarch64_virt_numamem()
and simplify this test case.
> + &data);
> + free_test_data(&data);
> +}
>
> int main(int argc, char *argv[])
> {
> @@ -2593,6 +2646,15 @@ int main(int argc, char *argv[])
> qtest_add_func("acpi/virt/numamem",
> test_acpi_riscv64_virt_tcg_numamem);
> }
> + } else if (strcmp(arch, "loongarch64") == 0) {
> + if (has_tcg && qtest_has_device("virtio-blk-pci")) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
is it necessary?
if yes, then add explanation to commit message, why it's need.
> + qtest_add_func("acpi/virt", test_acpi_loongarch64_virt);
> + qtest_add_func("acpi/virt/topology",
> + test_acpi_loongarch64_virt_topology);
> + qtest_add_func("acpi/virt/numamem",
> + test_acpi_loongarch64_virt_numamem);
> + qtest_add_func("acpi/virt/memhp", test_acpi_loongarch64_virt_memhp);
> + }
> }
> ret = g_test_run();
> boot_sector_cleanup(disk);
next prev parent reply other threads:[~2025-04-01 13:46 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-28 9:27 [PATCH 0/6] Add bios-tables-test for LoongArch64 system Bibo Mao
2025-02-28 9:27 ` [PATCH 1/6] uefi-test-tools:: Add LoongArch64 support Bibo Mao
2025-02-28 9:27 ` [PATCH 2/6] tests/data/uefi-boot-images: Add ISO image for LoongArch system Bibo Mao
2025-02-28 9:27 ` [PATCH 3/6] tests/qtest/bios-tables-test: Add basic testing for LoongArch64 Bibo Mao
2025-04-01 13:41 ` Igor Mammedov [this message]
2025-05-19 2:02 ` Bibo Mao
2025-02-28 9:27 ` [PATCH 4/6] tests/acpi: Add empty ACPI data files " Bibo Mao
2025-04-01 13:48 ` Igor Mammedov
2025-05-19 2:46 ` Bibo Mao
2025-05-20 10:07 ` Bibo Mao
2025-02-28 9:27 ` [PATCH 5/6] tests/acpi: Fill acpi table data for LoongArch Bibo Mao
2025-02-28 9:27 ` [PATCH 6/6] tests/qtest: Enable bios-tables-test " Bibo Mao
2025-03-19 12:06 ` Fabiano Rosas
2025-04-01 13:42 ` Igor Mammedov
2025-02-28 12:56 ` [PATCH 0/6] Add bios-tables-test for LoongArch64 system Gerd Hoffmann
2025-04-01 13:50 ` Igor Mammedov
2025-05-19 2:14 ` Bibo Mao
2025-05-11 13:17 ` Michael S. Tsirkin
2025-05-19 1:02 ` Bibo Mao
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=20250401154104.13219e16@imammedo.users.ipa.redhat.com \
--to=imammedo@redhat.com \
--cc=anisinha@redhat.com \
--cc=farosas@suse.de \
--cc=kraxel@redhat.com \
--cc=lvivier@redhat.com \
--cc=maobibo@loongson.cn \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.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).