Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A4E7C4743D for ; Fri, 4 Jun 2021 19:03:04 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 714F76140C for ; Fri, 4 Jun 2021 19:03:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 714F76140C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 573B582F04; Fri, 4 Jun 2021 21:02:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="E8LUPLUJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 36EB982EC9; Fri, 4 Jun 2021 21:02:46 +0200 (CEST) Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 25B1082EBC for ; Fri, 4 Jun 2021 21:02:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=alpernebiyasak@gmail.com Received: by mail-ed1-x532.google.com with SMTP id u24so12279792edy.11 for ; Fri, 04 Jun 2021 12:02:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SJYMaNlGvargRrm3OMkeJ+38QsvenMgb59sRdjb5EGo=; b=E8LUPLUJcd9Kv9bdCFenqLeAgPBxrQSF/S2XKyrBe+v0D8Q8jjMG25wxLzVT7GiMeZ C0CcUjlxBvb5C/pwrHGZKDqfaqGX9cXzuMs2gIJWlnS36r9Ur67U/bXchckwPeh3RHih x7E8Z+aBh/X1LehhV6qIPceJNSmLeXldRLy0VBXgXvRWUM6l20NSyLwX1/hgwj2+DJbz 1x6TBJpcLtkc0Yqyb7LtDc0OagylF1rn1xqyvVA9/SgSTGaFl8LXjfVPdscESP6Bg5lS QIZj0SG3BoM84bp1txnGFZy5D9aQDA3c474elzTUa498EVmrZwIKAM2U9A4EZm5G5WCq H+bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SJYMaNlGvargRrm3OMkeJ+38QsvenMgb59sRdjb5EGo=; b=Ovz6HI1VsoACM+r7V5om0M/M5LOT9OdZJxKWfTATlw7bogt7AGI26uRch1j9b1WaPw Ebi2nigy7glxq6TW5wAJZUMRiRDgxap+Udm3augejz7zIESE6CctCkiDbmtxeQ6iQuFT cLjNs6OozZX+eaQ3NAO9FGbVdxhOSWUU1L/XwoL5plb5GrLIe6HLToVCC92lQK7WTh/r pRl5vD6wHGczl23PIfYSv9PXc6mWLE2X+btZDmvbA+I89atl+WdHqoACvSa49bU2P3hC C9j5NzGCv7ldKgoeDWulXFNUYIrXF0ljI4NFa3ilxmxipAQAyHyZ8vC53n0wsQa+DXIZ IlDg== X-Gm-Message-State: AOAM533v2hnThcLXNvvrzECL1xrSRr/f/HcEhm6Ez4+w9QEraMAJ3WZj wodYSxDYw0kiblRIYxl7e+kmVvULvOM= X-Google-Smtp-Source: ABdhPJynwUcpxIJ815LnR67E23PGwJ1VWgW9+Looeyn+zEgQULbogZYt2kJY7w8NsfWG5QpAXukPmA== X-Received: by 2002:a05:6402:27c9:: with SMTP id c9mr6318759ede.371.1622833362421; Fri, 04 Jun 2021 12:02:42 -0700 (PDT) Received: from localhost.localdomain ([178.233.26.119]) by smtp.gmail.com with ESMTPSA id n2sm3668819edi.32.2021.06.04.12.02.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jun 2021 12:02:41 -0700 (PDT) From: Alper Nebi Yasak To: u-boot@lists.denx.de Cc: Bin Meng , Heinrich Schuchardt , Tom Rini , Daniel Schwierzeck , Simon Glass , Marek Vasut , Alper Nebi Yasak Subject: [PATCH 1/4] tools: docker: Install a readable kernel for libguestfs-tools Date: Fri, 4 Jun 2021 22:02:03 +0300 Message-Id: <20210604190207.44805-2-alpernebiyasak@gmail.com> X-Mailer: git-send-email 2.32.0.rc2 In-Reply-To: <20210604190207.44805-1-alpernebiyasak@gmail.com> References: <20210604190207.44805-1-alpernebiyasak@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean The filesystem and EFI (capsule and secure boot) test setups try to use guestmount and virt-make-fs respectively to prepare disk images to run tests on. However, these libguestfs tools need a kernel image and fail with the following message (revealed in debug/trace mode) if it can't find one: supermin: failed to find a suitable kernel (host_cpu=x86_64). I looked for kernels in /boot and modules in /lib/modules. If this is a Xen guest, and you only have Xen domU kernels installed, try installing a fullvirt kernel (only for supermin use, you shouldn't boot the Xen guest with it). This failure then causes these tests to be skipped in CIs. Install a kernel package in the Docker containers so the CIs can run these tests with libguestfs tools again (assuming the container is run with necessary host devices and privileges). As this kernel would be only used for virtualization, we can use the kernel package specialized for that. On Ubuntu systems kernel images are not readable by non-root users, so explicitly add read permissions with chmod as well. Signed-off-by: Alper Nebi Yasak --- tools/docker/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index d2f0074ee8a6..563b16639e54 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -71,6 +71,7 @@ RUN apt-get update && apt-get install -y \ libssl-dev \ libudev-dev \ libusb-1.0-0-dev \ + linux-image-kvm \ lzma-alone \ lzop \ mount \ @@ -99,6 +100,9 @@ RUN apt-get update && apt-get install -y \ zip \ && rm -rf /var/lib/apt/lists/* +# Make kernels readable for libguestfs tools to work correctly +RUN chmod +r /boot/vmlinu* /lib/modules/*/vmlinu* || true + # Manually install libmpfr4 for the toolchains RUN wget http://mirrors.kernel.org/ubuntu/pool/main/m/mpfr4/libmpfr4_3.1.4-1_amd64.deb && dpkg -i libmpfr4_3.1.4-1_amd64.deb && rm libmpfr4_3.1.4-1_amd64.deb -- 2.32.0.rc2