From nobody Sun Dec 29 17:55:51 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1718971560; cv=none; d=zohomail.com; s=zohoarc; b=mHnTqAp17c0BGI9XrvfM4OvzbbuhIDgkMB7igSJ6cr82Vu5jfa/FIU3Kf7AyrPnhYOijdkYzRpnBnYOYUbFHI3cBjTFbThsZhsTcyaxQUlnmzVq/Gm1pLxi+aZVumR2yxhV1/G1vUlMrjh+1LdduBpfz5kSVJfqAJ0dMalTK2ts= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1718971560; 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=HZycHu1GawJwjwX4WxIIeJpZLZFE0AM425lGZ17tEhU=; b=OoXGI23mWpTEgvYvlqCNCfjiXhVFGu7CUQWy1co03fFuHFqJ9e3RxwCFXGM05E6i124NW+Dk8eXI/esyZa/5L4m65LOeF+FmRQi8zIpq6coLfMF4mv37BUA/EEGwNBeIqx6Z0iU/T4yRlJx0z3lg3XpSG30wXXf/6Th0vtnvMdc= 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+importer2=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 1718971560148101.00942376135504; Fri, 21 Jun 2024 05:06:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKcvl-0004DY-57; Fri, 21 Jun 2024 07:59:49 -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 1sKcvj-0004Ch-Dl for qemu-devel@nongnu.org; Fri, 21 Jun 2024 07:59:47 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sKcvh-0003Ak-6s for qemu-devel@nongnu.org; Fri, 21 Jun 2024 07:59:47 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1f9cd92b146so14411315ad.3 for ; Fri, 21 Jun 2024 04:59:44 -0700 (PDT) Received: from sunil-pc.Dlink ([106.51.187.237]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9ebbb606dsm12422995ad.270.2024.06.21.04.59.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jun 2024 04:59:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1718971183; x=1719575983; 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=HZycHu1GawJwjwX4WxIIeJpZLZFE0AM425lGZ17tEhU=; b=IbUTkjIuHArbPDA+htOYVhJ+xW6dnjeYFUQwnk8tC0xIZo9Pe2HYR76OUlpVXwyxOk lYh+ZjhSVWdb8i3vimvsHe1bbbb933szig7IpKpRLez9ii1LnSO/m1p2PgPYJ93GN3gy XFkIT087Z9YRlgMpyWSKzTa3ZAl29TDJcg0G8AOZivWVGxEMiEAEb5rd5ZcohNyvorF5 nWKK5DCAuioJQEEbHSVI7M9ZPjGbRd83ICPhe1aoUUYj82RfOFheQxIjHkAjEJ441H3D BFE5WhaQppDlgyjl+f6tMith4aXJwMcyF+arrs/HeFD4jDkG0HekZHAaA19Snsrd3l6e M4ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718971183; x=1719575983; 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=HZycHu1GawJwjwX4WxIIeJpZLZFE0AM425lGZ17tEhU=; b=pXklWuHYunx0QKGcKnu9+MIhckyQMOmXoj9cpN16P5iMpUBoTjLVEd6zMWKT64AUE3 z0vddDIBjNF8ngDSMhEQu2IKp0gQv3RXeY04fKRK61JkDEuOJKwQ454ZxDFUs+md9Ike rLfNhFsO+LYgxcEOo9h1XbfeZqSIlhMFnNq4tr5xXQEL38PnAZA5e8AbicpxTIn0Kvj4 cHnWQmI7fsO8Xe8usWr2NpEcAIHK6nsSr3bgvSNYvlE3L0hZSn2oxWjrkKBWtRJo1Nje zUehgeGo8u+saqVQ5vQaqXzjkgWJ9quh5Uh3RAverJGCmA1I3Gxv1RzQV5jc6xfjcA+i sOAg== X-Gm-Message-State: AOJu0YyzCSTT21WwJGGAz9gzut/2lDZRJKhpmrr8ld2YyogXllGso4mf 5VecLcd0Hkbo8eUalQnBmtjMM0qFJjOcUaeoY81jGqUy1oOyolzP3SkbHXky8bXywWVI2o5vljh 7 X-Google-Smtp-Source: AGHT+IEM/tKOfaceedNOkIfkk8ElpCPYFvefB8Uw0BTod8hzVgPZbwql+26Z4OV1rz2i6Vw1iR+loA== X-Received: by 2002:a17:902:d491:b0:1f9:a386:2bbd with SMTP id d9443c01a7336-1f9aa3d0af5mr99598565ad.22.1718971183111; Fri, 21 Jun 2024 04:59:43 -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 Subject: [PATCH v3 05/15] tests/qtest/bios-tables-test.c: Add support for arch in path Date: Fri, 21 Jun 2024 17:28:56 +0530 Message-Id: <20240621115906.1049832-6-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240621115906.1049832-1-sunilvl@ventanamicro.com> References: <20240621115906.1049832-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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=sunilvl@ventanamicro.com; helo=mail-pl1-x62a.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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ventanamicro.com) X-ZM-MESSAGEID: 1718971561674100001 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