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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,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 17B70C48BCF for ; Sun, 13 Jun 2021 14:08:14 +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 9935761285 for ; Sun, 13 Jun 2021 14:08:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9935761285 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 C40C180C58; Sun, 13 Jun 2021 16:08:09 +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="gGFLiRlq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E1FCB80A22; Sun, 13 Jun 2021 16:08:07 +0200 (CEST) Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) (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 72BD580A22 for ; Sun, 13 Jun 2021 16:08:04 +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-x534.google.com with SMTP id i13so42995604edb.9 for ; Sun, 13 Jun 2021 07:08:04 -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:mime-version :content-transfer-encoding; bh=Tp0WX0NM0lNafg80cbeCyuqaXYTdbJqlcBmzO7y1BaQ=; b=gGFLiRlqwXhDeZ6own72SuXGY2HmIDW1gCcJcA9FFraxk/KU0HBBND6orXQ/J/vjJI E04cHWc3Yj7l7RsqT6KvKz3Ml8t5iVMjEMmFCQH/EJZEtNDHW1YrJRUAyUhPGk6Lno20 0XHDSxQk250Di5YoECmwkA0RhkGRFnq0KMlgbdF57n/kWwdDvHfKpghs8mJM05nXu+YU W31R4ZI9fmDt6WspU+MNzSGRktcYH+b2ahNXNgm8Zt6jgPY7QdBKNCMaeb+lgAHQcvm9 KelqNea/Q3y/kXUhS7uWcxAJxYtd+u1IojOCK6o5nYnb5YoIrwN9JKp9LQypt1F7ruGl W8kg== 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:mime-version :content-transfer-encoding; bh=Tp0WX0NM0lNafg80cbeCyuqaXYTdbJqlcBmzO7y1BaQ=; b=K/YvGkbRpz1KLVNaYPvaohUYErpHcvPXlpFEuqsEqvD3s3QeBxxTKFWMVR//VuvbwN KbrkJAMCJYAmanZD86ZuRProNiR71CkI5z6vOFlkWeiDP6ENVahZpM+Qb0pneubz2Mxt 4UuOG8qTdPmRG8glJcUcAyZzTjr0cvnkd5OULu9giacEuASuYZpfg56V+sHPuRV0ejCS 4Ou2zWcptJNGxmh8fzU8zF/jLHU5T6xH/77cJ6qvSjGgGuyKmFngqAfkcNJCv0HroLmh kJqOnts+78KOipdoVZ45M24jWrfJJZXIX/rtg0LkeG14oDPGRaLrCm03wixNNrXBO8aP yDIQ== X-Gm-Message-State: AOAM531HD/qwZ719DUlTPn9g12QfpXnORbZQHYFS1+nD7cY25hMvqkpA X+MR5AmHLZOm61Ohr3s+eNv5Z41VUXc= X-Google-Smtp-Source: ABdhPJy9v9twJvn048MltGkymhzRiEZaUlHypyPvbxQmkFubJ3MVL/FpnhyVcC0tqcXt4pnn9EXycA== X-Received: by 2002:a05:6402:152:: with SMTP id s18mr12625973edu.221.1623593283905; Sun, 13 Jun 2021 07:08:03 -0700 (PDT) Received: from localhost.localdomain ([178.233.26.119]) by smtp.gmail.com with ESMTPSA id n15sm5929803eds.28.2021.06.13.07.08.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Jun 2021 07:08:03 -0700 (PDT) From: Alper Nebi Yasak To: u-boot@lists.denx.de Cc: AKASHI Takahiro , Bin Meng , Tom Rini , Simon Glass , Daniel Schwierzeck , Marek Vasut , Heinrich Schuchardt , Alper Nebi Yasak Subject: [PATCH v2 0/3] Fix CIs skipping filesystem, EFI secure boot and EFI capsule tests Date: Sun, 13 Jun 2021 17:07:27 +0300 Message-Id: <20210613140731.16254-1-alpernebiyasak@gmail.com> X-Mailer: git-send-email 2.32.0 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.103.2 at phobos.denx.de X-Virus-Status: Clean After my previous patch to fix filesystem tests [1] was merged, I noticed the GitLab CI was still skipping them and wanted to figure out why. In short: libguestfs tools (virt-make-fs, guestmount) fail because they need an installed kernel and the host /dev/fuse device, loop mounts need the host /dev/loop* devices, and mounting filesystems (loop and guestmount) fails because Docker containers need extra permissions to mount devices normally disabled for host security. [1] https://patchwork.ozlabs.org/project/uboot/patch/20210520190947.21773-1-alpernebiyasak@gmail.com/ Patch #1 is meant to install a kernel into the container image that libguestfs can use, but the image will need to be regenerated manually. Patch #2 makes virt-make-fs work, which should make these EFI tests run again. But guestmount doesn't work with this much because it needs more permissions to actually mount a filesystem. Patch #3 makes mounting filesystems and loop devices work, which should make the filesystem tests run again. This is separate from patch #2 because the parts using guestmount can theoretically be rewritten to use guestfish which would make the filesystem tests work without this patch, and giving mount permissions to the container processes seem to be insecure. So, this patch can be dropped if you think the impact isn't worth it. Similar changes to patch #2, #3 should be applicable to the GitLab CI and probably necessary to get the same effect, but I don't think its configuration is accessible to me. Changes in v2: - Always pass in /dev/fuse to Azure's docker run invocation. - Drop patch to install kernel in CI scripts v1: https://patchwork.ozlabs.org/project/uboot/list/?series=247294 Alper Nebi Yasak (3): tools: docker: Install a readable kernel for libguestfs-tools Azure: Add fuse device for test.py tests Azure: Add loop devices and CAP_SYS_ADMIN for sandbox test.py tests .azure-pipelines.yml | 17 ++++++++++++++++- tools/docker/Dockerfile | 4 ++++ 2 files changed, 20 insertions(+), 1 deletion(-) -- 2.32.0