From patchwork Thu Oct 24 10:04:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javi Merino X-Patchwork-Id: 13848692 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 1B411CFA457 for ; Thu, 24 Oct 2024 10:04:55 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.825103.1239346 (Exim 4.92) (envelope-from ) id 1t3uhw-0006wB-9H; Thu, 24 Oct 2024 10:04:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 825103.1239346; Thu, 24 Oct 2024 10:04:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t3uhw-0006vv-5Z; Thu, 24 Oct 2024 10:04:44 +0000 Received: by outflank-mailman (input) for mailman id 825103; Thu, 24 Oct 2024 10:04:41 +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 1t3uht-0005hp-BS for xen-devel@lists.xenproject.org; Thu, 24 Oct 2024 10:04:41 +0000 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [2a00:1450:4864:20::136]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 61c814fe-91ef-11ef-99a3-01e77a169b0f; Thu, 24 Oct 2024 12:04:39 +0200 (CEST) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-539ee1acb86so800338e87.0 for ; Thu, 24 Oct 2024 03:04:39 -0700 (PDT) Received: from localhost.localdomain ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cb66c72866sm5482506a12.95.2024.10.24.03.04.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2024 03:04:38 -0700 (PDT) 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: 61c814fe-91ef-11ef-99a3-01e77a169b0f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.com; s=cloud; t=1729764279; x=1730369079; darn=lists.xenproject.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=pcIExxCBgl8rLcW0jJPs5XFDwtrNHzge9tk1pTltCDM=; b=ZTIL3peis0GHN2Yz6R0KDc5EhRSbV91sMTQiNDTcQXjkKo+lJMvlYcDrX/bwPj+/RA tn938GBMkFOoS1j5eO+5Sr3uSS5b+nH2cB11fpMGZWtHVfjQaRmASe3xaGnUuegiR8C/ wWA72KoGmxvqLuTNXNcFOfqWOSVzQpLqpHZnk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729764279; x=1730369079; 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=pcIExxCBgl8rLcW0jJPs5XFDwtrNHzge9tk1pTltCDM=; b=QqCk46VZEIb6mUcDbePOtFd2rBw9Xl47rEqRARyyVVpjEq/dPyOuGYNe9rxd5eryaU uFaXyHK/oXMOZeQcqp02mlv5SfIoa6ENMc/NOQnnKQJYGpw8/6XLbYYEe2DHf/Zcg9W5 ehKOhyc2ej/zYK+wNHd0YEKhNR1FJf+VyoCFhxYRCuo90/orq0TYnI4u3lpcUTYB5KFf S5GC0hZIDncee25TGMCsBazZcAJzpmj2Mmr6aXkGgBpDPqfGsSbAwTi+nvjXtBp9glO1 z8e4ycOPwslrX7VXD1Ne2pN1+tZAItnuVb3cAFlZG+WWOg48cVrhVYIrvOEjwWI9GZA8 CEkA== X-Gm-Message-State: AOJu0YyygXLr9JNt8vi0lLY9jVX5hzVzqMRJ4gqOmZ0yKYjmm5vjOERH eNt9TIOTTWy+HzuiVWhFAjxyg2M8FY+OOI3LZYBnBazD8YowVprQfulEmNhSlC0B5wJtJGZAwr+ +uWU= X-Google-Smtp-Source: AGHT+IHQijJSkYV+57Obt0d79pCzGC1jykeNC/JeuQYqLbS7uBPgBSPhvEinZde7rrhzZq+N3C0KQA== X-Received: by 2002:a05:6512:104a:b0:530:aa09:b6bf with SMTP id 2adb3069b0e04-53b1a303108mr3646425e87.24.1729764278793; Thu, 24 Oct 2024 03:04:38 -0700 (PDT) From: Javi Merino To: xen-devel@lists.xenproject.org Cc: Javi Merino , Doug Goldstein , Stefano Stabellini , Michal Orzel Subject: [XEN PATCH v1 5/6] CI: Refresh the Debian 12 cppcheck container Date: Thu, 24 Oct 2024 11:04:20 +0100 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: MIME-Version: 1.0 Rework the container to build and run cppcheck as a normal user. Use heredocs for readability and use apt-get --no-install-recommends to keep the size down. Changed the libpcre3-dev dependency to libpcre3, as the -dev package is only needed for building, not for running. With the cleanups, the size of the container is reduced from 882MB to 782MB. Signed-off-by: Javi Merino Reviewed-by: Stefano Stabellini --- I tried updating cppcheck to the latest upstream version (2.15.0) but it reports misra errors like: xen/common/sched/cpupool.c(0,0):internalError:error:Bailing out from analysis: Checking file failed: Failed to execute addon 'misra' - exitcode is 1 [...] xen/arch/arm/decode.c(220,10):misra-config:error:Because of missing configuration, misra checking is incomplete. There can be false negatives! Variable 'type' is unknown The output log xen-cppcheck.txt from job #8164274901 which uses cppcheck 2.15.0 can be found at: https://gitlab.com/xen-project/people/javimerino/xen/-/jobs/8164274901/artifacts/browse Therefore, I'm keeping cppcheck at 2.7, which aligns with what docs/misra/cppcheck.txt says is the last tested version. .../debian/12-arm64v8-cppcheck.dockerfile | 80 +++++++++++++++++++ .../build/debian/bookworm-cppcheck.dockerfile | 54 ------------- automation/gitlab-ci/build.yaml | 12 +-- automation/scripts/containerize | 2 +- 4 files changed, 87 insertions(+), 61 deletions(-) create mode 100644 automation/build/debian/12-arm64v8-cppcheck.dockerfile delete mode 100644 automation/build/debian/bookworm-cppcheck.dockerfile diff --git a/automation/build/debian/12-arm64v8-cppcheck.dockerfile b/automation/build/debian/12-arm64v8-cppcheck.dockerfile new file mode 100644 index 000000000000..a839d4c57bda --- /dev/null +++ b/automation/build/debian/12-arm64v8-cppcheck.dockerfile @@ -0,0 +1,80 @@ +# syntax=docker/dockerfile:1 +FROM --platform=linux/arm64/v8 debian:bookworm AS builder + +ENV DEBIAN_FRONTEND=noninteractive +ENV CPPCHECK_VERSION=2.7 + +# dependencies for cppcheck build +RUN <