qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Sunil V L <sunilvl@ventanamicro.com>
Cc: qemu-devel@nongnu.org, qemu-arm@nongnu.org,
	qemu-riscv@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Daniel P . Berrangé" <berrange@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	"Ani Sinha" <anisinha@redhat.com>,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Alistair Francis" <alistair23@gmail.com>,
	"Sia Jee Heng" <jeeheng.sia@starfivetech.com>,
	"Haibo1 Xu" <haibo1.xu@intel.com>,
	"Anup Patel" <apatel@ventanamicro.com>,
	"Andrew Jones" <ajones@ventanamicro.com>,
	"Daniel Henrique Barboza" <dbarboza@ventanamicro.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Bin Meng" <bmeng.cn@gmail.com>,
	"Weiwei Li" <liwei1518@gmail.com>,
	"Liu Zhiwei" <zhiwei_liu@linux.alibaba.com>,
	"Alistair Francis" <alistair.francis@wdc.com>
Subject: Re: [PATCH v2 05/12] tests/qtest/bios-tables-test.c: Add support for arch in path
Date: Wed, 19 Jun 2024 11:20:47 +0200	[thread overview]
Message-ID: <20240619112047.6b0e674c@imammedo.users.ipa.redhat.com> (raw)
In-Reply-To: <20240524061411.341599-6-sunilvl@ventanamicro.com>

On Fri, 24 May 2024 11:44:04 +0530
Sunil V L <sunilvl@ventanamicro.com> wrote:

> Since virt machine is common for multiple architectures, add "arch" in
> the path to search expected AML files. Since the AML files are still
> under old path, support both by searching with and without arch in the
> path.
> 
> Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
> Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

other than need to swap machine/arch order mentioned in
the next patch look good to me

