From patchwork Fri Dec 30 00:38:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 13083987 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 23B73C4708E for ; Fri, 30 Dec 2022 00:39:21 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.469768.729240 (Exim 4.92) (envelope-from ) id 1pB3QW-0004dO-FR; Fri, 30 Dec 2022 00:39:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 469768.729240; Fri, 30 Dec 2022 00:39:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pB3QW-0004cy-9Z; Fri, 30 Dec 2022 00:39:12 +0000 Received: by outflank-mailman (input) for mailman id 469768; Fri, 30 Dec 2022 00:39:10 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pB3QU-0002si-3V for xen-devel@lists.xenproject.org; Fri, 30 Dec 2022 00:39:10 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 5e4a6674-87da-11ed-91b6-6bf2151ebd3b; Fri, 30 Dec 2022 01:39:08 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 5e4a6674-87da-11ed-91b6-6bf2151ebd3b DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1672360748; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=aKBSwtrERlqBbqeZ2HPJFw1NuINA10Vqqd2ET7c3vXU=; b=fgvlXL5U14S7BcM5AqAA+dn3U5jK6YqZizM6NCOH8vP7tJfMjJCCoUvw /x0k/u5KvczWWfKLERmxyH0adizFXFpfDWNTTDiZJ8nMsb4nfCYnX7FAr pXUe0yxBnt9C30jjz4jW9xSSxpZAyGX+/OpSWm8A5Xz3HLXBVL3aSCWHe 8=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 93013913 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:d2vpd6q3hVBABqR93SnWUaJyJPNeBmLUZRIvgKrLsJaIsI4StFCzt garIBmGM/mCamb1eY8kbYW0oU4Pv5fQn4UxTAdu/H8zECwbpZuZCYyVIHmrMnLJJKUvbq7FA +Y2MYCccZ9uHhcwgj/3b9ANeFEljfngqoLUUbKCYWYpAFc+E0/NsDo788YhmIlknNOlNA2Ev NL2sqX3NUSsnjV5KQr40YrawP9UlKm06W1wUmAWP6gR5gaEzShNV/rzGInqR5fGatgMdgKFb 76rIIGRpgvx4xorA9W5pbf3GmVirmn6ZFXmZtJ+AsBOszAazsAA+v9T2Mk0MC+7vw6hjdFpo OihgLTrIesf0g8gr8xGO/VQO3kW0aSrY9YrK1Dn2SCY5xWun3cBX5yCpaz5VGEV0r8fPI1Ay RAXADkKahSMvbiq+bD4b9Zxnv4pb/jhHpxK7xmMzRmBZRonaZXKQqGM7t5ExjYgwMtJGJ4yZ eJAN2ApNk6ZJUQSZBFHU/rSn8/x7pX7WxRepEiYuuwc5G/LwRYq+LPsLMDUapqBQsA9ckOw9 zmepj+oW0py2Nq3+wKs/zGMvM/2pCLdW4gPV5Sjq99jqQjGroAUIEJPDgbqyRWjsWa7WtlfI khS/TA8oKwa/UmnCNL6WnWQp3qJvQUdWpxTDvc94wGOzYLb5g+YAi4PSTspQMwrsoo6SCIn0 neNnsj1Hnp/vbuNU3Wf+7yI6zSoNkA9JmYYaSgJZQAM+dXkrcc4iRenZs14DKe/g9nxGDfx6 zOHti4zg/MUl8Fj6kmg1QmZ2XT2/MGPF1NroFWMNo640u9nTIeiY4in0wLH1PQDCbmEVmOL/ 0kOudfLuYjiEqqxvCCKRewMGpSg6PCELCDQjDZTInUxy9i+0yX9JN4NuVmSMG8sa59ZImGxP Cc/rCsLvPdu0G2Wgbibim5bI+Aj1uDeGNvsTZg4hfIeM8EqJGdrEMyDDHN8PlwBcmB2ysnT2 r/BK65A6Er27ow5pAdav89HjdcWKtkWnAs/v6zTwRW9yqa5b3WIU7oDO1bmRrlns/nf+1WFr YcFZpDiJ/BjvArWO3O/zGLuBQpScShT6W7e8KS7idJv0iI5QTp8Wpc9MJsqepB/nrQ9q9okC kqVAxcCoHKm3C2vFOl/Qiw7AF8Zdcol/C1T0O1FFQrA5kXPlq71vfpCKcpvLeJPGS4K5accc sTpsv6oWpxnIgkrMRxEMPERcKQKmMyXuD+z IronPort-HdrOrdr: A9a23:zATn666erD3MrE5NVgPXwMrXdLJyesId70hD6qhwISY6TiX4rb HWoB1173/JYVoqNE3I3OrwXZVoIkmsk6Kdg7NhXotKNTOO0ADDQb2Kr7GSpwEIcxeOkdK1vp 0AT0ERMrLN5CBB/KTH3DU= X-IronPort-AV: E=Sophos;i="5.96,285,1665460800"; d="scan'208";a="93013913" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Doug Goldstein , Stefano Stabellini , Anthony PERARD , Michal Orzel , Oleksii Kurochko Subject: [PATCH 1/6] CI: Drop automation/configs/ Date: Fri, 30 Dec 2022 00:38:43 +0000 Message-ID: <20221230003848.3241-2-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20221230003848.3241-1-andrew.cooper3@citrix.com> References: <20221230003848.3241-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Having 3 extra hypervisor builds on the end of a full build is deeply confusing to debug if one of them fails, because the .config file presented in the artefacts is not the one which caused a build failure. Also, the log tends to be truncated in the UI. PV-only is tested as part of PV-Shim in a full build anyway, so doesn't need repeating. HVM-only and neither will come up frequently in randconfig, so drop all the logic here to simplify things. Signed-off-by: Andrew Cooper Reviewed-by: Michal Orzel Reviewed-by: Stefano Stabellini --- CC: Doug Goldstein CC: Stefano Stabellini CC: Anthony PERARD CC: Michal Orzel CC: Oleksii Kurochko --- automation/configs/x86/hvm_only_config | 3 --- automation/configs/x86/no_hvm_pv_config | 3 --- automation/configs/x86/pv_only_config | 3 --- automation/scripts/build | 21 --------------------- 4 files changed, 30 deletions(-) delete mode 100644 automation/configs/x86/hvm_only_config delete mode 100644 automation/configs/x86/no_hvm_pv_config delete mode 100644 automation/configs/x86/pv_only_config diff --git a/automation/configs/x86/hvm_only_config b/automation/configs/x86/hvm_only_config deleted file mode 100644 index 9efbddd5353b..000000000000 --- a/automation/configs/x86/hvm_only_config +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_HVM=y -# CONFIG_PV is not set -# CONFIG_DEBUG is not set diff --git a/automation/configs/x86/no_hvm_pv_config b/automation/configs/x86/no_hvm_pv_config deleted file mode 100644 index 0bf6a8e46818..000000000000 --- a/automation/configs/x86/no_hvm_pv_config +++ /dev/null @@ -1,3 +0,0 @@ -# CONFIG_HVM is not set -# CONFIG_PV is not set -# CONFIG_DEBUG is not set diff --git a/automation/configs/x86/pv_only_config b/automation/configs/x86/pv_only_config deleted file mode 100644 index e9d8b4a7c753..000000000000 --- a/automation/configs/x86/pv_only_config +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_PV=y -# CONFIG_HVM is not set -# CONFIG_DEBUG is not set diff --git a/automation/scripts/build b/automation/scripts/build index a5934190634b..5dafa72ba540 100755 --- a/automation/scripts/build +++ b/automation/scripts/build @@ -85,24 +85,3 @@ if [[ "${XEN_TARGET_ARCH}" != "x86_32" ]]; then cp -r dist binaries/ fi fi - -if [[ "${hypervisor_only}" == "y" ]]; then - # If we are build testing a specific Kconfig exit now, there's no point in - # testing all the possible configs. - exit 0 -fi - -# Build all the configs we care about -case ${XEN_TARGET_ARCH} in - x86_64) arch=x86 ;; - *) exit 0 ;; -esac - -cfg_dir="automation/configs/${arch}" -for cfg in `ls ${cfg_dir}`; do - echo "Building $cfg" - make -j$(nproc) -C xen clean - rm -f xen/.config - make -C xen KBUILD_DEFCONFIG=../../../../${cfg_dir}/${cfg} defconfig - make -j$(nproc) -C xen -done From patchwork Fri Dec 30 00:38:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 13083989 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 39ED8C5479D for ; Fri, 30 Dec 2022 00:39:21 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.469763.729179 (Exim 4.92) (envelope-from ) id 1pB3QL-0002w0-EX; Fri, 30 Dec 2022 00:39:01 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 469763.729179; Fri, 30 Dec 2022 00:39:01 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pB3QL-0002vU-7e; Fri, 30 Dec 2022 00:39:01 +0000 Received: by outflank-mailman (input) for mailman id 469763; Fri, 30 Dec 2022 00:39:00 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pB3QK-0002si-AO for xen-devel@lists.xenproject.org; Fri, 30 Dec 2022 00:39:00 +0000 Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com [216.71.145.142]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 562fe20d-87da-11ed-91b6-6bf2151ebd3b; Fri, 30 Dec 2022 01:38:56 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 562fe20d-87da-11ed-91b6-6bf2151ebd3b DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1672360736; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=UrorcfN+X/i2NxjKMCMKXsJRYNP4k03KIG8MCGJilaU=; b=AIeGbsk8P8/h3En9R/Pnub3XET9vTCVxR94tzwOPOkqSgqVRWh9n/VQ7 26dGWNQ5EwFrBWQWxZr+i1TFKkv5Tl3VABilRkp5mURt5iOjXgRrcZiPS in/mCsInOP/UXe1qrpr/q0Kj/fNi4NJ54KwdP7QSpAkPcSnJIa9ymaGJY Y=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 90945510 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:6BM59q5Uc0cGsL5qgQETNgxRtPXHchMFZxGqfqrLsTDasY5as4F+v mUYUG+OP/+IY2Pxfd4kPYvk9B8E6sSDyNExGQtr/iFjHi5G8cbLO4+Ufxz6V8+wwm8vb2o8t plDNYOQRCwQZiWBzvt4GuG59RGQ7YnRGvynTraBYnoqLeNdYH9JoQp5nOIkiZJfj9G8Agec0 fv/uMSaM1K+s9JOGjt8B5mr9VU+4pwehBtC5gZkPKoR7QeF/5UoJMl3yZ+ZfiOQrrZ8RoZWd 86bpJml82XQ+QsaC9/Nut4XpWVTH9Y+lSDX4pZnc/DKbipq/0Te4Y5iXBYoUm9Fii3hojxE4 I4lWapc6+seFvakdOw1C3G0GszlVEFM0OevzXOX6aR/w6BaGpdFLjoH4EweZOUlFuhL7W5m/ tMFBWkMUSC6o/uU4Kq0ctVLwc8NI5y+VG8fkikIITDxCP8nRdbIQrnQ5M8e1zA17ixMNa+AP YxDM2MpNUmeJU0UUrsUIMtWcOOAr3/zaTBH7nmSorI6+TP7xw1tyrn9dtHSf7RmQO0ExhfE+ z+fpwwVBDkaae3HwBnazUuTxejUrBvmYK8tE+KBo6sCbFq7mTVIVUx+uUGAify4gU63X5RYM V4Z/gInqKR0/0uuJvH6WxC7u3+F+B0BQd1bE+49wA6Iw6vQpQ2eAwAsXjNHLdArqsIybTgrz UOS2cPkAyR1t7+YQm7b8a2bxRu5MDIZKmIqbiYeQQwIpdLkpekblQnTR9xuFKq0iNzdGjzqx T2O6i8kiN0uYdUjjvvhuwqd2nT1+8aPHlVdChjrsnyN5SxkSdekWLyRzUH5ze5PFLq+CVKvs y1R8ySB19wmAZaInS2LZewCGrC1+vqIWAHhbU5T84oJrGr0pSP6FWxEyHQnfRoybJ5YEdP8S BWL0T698qO/K5dDgUVfR4uqQ/onwqH7fTgOfqCFN4EeCnSdmeLuwc2PWaJy9zq2+KTPuftlU Xt+TSpLJShyNEif5GDqL9rxKJdyrszE+UvdRIrg0zOs2qeEaXieRN8taQXRNLtivPPa8V+Eq L6z0vdmLD0GCoXDjtT/q9ZPfTjm01BgbXwJlyCnXrHaeVc3cI3QI/TQ3akga+RYokihrc+Rp ivVchYBmDLCaYjvdV3ihoZLNOm+Av6SbBsTYUQRALpf8yJyPNvxvf9PLPPav9APrYRe8BK9d NFdE+3oPxiFYm6vF+g1BXUlkLFfSQ== IronPort-HdrOrdr: A9a23:ZR39Nq6jJhsmlfRlbgPXwMbXdLJyesId70hD6qkRc3Bom6mj/P xG88516faZslgssRMb+exoSZPgfZq0z/cci+Qs1NyZLWrbUQWTXeRfxLqn7zr8GzDvss5xvJ 0QF5SW0eeAb2RHsQ== X-IronPort-AV: E=Sophos;i="5.96,285,1665460800"; d="scan'208";a="90945510" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Doug Goldstein , Stefano Stabellini , Anthony PERARD , Michal Orzel , Oleksii Kurochko Subject: [PATCH 2/6] CI: Remove guesswork about which artefacts to preserve Date: Fri, 30 Dec 2022 00:38:44 +0000 Message-ID: <20221230003848.3241-3-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20221230003848.3241-1-andrew.cooper3@citrix.com> References: <20221230003848.3241-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Preserve the artefacts based on the `make` rune we actually ran, rather than guesswork about which rune we would have run based on other settings. Note that the ARM qemu smoke tests depend on finding binaries/xen even from full builds. Also that the Jessie-32 containers build tools but not Xen. This means the x86_32 builds now store relevant artefacts. No change in other configurations. Signed-off-by: Andrew Cooper Reviewed-by: Michal Orzel Reviewed-by: Stefano Stabellini --- CC: Doug Goldstein CC: Stefano Stabellini CC: Anthony PERARD CC: Michal Orzel CC: Oleksii Kurochko --- automation/scripts/build | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/automation/scripts/build b/automation/scripts/build index 5dafa72ba540..8dee1cbbc251 100755 --- a/automation/scripts/build +++ b/automation/scripts/build @@ -70,18 +70,24 @@ if [[ "${CC}" == "gcc" && `cc-ver` -lt 0x040600 ]]; then cfgargs+=("--with-system-seabios=/bin/false") fi +# Directory for the artefacts to be dumped into +mkdir binaries + if [[ "${hypervisor_only}" == "y" ]]; then + # Xen-only build make -j$(nproc) xen + + # Preserve artefacts + cp xen/xen binaries/xen else + # Full build ./configure "${cfgargs[@]}" make -j$(nproc) dist -fi -# Extract artifacts to avoid getting rewritten by customised builds -mkdir binaries -if [[ "${XEN_TARGET_ARCH}" != "x86_32" ]]; then - cp xen/xen binaries/xen - if [[ "${hypervisor_only}" != "y" ]]; then - cp -r dist binaries/ - fi + # Preserve artefacts + # Note: Some smoke tests depending on finding binaries/xen on a full build + # even though dist/ contains everything, while some containers don't even + # build Xen + cp -r dist binaries/ + if [[ -f xen/xen ]] ; then cp xen/xen binaries/xen; fi fi From patchwork Fri Dec 30 00:38:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 13083988 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 33150C53210 for ; Fri, 30 Dec 2022 00:39:21 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.469766.729201 (Exim 4.92) (envelope-from ) id 1pB3QM-0003L0-ME; Fri, 30 Dec 2022 00:39:02 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 469766.729201; Fri, 30 Dec 2022 00:39:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pB3QM-0003Jf-CH; Fri, 30 Dec 2022 00:39:02 +0000 Received: by outflank-mailman (input) for mailman id 469766; Fri, 30 Dec 2022 00:39:01 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pB3QL-0002si-AQ for xen-devel@lists.xenproject.org; Fri, 30 Dec 2022 00:39:01 +0000 Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com [216.71.145.153]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 5876866a-87da-11ed-91b6-6bf2151ebd3b; Fri, 30 Dec 2022 01:38:57 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 5876866a-87da-11ed-91b6-6bf2151ebd3b DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1672360737; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=3uvwBZDagvMzDqVYqDkSVs+tyCn4o/+n0Up/1fWJMJA=; b=RJ3IvMhoOmGh9XVXK50pNezjxw34z9Od4E3VRtlsBIOlBHEE8/qV2ajL Gt5gSsvxKR28g80xlyie807NdVpvjO4sqwQHPrW7WsNnVGHWzRwW7yYyx 1jNqqF6JFoakmAG91+Cd5fpHXsiKuh0aKuI1EEE5d8ciR10Z3tAqfp/7E o=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 90529779 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:0jPNZ6/m/rYZNxCqjT4jDrUDTX6TJUtcMsCJ2f8bNWPcYEJGY0x3z DYYDGnTOamMNmv9eIt0Oom/phgBvJLUnNFmHgNu+Cs8E34SpcT7XtnIdU2Y0wF+jCHgZBk+s 5hBMImowOQcFCK0SsKFa+C5xZVE/fjUAOG6UKucYHsZqTZMEE8JkQhkl/MynrlmiN24BxLlk d7pqojUNUTNNwRcawr40Ire7kIx1BjOkGlA5AZnP6oa5AS2e0Q9V/rzG4ngdxMUfaEMdgKKb 76r5K20+Grf4yAsBruN+losWhRXKlJ6FVHmZkt+A8BOsDAbzsAB+v9T2M4nQVVWk120c+VZk 72hg3ASpTABZcUgkMxFO/VR/roX0aduoNcrKlDn2SCfItGvn9IBDJyCAWlvVbD09NqbDkkS/ /gBDT1cXyuhhuGM3beeZLh015sseZyD0IM34hmMzBncBPciB5vCX7/L9ZlT2zJYasJmRKiEI ZBDMHw2MUqGM0Yn1lQ/UfrSmM+BgHXlfiIeg1WSvactuEDYzRBr0airO93QEjCPbZQNwxzJ+ T2Xl4j/Khs6O+KR6iSCznmDpf7Bhz72ca0bSoTto5aGh3XMnzdOWXX6T2CTpPiyike6HdVFO UEQ0iMroe4580nDZt75Uh6joX/CvQMGXNFQEOoS5wSEy66S6AGcbkAUQzgEZNE4ucseQT0xy kTPj97vHSZosrCeVTSa7Lj8hTi7IyQSIEcJbDUISgZD6N7myKkolQ7GRNtnFK+zj/X2FCv2z jTMqzIx74j/luZSif/9pwqexWvx+N6ZFWbZ+zk7QEr55AdgQYP0VreK6Fvh8PNlAteBHwaO6 S1sd9el0MgCCpSElSqoSeoLHa206/vtDAAwkWKDDLF6qW3zpifLkZR4pWgneRw3appslSrBO he7hO9H2HNE0JJGh4dTapn5NcklxLOI+T/NBqGNNYomjnScmWa6EMBSiay4hTuFfKsEy/tX1 XKnnSGEUx4n5VxPlmbeegvk+eZDKtoC7W3SX4vn6B+szKCTYnWYIZ9cbgTUNbtpvP3V+lSOm zq6Cydt40wFONASnwGNqdJDRbz0BSNT6W/KRzx/KbfYf1sO9JAJAP7N27IxE7FYc1Buvr6Qp BmVAxYIoGcTcFWbcW1mnFg/MuKwNXu+xFpnVRER0aGAgSl+PNj+tPdEH3b1FJF+nNFeITdPZ 6FtU6297j5nE1wrJxx1gUHBkbFf IronPort-HdrOrdr: A9a23:TZcQsqpl7CA6urnqftXFdEIaV5oleYIsimQD101hICG9E/b1qy nKpp8mPHDP5wr5NEtPpTnjAsm9qALnlKKdiLN5Vd3OYOCMghrKEGgN1/qG/xTQXwH46+5Bxe NBXsFFebnN5IFB/KTH3DU= X-IronPort-AV: E=Sophos;i="5.96,285,1665460800"; d="scan'208";a="90529779" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Doug Goldstein , Stefano Stabellini , Anthony PERARD , Michal Orzel , Oleksii Kurochko Subject: [PATCH 3/6] CI: Only calculate ./configure args if needed Date: Fri, 30 Dec 2022 00:38:45 +0000 Message-ID: <20221230003848.3241-4-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20221230003848.3241-1-andrew.cooper3@citrix.com> References: <20221230003848.3241-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 This is purely code motion of the cfgargs construction, into the case where it is used. No practical change. Signed-off-by: Andrew Cooper Reviewed-by: Michal Orzel Reviewed-by: Stefano Stabellini --- CC: Doug Goldstein CC: Stefano Stabellini CC: Anthony PERARD CC: Michal Orzel CC: Oleksii Kurochko --- automation/scripts/build | 63 ++++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/automation/scripts/build b/automation/scripts/build index 8dee1cbbc251..f2301d08789d 100755 --- a/automation/scripts/build +++ b/automation/scripts/build @@ -39,37 +39,6 @@ if [[ "${XEN_TARGET_ARCH}" = "arm32" ]]; then hypervisor_only="y" fi -# build up our configure options -cfgargs=() -cfgargs+=("--enable-docs") - -if [[ "${CC}" == "clang"* ]]; then - # SeaBIOS cannot be built with clang - cfgargs+=("--with-system-seabios=/usr/share/seabios/bios.bin") - # iPXE cannot be built with clang - cfgargs+=("--with-system-ipxe=/usr/lib/ipxe/ipxe.pxe") - # newlib cannot be built with clang so we cannot build stubdoms - cfgargs+=("--disable-stubdom") -fi - -if ! test -z "$(ldd /bin/ls|grep musl|head -1)"; then - # disable --disable-werror for QEMUU when building with MUSL - cfgargs+=("--with-extra-qemuu-configure-args=\"--disable-werror\"") - # SeaBIOS doesn't build on MUSL systems - cfgargs+=("--with-system-seabios=/bin/false") -fi - -# Qemu requires Python 3.5 or later, and ninja -if ! type python3 || python3 -c "import sys; res = sys.version_info < (3, 5); exit(not(res))" \ - || ! type ninja; then - cfgargs+=("--with-system-qemu=/bin/false") -fi - -# SeaBIOS requires GCC 4.6 or later -if [[ "${CC}" == "gcc" && `cc-ver` -lt 0x040600 ]]; then - cfgargs+=("--with-system-seabios=/bin/false") -fi - # Directory for the artefacts to be dumped into mkdir binaries @@ -80,7 +49,37 @@ if [[ "${hypervisor_only}" == "y" ]]; then # Preserve artefacts cp xen/xen binaries/xen else - # Full build + # Full build. Figure out our ./configure options + cfgargs=() + cfgargs+=("--enable-docs") + + if [[ "${CC}" == "clang"* ]]; then + # SeaBIOS cannot be built with clang + cfgargs+=("--with-system-seabios=/usr/share/seabios/bios.bin") + # iPXE cannot be built with clang + cfgargs+=("--with-system-ipxe=/usr/lib/ipxe/ipxe.pxe") + # newlib cannot be built with clang so we cannot build stubdoms + cfgargs+=("--disable-stubdom") + fi + + if ! test -z "$(ldd /bin/ls|grep musl|head -1)"; then + # disable --disable-werror for QEMUU when building with MUSL + cfgargs+=("--with-extra-qemuu-configure-args=\"--disable-werror\"") + # SeaBIOS doesn't build on MUSL systems + cfgargs+=("--with-system-seabios=/bin/false") + fi + + # Qemu requires Python 3.5 or later, and ninja + if ! type python3 || python3 -c "import sys; res = sys.version_info < (3, 5); exit(not(res))" \ + || ! type ninja; then + cfgargs+=("--with-system-qemu=/bin/false") + fi + + # SeaBIOS requires GCC 4.6 or later + if [[ "${CC}" == "gcc" && `cc-ver` -lt 0x040600 ]]; then + cfgargs+=("--with-system-seabios=/bin/false") + fi + ./configure "${cfgargs[@]}" make -j$(nproc) dist From patchwork Fri Dec 30 00:38:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 13083985 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CCC7BC3DA7A for ; Fri, 30 Dec 2022 00:39:20 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.469764.729184 (Exim 4.92) (envelope-from ) id 1pB3QL-00030h-NA; Fri, 30 Dec 2022 00:39:01 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 469764.729184; Fri, 30 Dec 2022 00:39:01 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pB3QL-0002z3-H2; Fri, 30 Dec 2022 00:39:01 +0000 Received: by outflank-mailman (input) for mailman id 469764; Fri, 30 Dec 2022 00:39:00 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pB3QK-0002sj-7N for xen-devel@lists.xenproject.org; Fri, 30 Dec 2022 00:39:00 +0000 Received: from esa5.hc3370-68.iphmx.com (esa5.hc3370-68.iphmx.com [216.71.155.168]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 56aa338d-87da-11ed-8fd4-01056ac49cbb; Fri, 30 Dec 2022 01:38:56 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 56aa338d-87da-11ed-8fd4-01056ac49cbb DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1672360736; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=/JrA1G1Iz+UOsLcqQHfI+gI6VWbapffSwB8uk3ns4wY=; b=IfaRiEz9dF/5dtTtpHtLlQR/mrDf4oT3dXXpFMDhdd1JpEdr8zritt5Z KWQpts5e2jCnZgjiA4cYrd5yktRvaadhV2cf/OAGejG/K884qVJ/LFwEZ b2GccBCeILUnqaIpghiNFHXuLj4e7uBQhfOksKu7qZWoddXonRxTbEdPU 8=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 89488867 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:btm2CK+fsJfu4HD5LxeiDrUDTX6TJUtcMsCJ2f8bNWPcYEJGY0x3n TZJWGvVPfrZNmr1KtpzPdvi9EgHuJaAmtFjTldv/Cs8E34SpcT7XtnIdU2Y0wF+jCHgZBk+s 5hBMImowOQcFCK0SsKFa+C5xZVE/fjUAOG6UKucYHsZqTZMEE8JkQhkl/MynrlmiN24BxLlk d7pqojUNUTNNwRcawr40Ire7kIx1BjOkGlA5AZnP6oa5AS2e0Q9V/rzG4ngdxMUfaEMdgKKb 76r5K20+Grf4yAsBruN+losWhRXKlJ6FVHmZkt+A8BOsDAbzsAB+v9T2M4nQVVWk120c+VZk 72hg3ASpTABZcUgkMxFO/VR/roX0aduoNcrKlDn2SCfItGvn9IBDJyCAWlvVbD09NqbDklu2 PI7IR1WaCucvPzqxZiZFuJLmcMseZyD0IM34hmMzBncBPciB5vCX7/L9ZlT2zJYasJmRKiEI ZBDMHw2MUqGM0Yn1lQ/UfrSmM+BgHXlfiIeg1WSvactuEDYzRBr0airO93QEjCPbZUEwhbI9 jyZl4j/KggWaeSj7wvYyW6ThOLsniamVt0yPbLto5aGh3XMnzdOWXX6T2CTpPiyike6HdVFO UEQ0iMroe4580nDZt75Uh6joX/CvQMGXNFQEOoS5wSEy66S6AGcbkAUQzgEZNE4ucseQT0xy kTPj97vHSZosrCeVTSa7Lj8hTi7IyQSIEcJbDUISgZD6N7myKkolQ7GRNtnFK+zj/X2FCv2z jTMqzIx74j/luZSif/9pwqexWvx+N6ZFWbZ+zk7QEqFww1abaP+Ybe30kaH6NxicI2+UV6O6 S1sd9el0MgCCpSElSqoSeoLHa206/vtDAAwkWKDDLF6qW3zpifLkZR4pWgneRw3appslSrBO he7hO9H2HNE0JJGh4dTapn5NcklxLOI+T/NBqGNNYomjnScmWa6EMBSiay4hTuFfKsEy/tX1 XKnnSGEUx4n5VxPlmbeegvk+eZDKtoC7W3SX4vn6B+szKCTYnWYIZ9cbgTUNbtpvP3V+lSOm zq6Cydt40wFONASnwGNqdJDRbz0BSNT6W/KRzx/KbfYf1sO9JAJAP7N27IxE7FYc1Buvr6Qp BmVAxYIoGcTcFWbcW1mnFg/MuKwNXu+xFpnVRER0aGAgSl+PNj+tPdEH3b1FJF+nNFeITdPZ 6FtU6297j5nE1wrJxx1gUHBkbFf IronPort-HdrOrdr: A9a23:B7UAIqs8whK6NebbrNsU00Y+7skDZ9V00zEX/kB9WHVpm62j+v xG+c5xvyMc5wxhO03I5urwWpVoLUmzyXcX2+Us1NWZPDUO0VHARL2KhrGM/9SPIUzDH+dmpM JdT5Q= X-IronPort-AV: E=Sophos;i="5.96,285,1665460800"; d="scan'208";a="89488867" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Doug Goldstein , Stefano Stabellini , Anthony PERARD , Michal Orzel , Oleksii Kurochko Subject: [PATCH 4/6] CI: Express HYPERVISOR_ONLY in build.yml Date: Fri, 30 Dec 2022 00:38:46 +0000 Message-ID: <20221230003848.3241-5-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20221230003848.3241-1-andrew.cooper3@citrix.com> References: <20221230003848.3241-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Whether to build only Xen, or everything, is a property of container, toolchain and/or testcase. It is not a property of XEN_TARGET_ARCH. Capitalise HYPERVISOR_ONLY and have it set by the debian-unstable-gcc-arm32-* testcases at the point that arm32 get matched with a container that can only build Xen. For simplicity, retain the RANDCONFIG -> HYPERVISOR_ONLY implication. Signed-off-by: Andrew Cooper Reviewed-by: Michal Orzel --- CC: Doug Goldstein CC: Stefano Stabellini CC: Anthony PERARD CC: Michal Orzel CC: Oleksii Kurochko --- automation/gitlab-ci/build.yaml | 2 ++ automation/scripts/build | 11 ++++------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml index 93d9ff69a9f2..e6a9357de3ef 100644 --- a/automation/gitlab-ci/build.yaml +++ b/automation/gitlab-ci/build.yaml @@ -516,11 +516,13 @@ debian-unstable-gcc-arm32: extends: .gcc-arm32-cross-build variables: CONTAINER: debian:unstable-arm32-gcc + HYPERVISOR_ONLY: y debian-unstable-gcc-arm32-debug: extends: .gcc-arm32-cross-build-debug variables: CONTAINER: debian:unstable-arm32-gcc + HYPERVISOR_ONLY: y debian-unstable-gcc-arm32-randconfig: extends: .gcc-arm32-cross-build diff --git a/automation/scripts/build b/automation/scripts/build index f2301d08789d..4c6d1f3b70bc 100755 --- a/automation/scripts/build +++ b/automation/scripts/build @@ -19,7 +19,9 @@ if [[ "${RANDCONFIG}" == "y" ]]; then fi make -j$(nproc) -C xen KCONFIG_ALLCONFIG=tools/kconfig/allrandom.config randconfig - hypervisor_only="y" + + # RANDCONFIG implies HYPERVISOR_ONLY + HYPERVISOR_ONLY="y" else echo "CONFIG_DEBUG=${debug}" > xen/.config @@ -34,15 +36,10 @@ fi # to exit early -- bash is invoked with -e. cp xen/.config xen-config -# arm32 only cross-compiles the hypervisor -if [[ "${XEN_TARGET_ARCH}" = "arm32" ]]; then - hypervisor_only="y" -fi - # Directory for the artefacts to be dumped into mkdir binaries -if [[ "${hypervisor_only}" == "y" ]]; then +if [[ "${HYPERVISOR_ONLY}" == "y" ]]; then # Xen-only build make -j$(nproc) xen From patchwork Fri Dec 30 00:38:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 13083986 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EB968C3DA79 for ; Fri, 30 Dec 2022 00:39:20 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.469765.729195 (Exim 4.92) (envelope-from ) id 1pB3QM-0003C6-Az; Fri, 30 Dec 2022 00:39:02 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 469765.729195; Fri, 30 Dec 2022 00:39:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pB3QL-0003BF-Vk; Fri, 30 Dec 2022 00:39:01 +0000 Received: by outflank-mailman (input) for mailman id 469765; Fri, 30 Dec 2022 00:39:00 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pB3QK-0002si-OW for xen-devel@lists.xenproject.org; Fri, 30 Dec 2022 00:39:00 +0000 Received: from esa6.hc3370-68.iphmx.com (esa6.hc3370-68.iphmx.com [216.71.155.175]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 56e116d6-87da-11ed-91b6-6bf2151ebd3b; Fri, 30 Dec 2022 01:38:56 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 56e116d6-87da-11ed-91b6-6bf2151ebd3b DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1672360736; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=VB66xEr6Tey5l6eg89k3VvaKnsgW9wbDO6YnR8fWeZo=; b=TkRbML7LkYEnXGLKnewbTZoONxncHFJIi7zcgmqt8IeLzbKKlNXnJLxA wuRGchchwj6rvqmtkFYnLmUh2tbraFFXBme7T+dGSJosLBYk6T7i8MmGx bEWJhIY+C8g+cThULjuZ5ZGMtAiC9sikaiNiGqKI1na9BhbnWdtq/HdsP 0=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 90033202 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:m51u/a357TjtsQUWHfbD5Qdxkn2cJEfYwER7XKvMYLTBsI5bpzYBz WpKUGrVbvrcZzP0Ko8lPou19UxTvpbdytBnS1Y9pC1hF35El5HIVI+TRqvS04F+DeWYFR46s J9OAjXkBJppJpMJjk71atANlVEliefTAOK5ULSfUsxIbVcMYD87jh5+kPIOjIdtgNyoayuAo tq3qMDEULOf82cc3lk8tuTS9nuDgNyo4GlC5wZkNKgQ1LPjvyJ94Kw3dPnZw0TQGuG4LsbiL 87fwbew+H/u/htFIrtJRZ6iLyXm6paLVeS/oiI+t5qK23CulQRrukoPD9IOaF8/ttm8t4sZJ OOhF3CHYVxB0qXkwIzxWvTDes10FfUuFLTveRBTvSEPpqFvnrSFL/hGVSkL0YMkFulfH010r aYqMy0xbCuRhOH1kb2edfBgv5F2RCXrFNt3VnBIyDjYCbAtQIzZQrWM7thdtNsyrpkQR7CEP ZNfMGcxKkSbC/FMEg5/5JYWteGknHTgNRZfr0qYv/Ef6GnP1g1hlrPqNbI5f/TbHZ0OxRzA/ Aoq+UzGEDNAH8KyjgHdsUi0muiQ3iPfSLArQejQGvlC3wTImz175ActfV66qvmwjgi5QcBSL 2Qd/yZopq83nGSsStT+RBy55n2ZpBkXW9lXO+I/4QCJjKHT5m6xFmUCCzJMdtEinMs3XiAxk E+EmcvzAj5iu6HTTmiSnp+fpCm+PiU9JmYYaSgJCwAC5rHLu5ovhxjCStJiFq+djdDvHzz0h TeQo0ADa6471JBRkf/hpBae3mzq9sOhohMJChv/QE6ftllLf5OZZbe66luYvPllE5+VdwzU1 JQboPS24OcLBJCLsSWCRuQRAb2kj8q43C3gbU1HRMd4qWn0k5K3VcUJuWwleh81WioRUWWxC HI/rz+983O60JGCSaZsK7y8BM0xpUQLPYS0D6uEBjaij3UYSeNmwM2MTRTLt4wOuBJ2+U3aB Xt8WZjEMJriIf47pAdavds1374x3TwZzmjOX539xBnP+ePAOyTOEudVbgrUP7tRAEa4TOL9q ow3Cid3408HDL2Wjtf/qub/0mzm3VBkXMur+qS7h8aIIxZ8GXFJNsI9NYgJItQ/94wMz7egw 51IchMAoHLlm2b9IBmHAlg6LuuHsWBX8ShqYkTB/D+AhxAeXGpYxP1OKsZpLOF3r4SOD5dcF pE4RilJOdwXIhyvxtjXRcCVQFBKHPhzuT+zAg== IronPort-HdrOrdr: A9a23:LEBoLa3k6H1BEqxEg7juOAqjBLwkLtp133Aq2lEZdPU1SKClfq WV98jzuiWatN98Yh8dcLK7WJVoMEm8yXcd2+B4V9qftWLdyQiVxe9ZnO7f6gylNyri9vNMkY dMGpIObOEY1GIK7/rH3A== X-IronPort-AV: E=Sophos;i="5.96,285,1665460800"; d="scan'208";a="90033202" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Doug Goldstein , Stefano Stabellini , Anthony PERARD , Michal Orzel , Oleksii Kurochko Subject: [PATCH 5/6] CI: Fix build script when CROSS_COMPILE is in use Date: Fri, 30 Dec 2022 00:38:47 +0000 Message-ID: <20221230003848.3241-6-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20221230003848.3241-1-andrew.cooper3@citrix.com> References: <20221230003848.3241-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Some testcases use a cross compiler. Presently it's only arm32 and due to previous cleanup the only thing which is now wrong is printing the compiler version at the start of day. Construct $cc to match what `make` will eventually choose given CROSS_COMPILE, taking care not to modify $CC. Use $cc throughout the rest of the script. Also correct the compiler detection logic. Plain "gcc" was wrong, and "clang"* was a bodge highlighting the issue, but neither survive the CROSS_COMPILE correction. Instead, construct cc_is_{gcc,clang} booleans like we do elsewhere in the build system, by querying the --version text for gcc or clang. While making this change, adjust cc_ver to be calculated once at the same time as cc_is_* are calculated. Signed-off-by: Andrew Cooper Reviewed-by: Stefano Stabellini --- CC: Doug Goldstein CC: Stefano Stabellini CC: Anthony PERARD CC: Michal Orzel CC: Oleksii Kurochko --- automation/scripts/build | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/automation/scripts/build b/automation/scripts/build index 4c6d1f3b70bc..206312ecc7d0 100755 --- a/automation/scripts/build +++ b/automation/scripts/build @@ -2,13 +2,12 @@ test -f /etc/os-release && cat "$_" -$CC --version +# Construct $cc such that it matches what `make` will chose when taking +# CROSS_COMPILE into account. Do not modify $CC directly, as that will cause +# `make` to double-account CROSS_COMPILE. +cc="${CROSS_COMPILE}${CC}" -# Express the compiler version as an integer. e.g. GCC 4.9.2 => 0x040902 -cc-ver() -{ - $CC -dumpversion | awk -F. '{ printf "0x%02x%02x%02x", $1, $2, $3 }' -} +$cc --version # random config or default config if [[ "${RANDCONFIG}" == "y" ]]; then @@ -50,7 +49,14 @@ else cfgargs=() cfgargs+=("--enable-docs") - if [[ "${CC}" == "clang"* ]]; then + # booleans for which compiler is in use + cc_is_gcc="$($cc --version | grep -q gcc && echo "y" || :)" + cc_is_clang="$($cc --version | grep -q clang && echo "y" || :)" + + # The compiler version as an integer. e.g. GCC 4.9.2 => 0x040902 + cc_ver="$($cc -dumpversion | awk -F. '{ printf "0x%02x%02x%02x", $1, $2, $3 }')" + + if [[ "${cc_is_clang}" == "y" ]]; then # SeaBIOS cannot be built with clang cfgargs+=("--with-system-seabios=/usr/share/seabios/bios.bin") # iPXE cannot be built with clang @@ -73,7 +79,7 @@ else fi # SeaBIOS requires GCC 4.6 or later - if [[ "${CC}" == "gcc" && `cc-ver` -lt 0x040600 ]]; then + if [[ "${cc_is_gcc}" == "y" && "${cc_ver}" -lt 0x040600 ]]; then cfgargs+=("--with-system-seabios=/bin/false") fi From patchwork Fri Dec 30 00:38:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 13083990 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E53BAC54E76 for ; Fri, 30 Dec 2022 00:39:21 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.469767.729225 (Exim 4.92) (envelope-from ) id 1pB3QO-0003wo-5V; Fri, 30 Dec 2022 00:39:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 469767.729225; Fri, 30 Dec 2022 00:39:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pB3QN-0003vp-UZ; Fri, 30 Dec 2022 00:39:03 +0000 Received: by outflank-mailman (input) for mailman id 469767; Fri, 30 Dec 2022 00:39:02 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pB3QM-0002si-Aa for xen-devel@lists.xenproject.org; Fri, 30 Dec 2022 00:39:02 +0000 Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com [216.71.145.153]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 5928b429-87da-11ed-91b6-6bf2151ebd3b; Fri, 30 Dec 2022 01:38:59 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 5928b429-87da-11ed-91b6-6bf2151ebd3b DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1672360738; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=6ChiBmSNHgKbogktQk+KonGj57CWHhflhgZJDwsSg2o=; b=fDWV09SJAXQmiUEfbcxAoWGKkLduDFgHLo3OfknqyW2bm8+AX2/7pT+x EdFerQhxwLAMsqoxdpsdoalgzKmNttXD4SyK38Mg3ymyH+hGtkfxYVahE p2JfkeiopOsAL8CwNskz8UJ6kQlPf64jaAYI+9mik3Y8zYTFCUpgj7r0n M=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 90529782 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:uMcI2K5QRpgW4/pm6gvCBgxRtPXHchMFZxGqfqrLsTDasY5as4F+v mIcUGyDPf6KMWGgLtxza9i09RlT6sfTyN5nSANoqy4xHi5G8cbLO4+Ufxz6V8+wwm8vb2o8t plDNYOQRCwQZiWBzvt4GuG59RGQ7YnRGvynTraBYnoqLeNdYH9JoQp5nOIkiZJfj9G8Agec0 fv/uMSaM1K+s9JOGjt8B5mr9VU+4pwehBtC5gZkPKoR7QeF/5UoJMl3yZ+ZfiOQrrZ8RoZWd 86bpJml82XQ+QsaC9/Nut4XpWVTH9Y+lSDX4pZnc/DKbipq/0Te4Y5iXBYoUm9Fii3hojxE4 I4lWapc6+seFvakdOw1C3G0GszlVEFM0OevzXOX6aR/w6BaGpdFLjoH4EweZOUlFuhL7W5m/ 9YcCT8TXkG6jeuG/5Tqe65SgsICM5y+VG8fkikIITDxCP8nRdbIQrnQ5M8e1zA17ixMNa+AP YxDM2MpNUmeJU0UUrsUIMtWcOOAr3/zaTBH7nmSorI6+TP7xw1tyrn9dtHSf7RmQO0ExhvC9 z2WpQwVBDk3H4CZk2ClqU6MuevkpynjUosMSOKRo6sCbFq7mTVIVUx+uUGAify4gU63X5RYM V4Z/gInqKR0/0uuJvH6WxC7u3+F+B0BQd1bE+49wA6Iw6vQpQ2eAwAsXjNHLdArqsIybTgrz UOS2cPkAyR1t7+YQm7b8a2bxRu5MDIZKmIqbiYeQQwIpdLkpekblQnTR9xuFKq0iNzdGjzqx T2O6i8kiN0uYdUjjvvhuwqd2nT1+8aPHlVdChjrsnyN5Cl9RYG7V92R41Hr0tARHcGnSl+go y1R8ySB19wmAZaInS2LZewCGrC1+vqIWAHhbU5T84oJrGr0pSP6FWxEyHQnfRoybJ5YEdP8S BWL0T698qO/K5dDgUVfR4uqQ/onwqH7fTgOfqCFN4EeCnSdmeLuwc2PWaJy9zq2+KTPuftlU Xt+TSpLJShyNEif5GDqL9rxKJdyrszE+UvdRIrg0zOs2qeEaXieRN8taQXRNLtivPPa8V+Eq L6z0vdmLD0GCoXDjtT/q9ZPfTjm01BgbXwJlyCnXrHaeVc3cI3QI/TQ3akga+RYokihrc+Rp ivVchYBmDLCaYjvdV3ihoZLNOm+Av6SbBsTYUQRALpf8yJyPNvxvf9PLPPav9APrYRe8BK9d NFdE+3oPxiFYm+vF+g1BXUlkLFfSQ== IronPort-HdrOrdr: A9a23:AH0k6KElWSnR5vf7pLqE5seALOsnbusQ8zAXPiFKJSC9F/byqy nAppsmPHPP5gr5OktBpTnwAsi9qBrnnPYejLX5Vo3SPzUO1lHYSb1K3M/PxCDhBj271sM179 YFT0GmMqyTMWRH X-IronPort-AV: E=Sophos;i="5.96,285,1665460800"; d="scan'208";a="90529782" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Doug Goldstein , Stefano Stabellini , Anthony PERARD , Michal Orzel , Oleksii Kurochko Subject: [PATCH 6/6] CI: Simplify the MUSL check Date: Fri, 30 Dec 2022 00:38:48 +0000 Message-ID: <20221230003848.3241-7-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20221230003848.3241-1-andrew.cooper3@citrix.com> References: <20221230003848.3241-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 There's no need to do ad-hoc string parsing. Use grep -q instead. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Stefano Stabellini --- CC: Doug Goldstein CC: Stefano Stabellini CC: Anthony PERARD CC: Michal Orzel CC: Oleksii Kurochko --- automation/scripts/build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automation/scripts/build b/automation/scripts/build index 206312ecc7d0..f2f5e55bc04f 100755 --- a/automation/scripts/build +++ b/automation/scripts/build @@ -65,7 +65,7 @@ else cfgargs+=("--disable-stubdom") fi - if ! test -z "$(ldd /bin/ls|grep musl|head -1)"; then + if ldd /bin/ls | grep -q musl; then # disable --disable-werror for QEMUU when building with MUSL cfgargs+=("--with-extra-qemuu-configure-args=\"--disable-werror\"") # SeaBIOS doesn't build on MUSL systems