From nobody Mon Nov 25 09:20:31 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1716531362; cv=none; d=zohomail.com; s=zohoarc; b=YcR3g5IQBPwZ23882aqxG8RxA15GhGF6gSSMFSLpSXxt2NE73SLtZkqEue+mmA/eBXenjq3P7CjGLAnqpglGjeEezMK73cLtlnLp6Uef0bSK7xSuxLrvYGdvZ5s9myh7f0JagLoFUXyLsCNqbvVsWFaFcboL3trcv7cDwOJne/k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1716531362; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=77QEVMRELZi8HUu5rAEqjjLVKC1iehF0W9sw1N8UasQ=; b=n2v12jbaa5SpERaAItIC1ES2cyGcvzmA8g9gEmoD5Dt3vEc01ftUQ4yfzUBfC9TCtCq3sqMwqxwaG+PBG/ec9bM/fcGj1AnlIoEfli3teqj4RQUPfmgdFyhW7mp5oj6f6fuBSyy6oGymEZiTUEoHWDLAo4bFOkvucnfz4ffoQlo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1716531362030354.97859325487445; Thu, 23 May 2024 23:16:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sAOCl-0002GD-UR; Fri, 24 May 2024 02:15:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sAOCk-0002FS-RX for qemu-devel@nongnu.org; Fri, 24 May 2024 02:15:02 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sAOCh-0001Gi-UZ for qemu-devel@nongnu.org; Fri, 24 May 2024 02:15:02 -0400 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-6f8edddf756so455010b3a.3 for ; Thu, 23 May 2024 23:14:59 -0700 (PDT) Received: from sunil-pc.Dlink ([106.51.188.31]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f8fcbea487sm516106b3a.107.2024.05.23.23.14.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 23:14:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1716531297; x=1717136097; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=77QEVMRELZi8HUu5rAEqjjLVKC1iehF0W9sw1N8UasQ=; b=daAcQZxK/c3iEC/lBaBRRazsGRT0ziVAgNdibtEtUYYWy3tHDIrm7AkE1TyiVyuNUG /kZeqBtdZm65dio+Q0H9pGXo5BngeSYdVz4CbtSfbpLe2qw0oxZoCu2Ceygf8/lr/gYk oPfVobs39uL8jfd0+a5EMfWJZMN59ksKIvrDlXVR4JPQLyHXzYalrEmMIt7ctetWTZfj RXitfl/6wAw4FBY6a4/SU7SeqEYK7O32rlPkDZ+Jx/K+i9kP4EjUxwtLCFe6sYfYTE/p 9vQ/hjrXLgRk+PHzdkKWLqD5qRAGXL/yitGZc5QKOG+8ewLqrHh62FdJz58i6cVtLJjR 1zEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716531297; x=1717136097; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=77QEVMRELZi8HUu5rAEqjjLVKC1iehF0W9sw1N8UasQ=; b=BpZ2LdyRuqv7n/ssl4vbK6ab79i7cmzbg11ST7C4AjDmwcRibU8NXYfRc9jsfjCYqQ 2A2A8ISHa9Qu9qKgt+MWKLQE5Tw4QdJm7UKLRvvlEAnb5I+kP21xRv4uKkcDUxCWoPe6 gTUxaykrBzknxDABC0m8d8T5oiwy8wyHRFsHhg6SMRZSy2/oZpw4TAay5ldkbQoxUH0d p3a9sKwRy0vlnLXYnzg/LKOs9heu+6elpVZ0wi+et/wif+lnKtFlgeZOszVR+hFUTIrD AuHnp/CCm9HZ5pt2K9ffXavuGmHtuCwuDMjMCbZN5zDEXB7mTws2xSirEhCYALJXedMb qQmQ== X-Gm-Message-State: AOJu0YzjEcR1Ln3ld4EcApYjGUEjHSutiJSsOZCehHl9Pypoayz8fmbH NCzvicoWDE5Af9HzbpN/APRB3d/mYb1wmXXAM+MJLI361MsVclsKn81givO31dsjNa5HbUj/C8y WqHE= X-Google-Smtp-Source: AGHT+IHysr8kUZwcP/FKgi2tFUHzZz5O812ay4ztm0aTP+wsTRAoKYDcyo4tc7U1PoLtm6NhBG9JeQ== X-Received: by 2002:a05:6a20:6a1d:b0:1af:f939:8553 with SMTP id adf61e73a8af0-1b212df0a3fmr2084071637.46.1716531296708; Thu, 23 May 2024 23:14:56 -0700 (PDT) From: Sunil V L To: qemu-devel@nongnu.org, qemu-arm@nongnu.org, qemu-riscv@nongnu.org Cc: Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Michael S . Tsirkin" , Igor Mammedov , Ani Sinha , Laurent Vivier , Gerd Hoffmann , Alistair Francis , Sia Jee Heng , Haibo1 Xu , Anup Patel , Andrew Jones , Daniel Henrique Barboza , Peter Maydell , Palmer Dabbelt , Bin Meng , Weiwei Li , Liu Zhiwei , Sunil V L , Alistair Francis Subject: [PATCH v2 05/12] tests/qtest/bios-tables-test.c: Add support for arch in path Date: Fri, 24 May 2024 11:44:04 +0530 Message-Id: <20240524061411.341599-6-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240524061411.341599-1-sunilvl@ventanamicro.com> References: <20240524061411.341599-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=sunilvl@ventanamicro.com; helo=mail-pf1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ventanamicro.com) X-ZM-MESSAGEID: 1716531362333100001 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Alistair Francis --- 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 rebui= ld) g_assert(exp_sdt->aml); =20 if (rebuild) { - aml_file =3D g_strdup_printf("%s/%s/%.4s%s", data_dir, data->m= achine, + aml_file =3D 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 move= d to + * ARCH under virt folder, add this check as well. + */ + if (!g_file_test(aml_file, G_FILE_TEST_EXISTS)) { + aml_file =3D 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 =3D=3D 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)); =20 try_again: - aml_file =3D g_strdup_printf("%s/%s/%.4s%s", data_dir, data->machi= ne, - sdt->aml, ext); + aml_file =3D g_strdup_printf("%s/%s/%s/%.4s%s", data_dir, data->ma= chine, + data->arch, sdt->aml, ext); + if (!g_file_test(aml_file, G_FILE_TEST_EXISTS)) { + aml_file =3D g_strdup_printf("%s/%s/%.4s%s", data_dir, data->m= achine, + sdt->aml, ext); + } + if (verbosity_level >=3D 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 =3D { .machine =3D "virt", + .arch =3D "aarch64", .tcg_only =3D true, .uefi_fl1 =3D "pc-bios/edk2-aarch64-code.fd", .uefi_fl2 =3D "pc-bios/edk2-arm-vars.fd", @@ -1667,6 +1685,7 @@ static void test_acpi_aarch64_virt_tcg_numamem(void) { test_data data =3D { .machine =3D "virt", + .arch =3D "aarch64", .tcg_only =3D true, .uefi_fl1 =3D "pc-bios/edk2-aarch64-code.fd", .uefi_fl2 =3D "pc-bios/edk2-arm-vars.fd", @@ -1689,6 +1708,7 @@ static void test_acpi_aarch64_virt_tcg_pxb(void) { test_data data =3D { .machine =3D "virt", + .arch =3D "aarch64", .tcg_only =3D true, .uefi_fl1 =3D "pc-bios/edk2-aarch64-code.fd", .uefi_fl2 =3D "pc-bios/edk2-arm-vars.fd", @@ -1762,6 +1782,7 @@ static void test_acpi_aarch64_virt_tcg_acpi_hmat(void) { test_data data =3D { .machine =3D "virt", + .arch =3D "aarch64", .tcg_only =3D true, .uefi_fl1 =3D "pc-bios/edk2-aarch64-code.fd", .uefi_fl2 =3D "pc-bios/edk2-arm-vars.fd", @@ -1918,6 +1939,7 @@ static void test_acpi_aarch64_virt_tcg(void) { test_data data =3D { .machine =3D "virt", + .arch =3D "aarch64", .tcg_only =3D true, .uefi_fl1 =3D "pc-bios/edk2-aarch64-code.fd", .uefi_fl2 =3D "pc-bios/edk2-arm-vars.fd", @@ -1937,6 +1959,7 @@ static void test_acpi_aarch64_virt_tcg_topology(void) { test_data data =3D { .machine =3D "virt", + .arch =3D "aarch64", .variant =3D ".topology", .tcg_only =3D true, .uefi_fl1 =3D "pc-bios/edk2-aarch64-code.fd", @@ -2020,6 +2043,7 @@ static void test_acpi_aarch64_virt_viot(void) { test_data data =3D { .machine =3D "virt", + .arch =3D "aarch64", .tcg_only =3D true, .uefi_fl1 =3D "pc-bios/edk2-aarch64-code.fd", .uefi_fl2 =3D "pc-bios/edk2-arm-vars.fd", @@ -2196,6 +2220,7 @@ static void test_acpi_aarch64_virt_oem_fields(void) { test_data data =3D { .machine =3D "virt", + .arch =3D "aarch64", .tcg_only =3D true, .uefi_fl1 =3D "pc-bios/edk2-aarch64-code.fd", .uefi_fl2 =3D "pc-bios/edk2-arm-vars.fd", --=20 2.40.1