From patchwork Sun Aug 13 11:54:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 28734 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E6FCC41513 for ; Sun, 13 Aug 2023 11:54:16 +0000 (UTC) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by mx.groups.io with SMTP id smtpd.web10.83746.1691927653377762507 for ; Sun, 13 Aug 2023 04:54:13 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=fZbBsxUM; spf=pass (domain: linuxfoundation.org, ip: 209.85.128.50, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-3fe1a17f983so30835275e9.3 for ; Sun, 13 Aug 2023 04:54:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1691927651; x=1692532451; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=A8Ha5dFM2nEx9COdLqvQkSxKrMwlfzR5Jshff6nBkRI=; b=fZbBsxUMjJUpNhtrq0tSmyk8u206pA6vVgjZ7gF5JFIbJ7G+85/rbFLeCtzgDwVrIa AObYXy/IMTYhFinY1QwAHZeeD7r7p2Y2miEM/Ny3TVyHHqKkQWqVHU/Mj1gRnBjx28WR ZI0bCb2H9Cq5a+60dqy5+N/KZviM1szsi/Kv0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691927651; x=1692532451; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=A8Ha5dFM2nEx9COdLqvQkSxKrMwlfzR5Jshff6nBkRI=; b=XUz2c1yHarJcjjNubn7WW0LZLwq4qAdTrEB35k9UTfs87wb9Ftr5TBiQJSlrOlTFMg 3RTiH+vsDLsg+NtKwt8HRGDbUMu69xdbpq+wfg9Sxrv/S8bBJ1mvsDJstXHsyWKY0nv8 oqim1Wqz0zG+owG4hvp9sen7zywyYaBuodm5Hd25cr8DsnsnF6JN8Us3VLRhTg4/GCW+ c5Eknja8YkOC2fYVOjLRv2zgzvC85aiK5l9fB5feGxJcUHjG7QoKC/BdWViDNq79oXl+ O7J3KSVV2F+SzerhZfmKgNwT1JfmdMtbzlreo91XMDkHADFCcKu5dZTeLau5rn7JQ2HT oQ7w== X-Gm-Message-State: AOJu0YzddOyJLUue13A8O6fQdYwxdKYV1f6a3q7DSlRt9/Lw8BCf41kA Ma2fRn/EVTTZvbnUPjxTBBKDphx5HhL6s7aLmFE= X-Google-Smtp-Source: AGHT+IE50QGy3C3dnhHBMEt1IPWmh5jDLnCHA9rchXZ7zetkMLzBeiAPqSoivMfhT15nNsz0/Nl0QQ== X-Received: by 2002:a05:600c:259:b0:3fe:2102:8083 with SMTP id 25-20020a05600c025900b003fe21028083mr5007390wmj.26.1691927651671; Sun, 13 Aug 2023 04:54:11 -0700 (PDT) Received: from max.int.rpsys.net ([2001:8b0:aba:5f3c:17a:7286:2cf2:8a86]) by smtp.gmail.com with ESMTPSA id p4-20020a1c7404000000b003fe1a092925sm10970082wmc.19.2023.08.13.04.54.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Aug 2023 04:54:11 -0700 (PDT) From: Richard Purdie To: openembedded-core@lists.openembedded.org Subject: [PATCH 1/8] resulttool/report: Avoid divide by zero Date: Sun, 13 Aug 2023 12:54:03 +0100 Message-Id: <20230813115410.163212-1-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 13 Aug 2023 11:54:16 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/185873 Avoid a divide by zero traceback if unfortunate test counts are encountered. Signed-off-by: Richard Purdie --- scripts/lib/resulttool/report.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/lib/resulttool/report.py b/scripts/lib/resulttool/report.py index f0ca50ebe24..a349510ab85 100644 --- a/scripts/lib/resulttool/report.py +++ b/scripts/lib/resulttool/report.py @@ -176,7 +176,10 @@ class ResultsTextReport(object): vals['sort'] = line['testseries'] + "_" + line['result_id'] vals['failed_testcases'] = line['failed_testcases'] for k in cols: - vals[k] = "%d (%s%%)" % (line[k], format(line[k] / total_tested * 100, '.0f')) + if total_tested: + vals[k] = "%d (%s%%)" % (line[k], format(line[k] / total_tested * 100, '.0f')) + else: + vals[k] = "0 (0%)" for k in maxlen: if k in vals and len(vals[k]) > maxlen[k]: maxlen[k] = len(vals[k]) From patchwork Sun Aug 13 11:54:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 28735 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6FBC8C04A6A for ; Sun, 13 Aug 2023 11:54:16 +0000 (UTC) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by mx.groups.io with SMTP id smtpd.web11.83602.1691927654524780898 for ; Sun, 13 Aug 2023 04:54:14 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=eQM8c5dH; spf=pass (domain: linuxfoundation.org, ip: 209.85.221.54, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-31965c94001so1277436f8f.3 for ; Sun, 13 Aug 2023 04:54:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1691927653; x=1692532453; 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=NGuBrJzGy6IK6snCy+OddKh0yl43pkybGz4ZekrR7kw=; b=eQM8c5dHGktfPYUXKfo4uiMgDFRDyN+lQifjeZhM/ZrjU/efBXwjbw5q41WfaECuPE i2iTDfPaaNBYsS/CoumnHDiDeN+T551FwJb+K7pEcB6cCNvZxD72BZ2QizLLtbJ5Eisn 62VHGNJGwRsjjk2P0BUgG1HGOTKwy/wg15mKU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691927653; x=1692532453; 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=NGuBrJzGy6IK6snCy+OddKh0yl43pkybGz4ZekrR7kw=; b=ZSk+4867B9NSPqhyLWRT0yvCLKOd4Wwb1KrBd4ZT6sXEXCWU7GtbaPk55tBBUPUoVh 48XdRPvbV7Vvn4dwrlGMqSUIRWD0JvxkvouT9CMhmpXgaTT5L+GPkn9r7CwFLJK1iGKd G7qJJprihOwufcyuAymRiqfjcBIZGwOV1L5u1WWaH0wpKidVpFTIjdfrmg2WYyTnMBNg 5OeT69Sx5az0XPLBmGbQR6bjQVw6Rhud9b6HFQFpz7IWNui9vg9lglFAi0tXIw7FsccI JqL/T9hqsBZzyH/IBhvP2lqJ3bZx4o9us+/kcx/IqRPfWc/7Q1NYLB5Hl/PnlAqhTPCd x8mg== X-Gm-Message-State: AOJu0YzbzJfqY9czyXI+hgavUhP0FYYSygmjejbCmi6qp8S2mkq7r0gY K1U/Snfrm5d8HZSAZ9FcxGxdSK9h7u9hvn7Nxyk= X-Google-Smtp-Source: AGHT+IG4EUCURlNQarzBt/NbOTCEB4p7tP4QVzsjM1wbNFv3qbMMx819L6QaIsLn6gqlVW1v6Ho+lA== X-Received: by 2002:a5d:5443:0:b0:314:4925:1704 with SMTP id w3-20020a5d5443000000b0031449251704mr5481820wrv.6.1691927652291; Sun, 13 Aug 2023 04:54:12 -0700 (PDT) Received: from max.int.rpsys.net ([2001:8b0:aba:5f3c:17a:7286:2cf2:8a86]) by smtp.gmail.com with ESMTPSA id p4-20020a1c7404000000b003fe1a092925sm10970082wmc.19.2023.08.13.04.54.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Aug 2023 04:54:11 -0700 (PDT) From: Richard Purdie To: openembedded-core@lists.openembedded.org Cc: Khem Raj Subject: [PATCH 2/8] gcc-testsuite: Fix qemu binary filtering code logic error Date: Sun, 13 Aug 2023 12:54:04 +0100 Message-Id: <20230813115410.163212-2-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230813115410.163212-1-richard.purdie@linuxfoundation.org> References: <20230813115410.163212-1-richard.purdie@linuxfoundation.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 13 Aug 2023 11:54:16 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/185874 This code doesn't do what it first might appear to, it would for example remove 'm' characters from the left side of qemu-mips leaving 'ips'. Fix it to stop anyone else being confused by the subtle logic error. Signed-off-by: Richard Purdie --- meta/recipes-devtools/gcc/gcc-testsuite.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/recipes-devtools/gcc/gcc-testsuite.inc b/meta/recipes-devtools/gcc/gcc-testsuite.inc index 64f60c730fe..a8299fa7aeb 100644 --- a/meta/recipes-devtools/gcc/gcc-testsuite.inc +++ b/meta/recipes-devtools/gcc/gcc-testsuite.inc @@ -51,9 +51,9 @@ python check_prepare() { # enable all valid instructions, since the test suite itself does not # limit itself to the target cpu options. # - valid for x86*, powerpc, arm, arm64 - if qemu_binary.lstrip("qemu-") in ["x86_64", "i386", "arm", "aarch64"]: + if qemu_binary.endswith(("x86_64", "i386", "arm", "aarch64")): args += ["-cpu", "max"] - elif qemu_binary.lstrip("qemu-") in ["ppc"]: + elif qemu_binary.endswith(("ppc")): args += d.getVar("QEMU_EXTRAOPTIONS_%s" % d.getVar('PACKAGE_ARCH')).split() sysroot = d.getVar("RECIPE_SYSROOT") args += ["-L", sysroot] From patchwork Sun Aug 13 11:54:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 28733 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BED3EB64DD for ; Sun, 13 Aug 2023 11:54:16 +0000 (UTC) Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by mx.groups.io with SMTP id smtpd.web10.83747.1691927654596952723 for ; Sun, 13 Aug 2023 04:54:14 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=Lyk3SlZE; spf=pass (domain: linuxfoundation.org, ip: 209.85.128.52, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-3fe1fc8768aso34439735e9.1 for ; Sun, 13 Aug 2023 04:54:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1691927653; x=1692532453; 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=BCddXgiudBFPlCa7YmO1eg4FzLiW//NgflyKmti4qRU=; b=Lyk3SlZEQVeB6HS5OOp4lqQyUIYjEBhysfFFj7oSzMAHTqgLUaVHz9LIMoj7YiFxjr auce88wgtOXQA2BR+UC41WntfXQq0jIFJULrgoDh4Kn+0OWnF/904pcA0ddYWBGprKKq FOh3++XenxJ2We+VGYhLMVP2hRGSH4Q9LEB3I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691927653; x=1692532453; 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=BCddXgiudBFPlCa7YmO1eg4FzLiW//NgflyKmti4qRU=; b=RoWxoxIVdolAFtpEt3osPk4c+Dcor19Y6ChUFNia2LYOWVFxx49Jy5IoGhxPVjQVwn a0W7IDlR45zwWWeVlQ9GKaJBhG439UAOrWKzYcTR+u204KYNt5STJ09Gyy6akFuRV4sX 01r+t2J/brK9FpM10TSfGl2CMo7eD7gfhi++8rGhaIsETh0y38RJfkJ/9LoUO5CeuAcG HlyveCTckY59Ih2HaFuxJYJs/xILlki1i7tq8PIkRGuZ9N73rYhr7PkHxciw0TtzaTc0 OzHe9tUHlEftxJsI8z07YE6CEFMo8ZSbLWG+RG3jl5ht1swe4bEHflyLVVUeq1siOSvv XmuQ== X-Gm-Message-State: AOJu0YwURb5hroo5TrT9I2Kww8ljWgaPHZi8cCtxa2OgQPqOuCXksXgw xvmzAZIFLgJNn9RmlZjZfdgiD8Y0UI5KCpxyM1s= X-Google-Smtp-Source: AGHT+IEB5FnSrK/nO1LT+sdnlEyTtiCnl40UqWZgt9bsgB4L4RCOe2zX0Psjt7dZPregvzsrOPboDw== X-Received: by 2002:a05:600c:3789:b0:3fb:b618:f7b3 with SMTP id o9-20020a05600c378900b003fbb618f7b3mr5911341wmr.21.1691927652977; Sun, 13 Aug 2023 04:54:12 -0700 (PDT) Received: from max.int.rpsys.net ([2001:8b0:aba:5f3c:17a:7286:2cf2:8a86]) by smtp.gmail.com with ESMTPSA id p4-20020a1c7404000000b003fe1a092925sm10970082wmc.19.2023.08.13.04.54.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Aug 2023 04:54:12 -0700 (PDT) From: Richard Purdie To: openembedded-core@lists.openembedded.org Cc: Khem Raj Subject: [PATCH 3/8] gcc-testsuite: Set qemu options for mips correctly Date: Sun, 13 Aug 2023 12:54:05 +0100 Message-Id: <20230813115410.163212-3-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230813115410.163212-1-richard.purdie@linuxfoundation.org> References: <20230813115410.163212-1-richard.purdie@linuxfoundation.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 13 Aug 2023 11:54:16 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/185875 MIPS sets QEMU CPU values similarly to ppc and doens't support 'max'. Allow this to filter through correctly to the toolchain testing. Signed-off-by: Richard Purdie --- meta/recipes-devtools/gcc/gcc-testsuite.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta/recipes-devtools/gcc/gcc-testsuite.inc b/meta/recipes-devtools/gcc/gcc-testsuite.inc index a8299fa7aeb..788a94ff5b6 100644 --- a/meta/recipes-devtools/gcc/gcc-testsuite.inc +++ b/meta/recipes-devtools/gcc/gcc-testsuite.inc @@ -53,8 +53,10 @@ python check_prepare() { # - valid for x86*, powerpc, arm, arm64 if qemu_binary.endswith(("x86_64", "i386", "arm", "aarch64")): args += ["-cpu", "max"] - elif qemu_binary.endswith(("ppc")): + elif qemu_binary.endswith(("ppc", "mips", "mips64")): args += d.getVar("QEMU_EXTRAOPTIONS_%s" % d.getVar('PACKAGE_ARCH')).split() + # For mips64 we could set a maximal CPU (e.g. Loongson-3A4000) however they either have MSA + # or Loongson-MMI vector extensions, not both and qemu lacks complete support for MMI sysroot = d.getVar("RECIPE_SYSROOT") args += ["-L", sysroot] # lib paths are static here instead of using $libdir since this is used by a -cross recipe From patchwork Sun Aug 13 11:54:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 28736 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57EF7C41513 for ; Sun, 13 Aug 2023 11:54:26 +0000 (UTC) Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) by mx.groups.io with SMTP id smtpd.web11.83603.1691927656283130505 for ; Sun, 13 Aug 2023 04:54:16 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=PIknkEEf; spf=pass (domain: linuxfoundation.org, ip: 209.85.208.170, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-2b9b904bb04so53330871fa.1 for ; Sun, 13 Aug 2023 04:54:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1691927654; x=1692532454; 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=+TU5UhFL1PchjNUkNJKlOcXkdXwCSDYhUrPWUjkb644=; b=PIknkEEfZWjHINiHBiaSldUTKGmDXq6DCYjKTdzaqGLYrE4ho6A5XQ5/26nhKzap/Q 0Cifm03vbUWGU/ZXefK1+9d5EsqL2x8UjWnha2ei1KO8o7z0NoG6TR09YBq+t1ehN4+t hpmgLBIyn5MjTTW/MlM+FXRHkVgOab/YMy78g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691927654; x=1692532454; 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=+TU5UhFL1PchjNUkNJKlOcXkdXwCSDYhUrPWUjkb644=; b=fGQQQFR2Kd3F2dh0ultJaNfutK9RBX4GfLlERCwg6utrDLt1k07H4PuZs8ggtvAm5c ypp7S8WqZaCy7UXxJuyjOSnA6bSGO37q0D2pQmbtac0W6LC8dpW/LFASlNF+xhvyL7Th 1sotxGJ2x/XnVrriwrh0M4rrBKmoSsy3g6txSgkDQym9JDrPMs6hOyyKojIRnaVsACLZ RRYdZfCW/p3LWriwA7kvrP4BCzCmAygx0EPsaWklT97kkBlHTzVLxurbuuTFv4B8Ho70 x/OLMtK/Kq6i4k+YECHUDvQ0YubQWHZQyb1Z3ugk7TvxSv366bRCtDpG/D7qkszpvCfE KuAA== X-Gm-Message-State: AOJu0Yw28nP2LYJAdHSeEdSjU//lfws+j0eGutxNOd5o0C/j5cpPY+v/ PaF9ywCgACRqNY5bPfA4oXFUutmSrKSfrozYeEY= X-Google-Smtp-Source: AGHT+IFjHx1dpSCJ+9Gq2ZTlXvX61Xhrm16fdkW4X61jMvywkV0H1reLSPbYnRxtCgqnzH2yXLSdKQ== X-Received: by 2002:a2e:9bd4:0:b0:2b9:5b46:2107 with SMTP id w20-20020a2e9bd4000000b002b95b462107mr4863312ljj.9.1691927653718; Sun, 13 Aug 2023 04:54:13 -0700 (PDT) Received: from max.int.rpsys.net ([2001:8b0:aba:5f3c:17a:7286:2cf2:8a86]) by smtp.gmail.com with ESMTPSA id p4-20020a1c7404000000b003fe1a092925sm10970082wmc.19.2023.08.13.04.54.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Aug 2023 04:54:13 -0700 (PDT) From: Richard Purdie To: openembedded-core@lists.openembedded.org Cc: Khem Raj Subject: [PATCH 4/8] mips/tune-mips64r2: Set qemu cpu option correctly Date: Sun, 13 Aug 2023 12:54:06 +0100 Message-Id: <20230813115410.163212-4-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230813115410.163212-1-richard.purdie@linuxfoundation.org> References: <20230813115410.163212-1-richard.purdie@linuxfoundation.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 13 Aug 2023 11:54:26 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/185876 Ensure the CPU enabled in QEMU is correct for this architecture. Signed-off-by: Richard Purdie --- meta/conf/machine/include/mips/tune-mips64r2.inc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/meta/conf/machine/include/mips/tune-mips64r2.inc b/meta/conf/machine/include/mips/tune-mips64r2.inc index c644f409187..e9ca4201ffc 100644 --- a/meta/conf/machine/include/mips/tune-mips64r2.inc +++ b/meta/conf/machine/include/mips/tune-mips64r2.inc @@ -12,11 +12,13 @@ TUNE_FEATURES:tune-mips64r2 = "${TUNE_FEATURES:tune-mips64} mips64r2" BASE_LIB:tune-mips64r2 = "lib64" MIPSPKGSFX_VARIANT:tune-mips64r2 = "mips64r2" PACKAGE_EXTRA_ARCHS:tune-mips64r2 = "mips64 mips64r2" +QEMU_EXTRAOPTIONS_mips64r2 = " -cpu MIPS64R2-generic" TUNE_FEATURES:tune-mips64r2el = "${TUNE_FEATURES:tune-mips64el} mips64r2" BASE_LIB:tune-mips64r2el = "lib64" MIPSPKGSFX_VARIANT:tune-mips64r2el = "mips64r2el" PACKAGE_EXTRA_ARCHS:tune-mips64r2el = "mips64el mips64r2el" +QEMU_EXTRAOPTIONS_mips64r2el = " -cpu MIPS64R2-generic" # MIPS 64r2 Soft Float AVAILTUNES += "mips64r2-nf mips64r2el-nf" @@ -25,11 +27,13 @@ TUNE_FEATURES:tune-mips64r2-nf = "${TUNE_FEATURES:tune-mips64-nf} mips64r2" BASE_LIB:tune-mips64r2-nf = "lib64" MIPSPKGSFX_VARIANT:tune-mips64r2-nf = "${TUNE_ARCH}" PACKAGE_EXTRA_ARCHS:tune-mips64r2-nf = "mips64-nf mips64r2-nf" +QEMU_EXTRAOPTIONS_mips64r2-nf = " -cpu MIPS64R2-generic" TUNE_FEATURES:tune-mips64r2el-nf = "${TUNE_FEATURES:tune-mips64el-nf} mips64r2" BASE_LIB:tune-mips64r2el-nf = "lib64" MIPSPKGSFX_VARIANT:tune-mips64r2el-nf = "${TUNE_ARCH}" PACKAGE_EXTRA_ARCHS:tune-mips64r2el-nf = "mips64el-nf mips64r2el-nf" +QEMU_EXTRAOPTIONS_mips64r2el-nf = " -cpu MIPS64R2-generic" # MIPS 64r2 n32 AVAILTUNES += "mips64r2-n32 mips64r2el-n32" @@ -38,11 +42,13 @@ TUNE_FEATURES:tune-mips64r2-n32 = "${TUNE_FEATURES:tune-mips64-n32} mips64r2" BASE_LIB:tune-mips64r2-n32 = "lib32" MIPSPKGSFX_VARIANT:tune-mips64r2-n32 = "${TUNE_ARCH}" PACKAGE_EXTRA_ARCHS:tune-mips64r2-n32 = "mips64-n32 mips64r2-n32" +QEMU_EXTRAOPTIONS_mips64r2-n32 = " -cpu MIPS64R2-generic" TUNE_FEATURES:tune-mips64r2el-n32 = "${TUNE_FEATURES:tune-mips64el-n32} mips64r2" BASE_LIB:tune-mips64r2el-n32 = "lib32" MIPSPKGSFX_VARIANT:tune-mips64r2el-n32 = "${TUNE_ARCH}" PACKAGE_EXTRA_ARCHS:tune-mips64r2el-n32 = "mips64el-n32 mips64r2el-n32" +QEMU_EXTRAOPTIONS_mips64r2el-n32 = " -cpu MIPS64R2-generic" # MIPS 64r2 n32 and Soft Float AVAILTUNES += "mips64r2-nf-n32 mips64r2el-nf-n32" @@ -51,11 +57,13 @@ TUNE_FEATURES:tune-mips64r2-nf-n32 = "${TUNE_FEATURES:tune-mips64-nf-n32} mips64 BASE_LIB:tune-mips64r2-nf-n32 = "lib32" MIPSPKGSFX_VARIANT:tune-mips64r2-nf-n32 = "${TUNE_ARCH}" PACKAGE_EXTRA_ARCHS:tune-mips64r2-nf-n32 = "mips64-nf-n32 mips64r2-nf-n32" +QEMU_EXTRAOPTIONS_mips64r2-nf-n32 = " -cpu MIPS64R2-generic" TUNE_FEATURES:tune-mips64r2el-nf-n32 = "${TUNE_FEATURES:tune-mips64el-nf-n32} mips64r2" BASE_LIB:tune-mips64r2el-nf-n32 = "lib32" MIPSPKGSFX_VARIANT:tune-mips64r2el-nf-n32 = "${TUNE_ARCH}" PACKAGE_EXTRA_ARCHS:tune-mips64r2el-nf-n32 = "mips64el-nf-n32 mips64r2el-nf-n32" +QEMU_EXTRAOPTIONS_mips64r2el-nf-32 = " -cpu MIPS64R2-generic" # MIPS 64r2 o32 AVAILTUNES += "mips64r2-o32 mips64r2el-o32" @@ -64,11 +72,13 @@ TUNE_FEATURES:tune-mips64r2-o32 = "${TUNE_FEATURES:tune-mips64-o32} mips64r2" BASE_LIB:tune-mips64r2-o32 = "lib" MIPSPKGSFX_VARIANT:tune-mips64r2-o32 = "${TUNE_ARCH}" PACKAGE_EXTRA_ARCHS:tune-mips64r2-o32 = "mips mips64-o32 mips64r2-o32" +QEMU_EXTRAOPTIONS_mips64r2-o32 = " -cpu MIPS64R2-generic" TUNE_FEATURES:tune-mips64r2el-o32 = "${TUNE_FEATURES:tune-mips64el-o32} mips64r2" BASE_LIB:tune-mips64r2el-o32 = "lib" MIPSPKGSFX_VARIANT:tune-mips64r2el-o32 = "${TUNE_ARCH}" PACKAGE_EXTRA_ARCHS:tune-mips64r2el-o32 = "mipsel mips64el-o32 mips64r2el-o32" +QEMU_EXTRAOPTIONS_mips64r2el-o32 = " -cpu MIPS64R2-generic" # MIPS 64r2 o32 and Soft Float AVAILTUNES += "mips64r2-nf-o32 mips64r2el-nf-o32" @@ -77,8 +87,10 @@ TUNE_FEATURES:tune-mips64r2-nf-o32 = "${TUNE_FEATURES:tune-mips64-nf-o32} mips64 BASE_LIB:tune-mips64r2-nf-o32 = "lib" MIPSPKGSFX_VARIANT:tune-mips64r2-nf-o32 = "${TUNE_ARCH}" PACKAGE_EXTRA_ARCHS:tune-mips64r2-nf-o32 = "mips-nf mips64r2-nf-o32" +QEMU_EXTRAOPTIONS_mips64r2-nf-o32 = " -cpu MIPS64R2-generic" TUNE_FEATURES:tune-mips64r2el-nf-o32 = "${TUNE_FEATURES:tune-mips64el-nf-o32} mips64r2" BASE_LIB:tune-mips64r2el-nf-o32 = "lib" MIPSPKGSFX_VARIANT:tune-mips64r2el-nf-o32 = "${TUNE_ARCH}" PACKAGE_EXTRA_ARCHS:tune-mips64r2el-nf-o32 = "mipsel-nf mips64r2el-nf-o32" +QEMU_EXTRAOPTIONS_mips64r2el-nf-o32 = " -cpu MIPS64R2-generic" From patchwork Sun Aug 13 11:54:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 28740 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64B7AC04E69 for ; Sun, 13 Aug 2023 11:54:26 +0000 (UTC) Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) by mx.groups.io with SMTP id smtpd.web10.83748.1691927656604896093 for ; Sun, 13 Aug 2023 04:54:16 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=KjLXM2yO; spf=pass (domain: linuxfoundation.org, ip: 209.85.208.178, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-2b9c0391749so53491961fa.0 for ; Sun, 13 Aug 2023 04:54:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1691927654; x=1692532454; 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=+ZNuP5F70H3aQJ6Yz3JN0JMDDz8augVN6myPcgRjFAk=; b=KjLXM2yOu2hPMZyd3Zixr+wJyxLAsQDy31hDRacxCM8sgpBBm/HrJeDUFpzFl7aBZ3 6LBcNwjbiq4B+j3oDSrujZoWBLhkbIyVHAZ1gFE3NbsFviERtSwQX9IqJ6M2CJi8OANI N/ALZtntkLSQLzO4elT+QK+Bm1RwnE9GA2VY0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691927654; x=1692532454; 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=+ZNuP5F70H3aQJ6Yz3JN0JMDDz8augVN6myPcgRjFAk=; b=C8MURAA6nG+t+136ds8IDtDTjxmemDPn8DlEnAG/SbJ0908+z+9yYdAgpqdcFF0s1i 8uKYD5LbztkeGoA1XhlNsebOKjwIf8smZNIq9QvxmPE9u1PuMbp7J5hT3sKxOhprsfEH vuEsnt2TSqW7RY8quZECtTR7YtL1c9pYkNmq5ClMfxbGygVKlOFWeposfJYbNWva1hkK 67a9Ppe7EvE1r+STCsCxsNS3iW0G6J6HyQT2cMO60+f8CCAGMDgLEMsAMTOSHqkK0VPJ 0msVt3lq/mYwxVLOBroAXcJDLeLoa+y6VSJYpLQWuv3wkowhlC1KLYuruARi43maO9Br rXqg== X-Gm-Message-State: AOJu0YwSgo+vebcxLkgp4m1cfLsopRpCpxlFKhipICNdIorR46ISZOjn B5Dw+ISaysfA5tVyzHIKE+CsSdo0C+XTZhqr30k= X-Google-Smtp-Source: AGHT+IFvxkmTRDDUtGewWldd7zRSzoyLmjKEvgliKc1vCOxXmNmV086iC2OoC/4z/jVmOs5gVdmHMg== X-Received: by 2002:a05:651c:1213:b0:2b7:339c:f791 with SMTP id i19-20020a05651c121300b002b7339cf791mr4972652lja.25.1691927654459; Sun, 13 Aug 2023 04:54:14 -0700 (PDT) Received: from max.int.rpsys.net ([2001:8b0:aba:5f3c:17a:7286:2cf2:8a86]) by smtp.gmail.com with ESMTPSA id p4-20020a1c7404000000b003fe1a092925sm10970082wmc.19.2023.08.13.04.54.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Aug 2023 04:54:14 -0700 (PDT) From: Richard Purdie To: openembedded-core@lists.openembedded.org Cc: Khem Raj Subject: [PATCH 5/8] binutils-cross-testsuite: Pass TUNE_LDARGS to tests Date: Sun, 13 Aug 2023 12:54:07 +0100 Message-Id: <20230813115410.163212-5-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230813115410.163212-1-richard.purdie@linuxfoundation.org> References: <20230813115410.163212-1-richard.purdie@linuxfoundation.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 13 Aug 2023 11:54:26 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/185877 In some cases we need to pass the linker arguments to the linker, particularly when the default in LD differs to that which gcc and our compiler flags are using (mips defaults to 32 bit). Ensure these are passed in. Signed-off-by: Richard Purdie --- meta/recipes-devtools/binutils/binutils-cross-testsuite_2.41.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/recipes-devtools/binutils/binutils-cross-testsuite_2.41.bb b/meta/recipes-devtools/binutils/binutils-cross-testsuite_2.41.bb index 14480785b4d..630815c7a3e 100644 --- a/meta/recipes-devtools/binutils/binutils-cross-testsuite_2.41.bb +++ b/meta/recipes-devtools/binutils/binutils-cross-testsuite_2.41.bb @@ -47,6 +47,8 @@ python check_prepare() { content.append(d.expand('set CC "${TARGET_PREFIX}gcc --sysroot=${STAGING_DIR_TARGET} ${TUNE_CCARGS}"')) content.append(d.expand('set CXX "${TARGET_PREFIX}g++ --sysroot=${STAGING_DIR_TARGET} ${TUNE_CCARGS}"')) content.append(d.expand('set CFLAGS_FOR_TARGET "--sysroot=${STAGING_DIR_TARGET} ${TUNE_CCARGS}"')) + content.append(d.expand('set LD "${TARGET_PREFIX}ld ${TUNE_LDARGS}"')) + content.append(d.expand('set LDFLAGS_FOR_TARGET "${TUNE_LDARGS}"')) if suite == "ld" and d.getVar("TUNE_ARCH") == "mips64": # oe patches binutils to have the default mips64 abi as 64bit, but From patchwork Sun Aug 13 11:54:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 28739 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 649B8C001B0 for ; Sun, 13 Aug 2023 11:54:26 +0000 (UTC) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by mx.groups.io with SMTP id smtpd.web11.83604.1691927656865136149 for ; Sun, 13 Aug 2023 04:54:17 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=a9HoqiCH; spf=pass (domain: linuxfoundation.org, ip: 209.85.221.42, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-307d58b3efbso3024395f8f.0 for ; Sun, 13 Aug 2023 04:54:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1691927655; x=1692532455; 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=cVm8iLAUPV91MHtbSqz0BZcsV3Aro/xOpzjnLVzxT7w=; b=a9HoqiCHKlDXcsN6yTyUR69U3lHGwQo66ixw+qJaG0XfZvVOSUYPXo8f3QpGIxTfDe Ova0TpBL1wwK57vovmJw7/M6Aml6mZtRASp5u0DIcPfSzSG5U5nCTS4B6VUss+hnHaf/ t+sIl3yi1iGYpXY0w1oVe+QnwJAhAZtPG9DsM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691927655; x=1692532455; 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=cVm8iLAUPV91MHtbSqz0BZcsV3Aro/xOpzjnLVzxT7w=; b=W9392h2QWPQ0HagpcZ9IBCTnoV+zqyaPMERXc69c9QxM+a9ZhGz4+5UIjvX8YflhhD 5xrgQ0kSm+0dRRiDr0zVilpYHO5cKNNJOFQwaCZ1QmR0piqpG4gizQtpMJc+no8JoF32 PDIlhU6Sx54ubkgxVrabXxJaQQoUDJY28G8vnz8Mckkjo7BIVYMKxFPVoktngTC8xwih G+bRytNK/KycTLu9GBh8vlmrgbajkdJc50zLnVQDKYONp3AoK7qDIqmt6z2XzYWcsErE DTHGl/Mn8zGckzvu2lL5Av1exNagootg9ACczO50fcmmPdAISEr0UrEibIa/rZpafo32 S1Rw== X-Gm-Message-State: AOJu0YyPqOLH/BFxoTaHxf5ubHMIz20AS6feL9nW+7wUYvThsZQ0WWe7 Lhc/BRWw3te5PXMhZNtW8M19vhew9Yx9kvRH3AE= X-Google-Smtp-Source: AGHT+IFwZYL8hlwrtDWYRdLyfyykgnEtI4uGUBr8O/ndIXkawL+6kTnuGnP5+fh0To5gBbBdNtzy9A== X-Received: by 2002:a5d:6051:0:b0:314:5f4a:5a63 with SMTP id j17-20020a5d6051000000b003145f4a5a63mr4926532wrt.54.1691927655089; Sun, 13 Aug 2023 04:54:15 -0700 (PDT) Received: from max.int.rpsys.net ([2001:8b0:aba:5f3c:17a:7286:2cf2:8a86]) by smtp.gmail.com with ESMTPSA id p4-20020a1c7404000000b003fe1a092925sm10970082wmc.19.2023.08.13.04.54.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Aug 2023 04:54:14 -0700 (PDT) From: Richard Purdie To: openembedded-core@lists.openembedded.org Cc: Khem Raj Subject: [PATCH 6/8] arch-mips: Ensure TUNE_LDARGS is set correctly Date: Sun, 13 Aug 2023 12:54:08 +0100 Message-Id: <20230813115410.163212-6-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230813115410.163212-1-richard.purdie@linuxfoundation.org> References: <20230813115410.163212-1-richard.purdie@linuxfoundation.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 13 Aug 2023 11:54:26 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/185878 Similarly to x86, ensure we have the flags to the linker operating correctly (it defaults to 32 bit). Normally it is driven by gcc so this hasn't shown up but it does lead to hundreds of binutils test failures. Signed-off-by: Richard Purdie --- meta/conf/machine/include/mips/arch-mips.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/conf/machine/include/mips/arch-mips.inc b/meta/conf/machine/include/mips/arch-mips.inc index e48ddd2d6b4..e39cdcab5dd 100644 --- a/meta/conf/machine/include/mips/arch-mips.inc +++ b/meta/conf/machine/include/mips/arch-mips.inc @@ -26,6 +26,8 @@ MACHINE_FEATURES_BACKFILL_CONSIDERED:append = " ${@bb.utils.contains('TUNE_FEATU TUNEVALID[n64] = "MIPS64 n64 ABI" TUNECONFLICTS[n64] = "o32 n32" TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'n64', ' -mabi=64', '', d)}" +LD64ARG = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', '-m elf64btsmip', '-m elf64ltsmip', d)}" +TUNE_LDARGS += "${@bb.utils.contains('TUNE_FEATURES', 'n64', '${LD64ARG}', '', d)}" # Floating point TUNEVALID[fpu-hard] = "Use hardware FPU" From patchwork Sun Aug 13 11:54:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 28737 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5630CEB64DD for ; Sun, 13 Aug 2023 11:54:26 +0000 (UTC) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by mx.groups.io with SMTP id smtpd.web10.83749.1691927657722702586 for ; Sun, 13 Aug 2023 04:54:18 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=W7gZdUue; spf=pass (domain: linuxfoundation.org, ip: 209.85.128.51, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-3fe45481edfso35148495e9.1 for ; Sun, 13 Aug 2023 04:54:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1691927656; x=1692532456; 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=qtcdg+/tHiS4R/XC6aWQJqvpaONe57Hate0Y1nuPevw=; b=W7gZdUuejtclN1LZyA1lq5cFq3nUlDd6idcPOh4uEEUHTf3XSq98duadaNdT3iMP/b TMrEi5AaAf2zgM3YnI+mQ3bsi80nK69s2jBp+arGbc4+6Wmtv0dr8L0/dHvydPI0x6uk PAsBxSGduEB2+M1M0W/FRAmTYjgrNtNM/80RY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691927656; x=1692532456; 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=qtcdg+/tHiS4R/XC6aWQJqvpaONe57Hate0Y1nuPevw=; b=FM9Jiyhp9sRbNA5QR0CabOM81FAaT7pgleMMCUJVvZPJZTBzHB3KG8QkDbTjtfyycT HZFHIGMyvXdwQceQ/AzEJKdpIser44wbnaJdBe4qsc2Fcfs4msYgC0EEEuZT6CFxj7v3 kPkO2kvYgPdF//ViVwmDmtrLTrWz8Up13vbBN54uhCO94VAqz13zhwI/ZXqiwgcBi/Vr Vflfi4tsfkoBgE0fYgOUqj0S6gtTcdrfyP/2d1Kzayw5AAll3xj/NkusqtNb+fpacBmk 6OKFiOzrV2A7Ra0VyNQFBGIXkdeTxZP/LWp1UBQ1riW0dNhFbTZX5vk9taI9T0x+aGR2 4KHg== X-Gm-Message-State: AOJu0YynPKhv7zgfsayn9Mm1D4ySCb5xI8P2BknDm3vy98PMwEAGydqF FoTKJJxNOWHFmM9IImtm33LG9SD/RFf807844n4= X-Google-Smtp-Source: AGHT+IEN7/z0vOQmSN97Bzfe2wNPeIqgH8rn3n+Sdl7A076ozUFTSqjmgWfyW3Ua9eJ9fgm+qzv3oA== X-Received: by 2002:a7b:cd99:0:b0:3fe:63ca:ccf6 with SMTP id y25-20020a7bcd99000000b003fe63caccf6mr5625839wmj.16.1691927655966; Sun, 13 Aug 2023 04:54:15 -0700 (PDT) Received: from max.int.rpsys.net ([2001:8b0:aba:5f3c:17a:7286:2cf2:8a86]) by smtp.gmail.com with ESMTPSA id p4-20020a1c7404000000b003fe1a092925sm10970082wmc.19.2023.08.13.04.54.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Aug 2023 04:54:15 -0700 (PDT) From: Richard Purdie To: openembedded-core@lists.openembedded.org Cc: Khem Raj Subject: [PATCH 7/8] gcc: Add patch to improve testsuite failures, particularly mips Date: Sun, 13 Aug 2023 12:54:09 +0100 Message-Id: <20230813115410.163212-7-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230813115410.163212-1-richard.purdie@linuxfoundation.org> References: <20230813115410.163212-1-richard.purdie@linuxfoundation.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 13 Aug 2023 11:54:26 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/185879 Disable loongson-mmi runtine, qemu doesn't appear to fully support them even if some of the instruction decoding is there. Also disable MSA mips runtime extensions. For some reason qemu appears to accept the test code when it shouldn't. Our selected MIPS cpu for QEMU doesn't support them. MIPS is unusual in the gcc testsuite as it uses EFFECTIVE_TARGETS and loops multiple times through the vector testsuite. In the case of the two above, we can compile/link them but not run them. Even with the runtime disabled, if the code marks it as a runtime test, it will elevate itself to that. Setting the default target to compile therefore isn't enough. Therefore add code to downgrade runtime tests to link tests if the hardware support isn't there to run them. This avoids thousands of test failures. To do this we have to hook downgrade code into the main test runner. Enable that downgrading for other cases where hardware to run vector extensions is unavailable to remove test failures on other architectures too. Also, for gcc.target tests, add checks on wheter loongson or msa code can be run before trying that, allowing downgrading of tests there to work too. Parts of the patch may be able to be split off and acceptable to upstream with discussion. Need to investigate why qemu-user passes the 'bad' instructions'. For now, this should at least remove hundreds of test failures and improve test failures on non-mips too now a root cause of some was identified. Signed-off-by: Richard Purdie --- meta/recipes-devtools/gcc/gcc-13.2.inc | 1 + .../gcc/gcc/0025-gcc-testsuite-mips.patch | 225 ++++++++++++++++++ 2 files changed, 226 insertions(+) create mode 100644 meta/recipes-devtools/gcc/gcc/0025-gcc-testsuite-mips.patch diff --git a/meta/recipes-devtools/gcc/gcc-13.2.inc b/meta/recipes-devtools/gcc/gcc-13.2.inc index 7329562f657..7f97ecc3329 100644 --- a/meta/recipes-devtools/gcc/gcc-13.2.inc +++ b/meta/recipes-devtools/gcc/gcc-13.2.inc @@ -64,6 +64,7 @@ SRC_URI = "${BASEURI} \ file://0022-libatomic-Do-not-enforce-march-on-aarch64.patch \ file://0023-Fix-install-path-of-linux64.h.patch \ file://0024-Avoid-hardcoded-build-paths-into-ppc-libgcc.patch \ + file://0025-gcc-testsuite-mips.patch \ " SRC_URI[sha256sum] = "e275e76442a6067341a27f04c5c6b83d8613144004c0413528863dc6b5c743da" diff --git a/meta/recipes-devtools/gcc/gcc/0025-gcc-testsuite-mips.patch b/meta/recipes-devtools/gcc/gcc/0025-gcc-testsuite-mips.patch new file mode 100644 index 00000000000..49eaece923c --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc/0025-gcc-testsuite-mips.patch @@ -0,0 +1,225 @@ +gcc testsuite tweaks for mips/OE + +Disable loongson-mmi runtine, qemu doesn't appear to fully support them even if some +of the instruction decoding is there. + +Also disable MSA mips runtime extensions. For some reason qemu appears to accept the test +code when it shouldn't. Our selected MIPS cpu for QEMU doesn't support them. + +MIPS is unusual in the gcc testsuite as it uses EFFECTIVE_TARGETS and loops +multiple times through the vector testsuite. In the case of the two above, we can +compile/link them but not run them. Even with the runtime disabled, if the code +marks it as a runtime test, it will elevate itself to that. Setting the default +target to compile therefore isn't enough. + +Therefore add code to downgrade runtime tests to link tests if the hardware +support isn't there to run them. This avoids thousands of test failures. To do +this we have to hook downgrade code into the main test runner. + +Enable that downgrading for other cases where hardware to run vector extensions is +unavailable to remove test failures on other architectures too. + +Also, for gcc.target tests, add checks on wheter loongson or msa code can +be run before trying that, allowing downgrading of tests there to work too. + +Upstream-Status: Pending +[Parts of the patch may be able to be split off and acceptable to upstream with +discussion. Need to investigate why qemu-user passes the 'bad' instructions'] + +Signed-off-by: Richard Purdie + +Index: gcc-13.2.0/gcc/testsuite/lib/target-supports.exp +=================================================================== +--- gcc-13.2.0.orig/gcc/testsuite/lib/target-supports.exp ++++ gcc-13.2.0/gcc/testsuite/lib/target-supports.exp +@@ -2155,14 +2155,7 @@ proc check_mips_loongson_mmi_hw_availabl + if { !([istarget mips*-*-*]) } { + expr 0 + } else { +- check_runtime_nocache mips_loongson_mmi_hw_available { +- #include +- int main() +- { +- asm volatile ("paddw $f2,$f4,$f6"); +- return 0; +- } +- } "-mloongson-mmi" ++ expr 0 + } + }] + } +@@ -2176,29 +2169,7 @@ proc check_mips_msa_hw_available { } { + if { !([istarget mips*-*-*]) } { + expr 0 + } else { +- check_runtime_nocache mips_msa_hw_available { +- #if !defined(__mips_msa) +- #error "MSA NOT AVAIL" +- #else +- #if !(((__mips == 64) || (__mips == 32)) && (__mips_isa_rev >= 2)) +- #error "MSA NOT AVAIL FOR ISA REV < 2" +- #endif +- #if !defined(__mips_hard_float) +- #error "MSA HARD_FLOAT REQUIRED" +- #endif +- #if __mips_fpr != 64 +- #error "MSA 64-bit FPR REQUIRED" +- #endif +- #include +- +- int main() +- { +- v8i16 v = __builtin_msa_ldi_h (0); +- v[0] = 0; +- return v[0]; +- } +- #endif +- } "-mmsa" ++ expr 0 + } + }] + } +@@ -9187,6 +9158,7 @@ proc is-effective-target-keyword { arg } + + proc et-dg-runtest { runtest testcases flags default-extra-flags } { + global dg-do-what-default ++ global do-what-limit + global EFFECTIVE_TARGETS + global et_index + +@@ -9194,6 +9166,7 @@ proc et-dg-runtest { runtest testcases f + foreach target $EFFECTIVE_TARGETS { + set target_flags $flags + set dg-do-what-default compile ++ set do-what-limit link + set et_index [lsearch -exact $EFFECTIVE_TARGETS $target] + if { [info procs add_options_for_${target}] != [list] } { + set target_flags [add_options_for_${target} "$flags"] +@@ -9201,8 +9174,10 @@ proc et-dg-runtest { runtest testcases f + if { [info procs check_effective_target_${target}_runtime] + != [list] && [check_effective_target_${target}_runtime] } { + set dg-do-what-default run ++ set do-what-limit run + } + $runtest $testcases $target_flags ${default-extra-flags} ++ unset do-what-limit + } + } else { + set et_index 0 +@@ -10789,6 +10764,7 @@ proc check_effective_target_sigsetjmp {} + proc check_vect_support_and_set_flags { } { + global DEFAULT_VECTCFLAGS + global dg-do-what-default ++ global do-what-limit + global EFFECTIVE_TARGETS + + if [istarget powerpc-*paired*] { +@@ -10797,6 +10773,7 @@ proc check_vect_support_and_set_flags { + set dg-do-what-default run + } else { + set dg-do-what-default compile ++ set do-what-limit link + } + } elseif [istarget powerpc*-*-*] { + # Skip targets not supporting -maltivec. +@@ -10821,6 +10798,7 @@ proc check_vect_support_and_set_flags { + lappend DEFAULT_VECTCFLAGS "-mcpu=970" + } + set dg-do-what-default compile ++ set do-what-limit link + } + } elseif { [istarget i?86-*-*] || [istarget x86_64-*-*] } { + lappend DEFAULT_VECTCFLAGS "-msse2" +@@ -10828,6 +10806,7 @@ proc check_vect_support_and_set_flags { + set dg-do-what-default run + } else { + set dg-do-what-default compile ++ set do-what-limit link + } + } elseif { [istarget mips*-*-*] + && [check_effective_target_nomips16] } { +@@ -10847,6 +10826,7 @@ proc check_vect_support_and_set_flags { + set dg-do-what-default run + } else { + set dg-do-what-default compile ++ set do-what-limit link + } + } elseif [istarget alpha*-*-*] { + # Alpha's vectorization capabilities are extremely limited. +@@ -10860,6 +10840,7 @@ proc check_vect_support_and_set_flags { + set dg-do-what-default run + } else { + set dg-do-what-default compile ++ set do-what-limit link + } + } elseif [istarget ia64-*-*] { + set dg-do-what-default run +@@ -10873,6 +10854,7 @@ proc check_vect_support_and_set_flags { + set dg-do-what-default run + } else { + set dg-do-what-default compile ++ set do-what-limit link + } + } elseif [istarget aarch64*-*-*] { + set dg-do-what-default run +@@ -10897,6 +10879,7 @@ proc check_vect_support_and_set_flags { + } else { + lappend DEFAULT_VECTCFLAGS "-march=z14" "-mzarch" + set dg-do-what-default compile ++ set do-what-limit link + } + } elseif [istarget amdgcn-*-*] { + set dg-do-what-default run +Index: gcc-13.2.0/gcc/testsuite/gcc.target/mips/mips.exp +=================================================================== +--- gcc-13.2.0.orig/gcc/testsuite/gcc.target/mips/mips.exp ++++ gcc-13.2.0/gcc/testsuite/gcc.target/mips/mips.exp +@@ -709,7 +709,23 @@ proc mips_first_unsupported_option { ups + global mips_option_tests + upvar $upstatus status + ++ if { [mips_have_test_option_p status "-mmsa"] } { ++ verbose -log "Found -mmsa" ++ if { ![check_mips_msa_hw_available] } { ++ verbose -log "No MSA avail" ++ return "-mmsa" ++ } ++ } ++ if { [mips_have_test_option_p status "-mloongson-mmi"] } { ++ verbose -log "Found -mloonson-mmi" ++ if { ![check_mips_loongson_mmi_hw_available] } { ++ verbose -log "No MMI avail" ++ return "-mloonson-mmi" ++ } ++ } ++ + foreach { option code } [array get mips_option_tests] { ++ + if { [mips_have_test_option_p status $option] } { + regsub -all "\n" $code "\\n\\\n" asm + # Use check_runtime from target-supports.exp, which caches +Index: gcc-13.2.0/gcc/testsuite/lib/gcc-dg.exp +=================================================================== +--- gcc-13.2.0.orig/gcc/testsuite/lib/gcc-dg.exp ++++ gcc-13.2.0/gcc/testsuite/lib/gcc-dg.exp +@@ -240,9 +240,20 @@ proc schedule-cleanups { opts } { + + proc gcc-dg-test-1 { target_compile prog do_what extra_tool_flags } { + # Set up the compiler flags, based on what we're going to do. ++ global do-what-limit + + set options [list] + ++ if [info exists do-what-limit] then { ++ # Demote run tests to $do-what-limit if set ++ switch $do_what { ++ run { ++ set do_what $do-what-limit ++ set dg-do-what $do-what-limit ++ } ++ } ++ } ++ + switch $do_what { + "preprocess" { + set compile_type "preprocess" From patchwork Sun Aug 13 11:54:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 28738 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 570C9C04A6A for ; Sun, 13 Aug 2023 11:54:26 +0000 (UTC) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by mx.groups.io with SMTP id smtpd.web10.83751.1691927658365332662 for ; Sun, 13 Aug 2023 04:54:18 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=DvNyimuu; spf=pass (domain: linuxfoundation.org, ip: 209.85.128.43, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-3fe501e0b4cso31924015e9.1 for ; Sun, 13 Aug 2023 04:54:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1691927656; x=1692532456; 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=5o+jrHGCwI1Va31P7Bn9iOIJQauGxl/S1nebvTsPFuI=; b=DvNyimuuycmTb+ysljj8pxNDMEbJX89Txo/8VTyUC7c1EBwbsI4H492lxUE10oW4lC J87pTZ9NgzKKnexzkIRY0kQ5XoXVCzyj+CMWqysjW/x9wnw1LB4JY7joEc+UxgfSvjsP I84VjKlEoYTU1UGsMFlzNjDdZW3RGDFdxmko0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691927656; x=1692532456; 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=5o+jrHGCwI1Va31P7Bn9iOIJQauGxl/S1nebvTsPFuI=; b=lhHtKapoFCakqYflLGNBffdTY4vr8SPML80w52XrLMGU4LaGW2ukhPsXVJ26Dpo/hF GshGjmYqBi2hBaXV9WJu6vG3wlFCC57wFyO2pf9ghedwqtChxUtvwMNBpouappzLA3p8 tS83Ws1rX6bf8EIU95EtWRLpwgFUZyAo+mOVzawY9q4+r0/EArv0lp0KZRHiwZTyeE9s 9qPkptqL94xlHXX87rJBT12zeMo5kllfHNBXFvWi4rFdXybhUSfEXJiKD/22Yf/B+Hbq 4sZw9/eOo9HYtTFtbylPgFyDYcE7fhvGSCKQQ++mJksEc+ADpRiESUMOIw/o8o7X7CIv fkfA== X-Gm-Message-State: AOJu0YxAYz3V2LKb38sxk78Cn40H0uxLzgDgqbSrC41kP7a2EyTJHja+ lkj/a/9NYDmAM1tTc4G7cRy7NeMT2x6G3KM8mwA= X-Google-Smtp-Source: AGHT+IHU6S1kQmOZbHj2KniDC2Cs4V3cMX+ewcNf2zj/OjJ4rovbhV1prvfc+gpqnnfxQBw+hyVoZw== X-Received: by 2002:a7b:cd0f:0:b0:3fe:5053:1a0b with SMTP id f15-20020a7bcd0f000000b003fe50531a0bmr5557943wmj.11.1691927656692; Sun, 13 Aug 2023 04:54:16 -0700 (PDT) Received: from max.int.rpsys.net ([2001:8b0:aba:5f3c:17a:7286:2cf2:8a86]) by smtp.gmail.com with ESMTPSA id p4-20020a1c7404000000b003fe1a092925sm10970082wmc.19.2023.08.13.04.54.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Aug 2023 04:54:16 -0700 (PDT) From: Richard Purdie To: openembedded-core@lists.openembedded.org Cc: Bruce Ashfield Subject: [PATCH 8/8] oeqa/runtime/parselogs: Exclude preempt-rt error for now Date: Sun, 13 Aug 2023 12:54:10 +0100 Message-Id: <20230813115410.163212-8-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230813115410.163212-1-richard.purdie@linuxfoundation.org> References: <20230813115410.163212-1-richard.purdie@linuxfoundation.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 13 Aug 2023 11:54:26 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/185880 With the new 6.4 kernel we see this preempt-rt error. It is blocking changing to the new kernel and has sat on mailing lists unresolved for a long time. Ignore it in testing for now and allow upgrading until we can better understand the issues. Signed-off-by: Richard Purdie --- meta/lib/oeqa/runtime/cases/parselogs.py | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/lib/oeqa/runtime/cases/parselogs.py b/meta/lib/oeqa/runtime/cases/parselogs.py index e67d3750dad..e0a5ef5d08e 100644 --- a/meta/lib/oeqa/runtime/cases/parselogs.py +++ b/meta/lib/oeqa/runtime/cases/parselogs.py @@ -99,6 +99,7 @@ qemux86_common = [ "blk_update_request: I/O error, dev fd0, sector 0 op 0x0:(READ)", "floppy: error", 'failed to IDENTIFY (I/O error, err_mask=0x4)', + 'NOHZ tick-stop error: local softirq work is pending, handler #80!!!' ] + common_errors ignore_errors = {