From nobody Mon Nov 25 02:53:37 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=1719328316; cv=none; d=zohomail.com; s=zohoarc; b=NBvqIDv1uMI2GKAKAqNxKau641OEeDmDHRq7mWaQMvwbgSYFeFHFc8vw86VuCjsPwpIIoDhL46wMmVHWpdvKo67wKsWHm4x2ke2K+pOsdeDHyjjC+wPtEVYwwot3k/CgvJiq2rgP+QiR1ti04GU7URTwEPqSS0pDg+1TYHntVKQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719328316; 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=y1OPYRH+1jqNvqk3IUxnhH2KTsAwqrwXkGI6cFJybeA=; b=dMjJxl5Sxw16jAHkkVc6OagRr7z3Ar4Ht5nKJrh3ERQ1GJcIa5NC/GlsQs2pkXlCyf0Cz0kXAhw936LE74RG9Y1Qu3f9eOK3oUz0ouoT73WUyafevaPGCsUtDETUSKaEbzJ0J8za0L5dit5rcM8DewMV4TgArxw6QgOX+T8p2E8= 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 1719328316720587.9495200041996; Tue, 25 Jun 2024 08:11:56 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sM7nV-0001VX-SJ; Tue, 25 Jun 2024 11:09:29 -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 1sM7nU-0001U7-88 for qemu-devel@nongnu.org; Tue, 25 Jun 2024 11:09:28 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sM7nR-0006WO-QH for qemu-devel@nongnu.org; Tue, 25 Jun 2024 11:09:28 -0400 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-706524adf91so3199314b3a.2 for ; Tue, 25 Jun 2024 08:09:25 -0700 (PDT) Received: from sunil-pc.Dlink ([106.51.187.237]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70681722219sm4142636b3a.73.2024.06.25.08.09.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jun 2024 08:09:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1719328164; x=1719932964; 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=y1OPYRH+1jqNvqk3IUxnhH2KTsAwqrwXkGI6cFJybeA=; b=EZJcknYvHj4noK6B+gj6iG9ChCmUO4FIgibvBUQFQ1jsKJ61/23Z+MNzvdffp1wil5 32TAllwKyZxCwRsgN5LZNgJq9d4CokdkaTdgijhE6LVt92cSfwV9IknFIi1JGYvnU54b JtYv0zlO1Pc5hgHBzcZBD89ajtllgGuQLc4onqd3kI4n0039EHez8eQpcRekIN8aXnJ7 sG4o95gn4RmTyG5HEVLuuXRjD3DnDxZ9XcftwV9x5hjT+0Kd/ev5immM0IQEmDU4zlAI e9eIGDncfCutlkh4u3nh6OBs2k2cTw5EZcz4KgJs1FZSsXqlpS5FLbeWd5zoFXzZ1bGH ehKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719328164; x=1719932964; 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=y1OPYRH+1jqNvqk3IUxnhH2KTsAwqrwXkGI6cFJybeA=; b=b6hQpbEbCU3nA6cIPLIJXYnV0xOZBC/Dolxvr9BxDJ5puhHYj9c0MXOjX7Ee6a+C9D zv06hJ3lAvl/rJxc//InnT/p3y+ZGXkvFs16+UR7RFHZBK8K/VNAoFOSulaefCGhVf2i jJIqzBEREDh5kfwb9WMdnOxZ928m2swPxygmGyrt47PF+E5ADJDdbvSmUGWUNI0oJhjv jd4DmV6uXB9ToHeEi/SDesWWSoYhGoRXiMEDgS1D5iIT0MCbV/RQsgwrYY0cbTFUZJVL nezeHe/vaA4kQvqtxDPfzZ83P7SQ4999z17UgKSS/O7bsQJ2Ir5KmhvLGPrq4Xotz2ZG PHBw== X-Gm-Message-State: AOJu0Yz61W4htgNQaHI8XL4/ViNYd7w3wZc/gefb0LC96q4NOsw85OPK TAxuPLpiVePuDOThOLxoROj13OOuQ3MiwF04L+PxyxQSh11efOz+hIyKi47H58tW2Vv+ceGs4Nq p X-Google-Smtp-Source: AGHT+IHh+glQz5bpzqBbMafxTBiedjDg8E9FAOGTZRELqYHixsca0aztRXEKHZOqK0Ntz0dA97XWAQ== X-Received: by 2002:a05:6a20:8914:b0:1bc:fff0:322a with SMTP id adf61e73a8af0-1bcfff03370mr6211022637.4.1719328163837; Tue, 25 Jun 2024 08:09:23 -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 , Sia Jee Heng , Alistair Francis , Daniel Henrique Barboza , Palmer Dabbelt , Bin Meng , Weiwei Li , Liu Zhiwei , Sunil V L , Alistair Francis Subject: [PATCH v4 06/16] tests/qtest/bios-tables-test.c: Add support for arch in path Date: Tue, 25 Jun 2024 20:38:29 +0530 Message-Id: <20240625150839.1358279-7-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240625150839.1358279-1-sunilvl@ventanamicro.com> References: <20240625150839.1358279-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::42d; envelope-from=sunilvl@ventanamicro.com; helo=mail-pf1-x42d.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: 1719328318556100006 Content-Type: text/plain; charset="utf-8" Since machine name can be common for multiple architectures (ex: virt), add "arch" in the path to search for expected AML files. Since the AML files are still under old path, add support for searching with and without arch in the path. Signed-off-by: Sunil V L Acked-by: Alistair Francis Reviewed-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index c4a4d1c7bf..29c52952f4 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->arch, data->machine, sdt->aml, ext); + + /* + * To keep test cases not failing before the DATA files are mo= ved to + * ${arch}/${machine} 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->ar= ch, + data->machine, 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); } --=20 2.40.1