> ---
>  tests/qtest/bios-tables-test.c | 31 ++++++++++++++++++++++++++++---
>  1 file changed, 28 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
> index c4a4d1c7bf..c73174ad00 100644
> --- a/tests/qtest/bios-tables-test.c
> +++ b/tests/qtest/bios-tables-test.c
> @@ -78,6 +78,7 @@
>  typedef struct {
>      bool tcg_only;
>      const char *machine;
> +    const char *arch;
>      const char *machine_param;
>      const char *variant;
>      const char *uefi_fl1;
> @@ -262,8 +263,19 @@ static void dump_aml_files(test_data *data, bool rebuild)
>          g_assert(exp_sdt->aml);
>  
>          if (rebuild) {
> -            aml_file = g_strdup_printf("%s/%s/%.4s%s", data_dir, data->machine,
> +            aml_file = g_strdup_printf("%s/%s/%s/%.4s%s", data_dir,
> +                                       data->machine, data->arch,
>                                         sdt->aml, ext);
> +
> +            /*
> +             * To keep test cases not failing when the DATA files are moved to
> +             * ARCH under virt folder, add this check as well.
> +             */
> +            if (!g_file_test(aml_file, G_FILE_TEST_EXISTS)) {
> +                aml_file = g_strdup_printf("%s/%s/%.4s%s", data_dir,
> +                                           data->machine, sdt->aml, ext);
> +            }
> +
>              if (!g_file_test(aml_file, G_FILE_TEST_EXISTS) &&
>                  sdt->aml_len == exp_sdt->aml_len &&
>                  !memcmp(sdt->aml, exp_sdt->aml, sdt->aml_len)) {
> @@ -398,8 +410,13 @@ static GArray *load_expected_aml(test_data *data)
>          memset(&exp_sdt, 0, sizeof(exp_sdt));
>  
>  try_again:
> -        aml_file = g_strdup_printf("%s/%s/%.4s%s", data_dir, data->machine,
> -                                   sdt->aml, ext);
> +        aml_file = g_strdup_printf("%s/%s/%s/%.4s%s", data_dir, data->machine,
> +                                   data->arch, sdt->aml, ext);
> +        if (!g_file_test(aml_file, G_FILE_TEST_EXISTS)) {
> +            aml_file = g_strdup_printf("%s/%s/%.4s%s", data_dir, data->machine,
> +                                       sdt->aml, ext);
> +        }
> +
>          if (verbosity_level >= 2) {
>              fprintf(stderr, "Looking for expected file '%s'\n", aml_file);
>          }
> @@ -1574,6 +1591,7 @@ static void test_acpi_aarch64_virt_tcg_memhp(void)
>  {
>      test_data data = {
>          .machine = "virt",
> +        .arch = "aarch64",
>          .tcg_only = true,
>          .uefi_fl1 = "pc-bios/edk2-aarch64-code.fd",
>          .uefi_fl2 = "pc-bios/edk2-arm-vars.fd",
> @@ -1667,6 +1685,7 @@ static void test_acpi_aarch64_virt_tcg_numamem(void)
>  {
>      test_data data = {
>          .machine = "virt",
> +        .arch = "aarch64",
>          .tcg_only = true,
>          .uefi_fl1 = "pc-bios/edk2-aarch64-code.fd",
>          .uefi_fl2 = "pc-bios/edk2-arm-vars.fd",
> @@ -1689,6 +1708,7 @@ static void test_acpi_aarch64_virt_tcg_pxb(void)
>  {
>      test_data data = {
>          .machine = "virt",
> +        .arch = "aarch64",
>          .tcg_only = true,
>          .uefi_fl1 = "pc-bios/edk2-aarch64-code.fd",
>          .uefi_fl2 = "pc-bios/edk2-arm-vars.fd",
> @@ -1762,6 +1782,7 @@ static void test_acpi_aarch64_virt_tcg_acpi_hmat(void)
>  {
>      test_data data = {
>          .machine = "virt",
> +        .arch = "aarch64",
>          .tcg_only = true,
>          .uefi_fl1 = "pc-bios/edk2-aarch64-code.fd",
>          .uefi_fl2 = "pc-bios/edk2-arm-vars.fd",
> @@ -1918,6 +1939,7 @@ static void test_acpi_aarch64_virt_tcg(void)
>  {
>      test_data data = {
>          .machine = "virt",
> +        .arch = "aarch64",
>          .tcg_only = true,
>          .uefi_fl1 = "pc-bios/edk2-aarch64-code.fd",
>          .uefi_fl2 = "pc-bios/edk2-arm-vars.fd",
> @@ -1937,6 +1959,7 @@ static void test_acpi_aarch64_virt_tcg_topology(void)
>  {
>      test_data data = {
>          .machine = "virt",
> +        .arch = "aarch64",
>          .variant = ".topology",
>          .tcg_only = true,
>          .uefi_fl1 = "pc-bios/edk2-aarch64-code.fd",
> @@ -2020,6 +2043,7 @@ static void test_acpi_aarch64_virt_viot(void)
>  {
>      test_data data = {
>          .machine = "virt",
> +        .arch = "aarch64",
>          .tcg_only = true,
>          .uefi_fl1 = "pc-bios/edk2-aarch64-code.fd",
>          .uefi_fl2 = "pc-bios/edk2-arm-vars.fd",
> @@ -2196,6 +2220,7 @@ static void test_acpi_aarch64_virt_oem_fields(void)
>  {
>      test_data data = {
>          .machine = "virt",
> +        .arch = "aarch64",
>          .tcg_only = true,
>          .uefi_fl1 = "pc-bios/edk2-aarch64-code.fd",
>          .uefi_fl2 = "pc-bios/edk2-arm-vars.fd",



  reply	other threads:[~2024-06-19  9:21 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-24  6:13 [PATCH v2 00/12] Add support for RISC-V ACPI tests Sunil V L
2024-05-24  6:14 ` [PATCH v2 01/12] uefi-test-tools/UefiTestToolsPkg: Add RISC-V support Sunil V L
2024-06-04  3:23   ` Alistair Francis
2024-05-24  6:14 ` [PATCH v2 02/12] uefi-test-tools: Add support for python based build script Sunil V L
2024-05-24  6:14 ` [PATCH v2 03/12] tests/data/uefi-boot-images: Add RISC-V ISO image Sunil V L
2024-05-24  6:14 ` [PATCH v2 04/12] qtest: bios-tables-test: Rename aarch64 tests with aarch64 in them Sunil V L
2024-06-18 12:34   ` Igor Mammedov
2024-05-24  6:14 ` [PATCH v2 05/12] tests/qtest/bios-tables-test.c: Add support for arch in path Sunil V L
2024-06-19  9:20   ` Igor Mammedov [this message]
2024-05-24  6:14 ` [PATCH v2 06/12] tests/data/acpi/virt: Move ACPI tables under aarch64 Sunil V L
2024-05-27 10:12   ` Philippe Mathieu-Daudé
2024-05-27 15:16     ` Sunil V L
2024-06-19  9:17       ` Igor Mammedov
2024-06-19  9:20         ` Michael S. Tsirkin
2024-06-19 18:00           ` Sunil V L
2024-06-20 13:53             ` Igor Mammedov
2024-05-24  6:14 ` [PATCH v2 07/12] meson.build: Add RISC-V to the edk2-target list Sunil V L
2024-06-19  9:19   ` Igor Mammedov
2024-05-24  6:14 ` [PATCH v2 08/12] pc-bios/meson.build: Add support for RISC-V in unpack_edk2_blobs Sunil V L
2024-06-19  9:35   ` Igor Mammedov
2024-05-24  6:14 ` [PATCH v2 09/12] tests/data/acpi/rebuild-expected-aml.sh: Add RISC-V Sunil V L
2024-06-19  9:43   ` Igor Mammedov
2024-05-24  6:14 ` [PATCH v2 10/12] tests/qtest/bios-tables-test: Add empty ACPI data files for RISC-V Sunil V L
2024-06-04  3:26   ` Alistair Francis
2024-06-19  9:44   ` Igor Mammedov
2024-05-24  6:14 ` [PATCH v2 11/12] tests/qtest/bios-tables-test.c: Enable basic testing " Sunil V L
2024-06-04  3:27   ` Alistair Francis
2024-06-19 10:12   ` Igor Mammedov
2024-06-19 18:05     ` Sunil V L
2024-05-24  6:14 ` [PATCH v2 12/12] tests/qtest/bios-tables-test: Add expected ACPI data files " Sunil V L
2024-06-04  3:28   ` Alistair Francis
2024-06-19 11:07   ` Igor Mammedov
2024-06-04  3:29 ` [PATCH v2 00/12] Add support for RISC-V ACPI tests Alistair Francis
2024-06-04  7:04   ` Michael S. Tsirkin

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=20240619112047.6b0e674c@imammedo.users.ipa.redhat.com \
    --to=imammedo@redhat.com \
    --cc=ajones@ventanamicro.com \
    --cc=alistair.francis@wdc.com \
    --cc=alistair23@gmail.com \
    --cc=anisinha@redhat.com \
    --cc=apatel@ventanamicro.com \
    --cc=berrange@redhat.com \
    --cc=bmeng.cn@gmail.com \
    --cc=dbarboza@ventanamicro.com \
    --cc=haibo1.xu@intel.com \
    --cc=jeeheng.sia@starfivetech.com \
    --cc=kraxel@redhat.com \
    --cc=liwei1518@gmail.com \
    --cc=lvivier@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mst@redhat.com \
    --cc=palmer@dabbelt.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=sunilvl@ventanamicro.com \
    --cc=thuth@redhat.com \
    --cc=zhiwei_liu@linux.alibaba.com \
    /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).