From patchwork Fri Jul 19 16:38:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 3711 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 19 Jul 2024 18:38:57 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-lj1-f189.google.com (mail-lj1-f189.google.com [209.85.208.189]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 46JGctMx002668 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 19 Jul 2024 18:38:55 +0200 Received: by mail-lj1-f189.google.com with SMTP id 38308e7fff4ca-2eee96e7dc2sf23564211fa.3 for ; Fri, 19 Jul 2024 09:38:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1721407129; cv=pass; d=google.com; s=arc-20160816; b=U2Toxa3MBfbGnB8kysY6SCRmrhdFq+slJyhU6oDJLbw4XuLpVs+5WCrOhjcMhKjy+X tuuEOpAlikcCoiWSW6D+iQqA8inWYXzzmjYkcV/5905iYZWufv6vjm+c45YNpmmskhY4 +W2FOGDQ9M9nzycnjjhYmNVQEJvgeWuASN5+SQLpaVlBMaWB7hPFg4HJfNyUxgVg+cVy PnnyE8ft81WJLisKax9+cuGaB0MzjajlxjinULtX/B29EgZInT94vutLhhJWhb3memi4 LFcFXsVq6QOeZSqjIwTP1Ia/+XPckv+gF7fDSneqCb7h/uV501mU801Yt1k3AHHiC2bK ORSg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=iVamLCibBbm+jLmezxD1KFNpiI4T8oUm0dAJIGt7jPY=; fh=8/amcpiP5Csn49FhTE9eM/7XgPYhOR+I89/n8VtgeFc=; b=pgGxqJHh692Qg9exZ4TEG/52CWuxGhj2dsK/HMhRA9RntLCxWqMR5Px/yJHnWo33Ve 0Xu27FmWT3TTcCABXF8onD7bu4KRBp6K3tKfig97KVB42rS/dvsOs3lTX32gsazC9won giVKEdwpUX4h0akrippiv4hvyMWW8hfAzN95vURQIeQn1Snbik1xUHVFxfomoVHN1kaZ Epojh0vviGvI5c3Gr0Xie5Y1L36u2vu/apEDUdfsPrKF2Uzlz7Wlk/JGcJkyHiexEcd8 KohbEwRfi9mEto2DGYn3MtiQgZwmomzBOy2mV+S8ZxPob+da+l1eda3mjd/oVkQ3cVuB EEzw==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=IoRGKb1x; spf=pass (google.com: domain of fm-294854-2024071916384469d3cd1665441a659f-o8sqr5@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) smtp.mailfrom=fm-294854-2024071916384469d3cd1665441a659f-o8sQR5@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1721407129; x=1722011929; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=iVamLCibBbm+jLmezxD1KFNpiI4T8oUm0dAJIGt7jPY=; b=a71ewnZXCnEjE7Rvu8MZhwyhSXH7dUh1s+gULB5uhOBuA/jtmqwOm4OVne8M8ptjVK xAcr4xvCJeeQfIofKzw4aWHHb5PApiSQLBg+QW3Fsd0DPKkxEwX4TLSPdO3JBfQ30pob QUmz941NTyEC2I/DFwhTCJP2be1G1zwBvMrI+xtEwfJewjys8JCYpEORhYZ6kxXMT83s FSQXZQAnWdWswDFw0lQBKJUNlXIqNcOImldbBM/1FDWkWp4F1wslzy0QZK4Ahl5r4FzP xBfI7FFtv4JmjvJ5b6V4t17pCh0+ATlJouRicTh2OxBiJqNjd5rRlD6mcJbbhp2LoteV Mh6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721407129; x=1722011929; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=iVamLCibBbm+jLmezxD1KFNpiI4T8oUm0dAJIGt7jPY=; b=FZNUPR3DwI2z4ICSnhTY3XfGnc1zGE05Jm6bvaxTNqrpiN+ja7ac270q0jgeNh/hAc 466oc3lpvGc6Fm0YLI5sT1aVFE4cVXpLCpmPuM3yPMlezqJNzmtgt1EP79NZH34EPtS1 PDAHKkRquHogu/E0WyN9EOO31d/UWicozL8NwUxDl+FAsACM6SKlZlPw3w3emXCJOEDl C44QdTC7BbCZdh1ZIJP9NMm2fe2RZh3yIyqNfp/oqDsx2vbP4RxoTRe3mt8scTAl9Dto 3TUpeSehxPAzUzNm+bz6trZ4XMyQGLmcmFDa22GcKLE7aFfdzCaeNGjuL0GdfdLzu26T gUQA== X-Forwarded-Encrypted: i=2; AJvYcCXe5MVYE06w6yLlDqkLQ8unfeWjybHiW+gd6IkXNpVuxsDlfkaKiW8do7aoK5ELWG/RVLUhnacMEGjt3lj9g1vuvqLsr0A= X-Gm-Message-State: AOJu0Yw4FMeduyYyrob+DGEguaTyRVt8+Gh20MM/jJ2PTp8wDqhXPHng 3bTF65QWYjtZY9TPzpOBZp7XGibVyTSZUckwnhUn+/pCUpMxAreI X-Google-Smtp-Source: AGHT+IHMInWCuUS/Zxho/YCLYAF4TYjM355Cg9gSf6lRmDeAkJLKYe4LjKMtiCFYZ/ynJ89ZgR978g== X-Received: by 2002:a2e:92c5:0:b0:2ee:7a3e:4721 with SMTP id 38308e7fff4ca-2ef16826a21mr1679131fa.39.1721407128307; Fri, 19 Jul 2024 09:38:48 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:bc18:0:b0:2ee:8c6b:1209 with SMTP id 38308e7fff4ca-2ef04cd2b5bls11699941fa.0.-pod-prod-04-eu; Fri, 19 Jul 2024 09:38:45 -0700 (PDT) X-Received: by 2002:a2e:7003:0:b0:2ee:8dce:2f94 with SMTP id 38308e7fff4ca-2ef1679c9d1mr2075561fa.27.1721407125280; Fri, 19 Jul 2024 09:38:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721407125; cv=none; d=google.com; s=arc-20160816; b=pcJYzQZWlDXvNl2298ttSH74SX9CFcXJD32gQZsqBCTtfoHjh3udZKj3yajVnT7Hff dJSJt6OYGejrHxtOuRoQy43m41z7RPkYw2DImWhLQEfiVUrJyoX8qwoSm/TMQlPefJuR ZwnGTxtgvWXNfyaAZ8/Mek5UhsZFrYIwebQDBi+ZXPzIyh4zmskr0RH7Or/2mmx9PE3f Gx3jDi87k7th+Z4VFACpwICFV5JJNwczpN5yob+DuB2SjkjcH4+TqZm1vOxS1oqukEIa AP/tnd2DP+4+KCOGdZDLjVil3fsiFxA/UhPEnMQjDb4Zl2eAvJBcmutJJ1N6fNuF82OY ZgEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=5Q8nkkkjzpXg64IKufplF2I9id/rT8Gipiy3rjOvdQU=; fh=sG8mVX6bNXJXg1RhSNhryk9YKHryCWWF37H72hfFhEU=; b=XbRE/NaR8PXquXbKL+t0BcL7zPDljGhljxjZkt+a53/Q3SY/fR/yCAk5jCu3Yd+Ma9 z53gW1vplS1VHu5ZNIRS4UdL9DhFXJBqKigkEL4xjBsWnJ40cayq3OokhHgIrg2RQgMJ l1lJzehr9kFAM+ckr+WRksl17UnYqPfL6H/HW5X0ZET3qAErfMcS1W/tQcosw8RbV9kL 8p6K+oujItJDzKNtGvZWOKuunm8FLODqMU4wFn//cxexLsB2P7Sect7wT0KB7fWE8pbq W/mXqr6zrWyW4VhaNzKl0p8dpj3CPdlFFUS11K6cb5C426PHcZCLv2a6r31er3xqJUf/ 6Jnw==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=IoRGKb1x; spf=pass (google.com: domain of fm-294854-2024071916384469d3cd1665441a659f-o8sqr5@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) smtp.mailfrom=fm-294854-2024071916384469d3cd1665441a659f-o8sQR5@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-64-225.siemens.flowmailer.net (mta-64-225.siemens.flowmailer.net. [185.136.64.225]) by gmr-mx.google.com with ESMTPS id 38308e7fff4ca-2ef0fd30618si385501fa.8.2024.07.19.09.38.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Jul 2024 09:38:45 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-294854-2024071916384469d3cd1665441a659f-o8sqr5@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) client-ip=185.136.64.225; Received: by mta-64-225.siemens.flowmailer.net with ESMTPSA id 2024071916384469d3cd1665441a659f for ; Fri, 19 Jul 2024 18:38:45 +0200 X-Patchwork-Original-From: "'Jan Kiszka' via isar-users" From: Jan Kiszka To: isar-users Cc: Silvano Cirujano-Cuesta , Benedikt Niedermayr , Felix Moessbauer Subject: [PATCH v4 4/5] ci: Add test cases for container fetching and loading Date: Fri, 19 Jul 2024 18:38:42 +0200 Message-ID: <3a0b76b54aca9cee33d249a2df73d233edf08708.1721407122.git.jan.kiszka@siemens.com> In-Reply-To: References: MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-294854:519-21489:flowmailer X-Original-Sender: jan.kiszka@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=IoRGKb1x; spf=pass (google.com: domain of fm-294854-2024071916384469d3cd1665441a659f-o8sqr5@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) smtp.mailfrom=fm-294854-2024071916384469d3cd1665441a659f-o8sQR5@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: Jan Kiszka Reply-To: Jan Kiszka Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-4.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: Jan Kiszka This plugs the two example recipes for loading container images into VM-based testing. The test consists of running 'true' in the installed alpine images. Rather than enabling the ci user to do password-less sudo, this uses su with the piped-in password. Another trick needed is to poll for the images because loading is performed asynchronously. Signed-off-by: Jan Kiszka --- .../recipes-core/images/isar-image-ci.bb | 2 ++ testsuite/citest.py | 21 +++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/meta-test/recipes-core/images/isar-image-ci.bb b/meta-test/recipes-core/images/isar-image-ci.bb index e5d51e6e..9133da74 100644 --- a/meta-test/recipes-core/images/isar-image-ci.bb +++ b/meta-test/recipes-core/images/isar-image-ci.bb @@ -16,6 +16,7 @@ IMAGE_INSTALL += "sshd-regen-keys" # qemuamd64-bookworm WKS_FILE:qemuamd64:debian-bookworm ?= "multipart-efi.wks" +IMAGE_INSTALL:append:qemuamd64:debian-bookworm = " prebuilt-docker-img prebuilt-podman-img" # qemuamd64-bullseye IMAGE_FSTYPES:append:qemuamd64:debian-bullseye ?= " cpio.gz tar.gz" @@ -51,3 +52,4 @@ IMAGER_INSTALL:append:qemuarm:debian-bookworm ?= " ${SYSTEMD_BOOTLOADER_INSTALL} # qemuarm64-bookworm IMAGE_FSTYPES:append:qemuarm64:debian-bookworm ?= " wic.xz" IMAGER_INSTALL:append:qemuarm64:debian-bookworm ?= " ${GRUB_BOOTLOADER_INSTALL}" +IMAGE_INSTALL:append:qemuarm64:debian-bookworm = " prebuilt-docker-img prebuilt-podman-img" diff --git a/testsuite/citest.py b/testsuite/citest.py index 8dd907d0..539c9440 100755 --- a/testsuite/citest.py +++ b/testsuite/citest.py @@ -522,3 +522,24 @@ class VmBootTestFull(CIBaseTest): self.init() self.vm_start('mipsel','bookworm', image='isar-image-ci', script='test_kernel_module.sh example_module') + + + def test_amd64_bookworm_prebuilt_containers(self): + self.init() + self.vm_start('amd64', 'bookworm', image='isar-image-ci', + cmd='echo root | su -c \'' \ + 'PATH=\$PATH:/usr/sbin;' \ + 'for n in \$(seq 30); do docker images | grep -q alpine && break; sleep 10; done;' \ + 'docker run --rm quay.io/libpod/alpine:3.10.2 true && ' \ + 'for n in \$(seq 30); do podman images | grep -q alpine && break; sleep 10; done;' \ + 'podman run --rm quay.io/libpod/alpine:latest true\'') + + def test_arm64_bookworm_prebuilt_containers(self): + self.init() + self.vm_start('arm64', 'bookworm', image='isar-image-ci', + cmd='echo root | su -c \'' \ + 'PATH=\$PATH:/usr/sbin;' \ + 'for n in \$(seq 30); do docker images | grep -q alpine && break; sleep 10; done;' \ + 'docker run --rm quay.io/libpod/alpine:3.10.2 true && ' \ + 'for n in \$(seq 30); do podman images | grep -q alpine && break; sleep 10; done;' \ + 'podman run --rm quay.io/libpod/alpine:latest true\'')