From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Wed, 07 Aug 2024 07:16:03 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-lj1-f185.google.com (mail-lj1-f185.google.com [209.85.208.185]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4775G3eX012871 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 7 Aug 2024 07:16:03 +0200 Received: by mail-lj1-f185.google.com with SMTP id 38308e7fff4ca-2ef205d48ebsf12497931fa.3 for ; Tue, 06 Aug 2024 22:16:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1723007757; cv=pass; d=google.com; s=arc-20160816; b=BwEhnascZXXOgGkFFudnWLLZWJj816R4j9krh2d+JxVWVtrIcrCzxij/XB0AJ0BYxY xjzYydM9jR7+lUAvr3AbK0TXSDVI53mzUSEMkU3VeiTT0/GJRcNyC94iu7n8VkQJYveS RIeZFmRiwWcdWon2FDE16fCGjxs/sTDeWkuklu+2vX7K+kddValMdXka1+R/TG/FxZa5 vy0YnHS9nscveomjY2OPvkYb/ayuUdxJ/v5zSpqE+ILger+oqaOIWeuXK/poM695dOq9 ZVhYfPhQjxKzH5+Nps+UAsTBV32cgwKJpupGbc1NFSzQLccU3HNXb622TDJO8NS6cJ94 NC3g== 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:mime-version:message-id:date :subject:to:from:sender:dkim-signature; bh=jWtix/waddC87nPAARkFI0p6MV0sHvL7WB6VETQ7sYw=; fh=YyogP4SWCG5s2PMPz52xy2FJDpAix9qQXeTscL8kzN0=; b=vAapKlDnfvXPwE/Um4VCioPdvE6d8ECi5EJ/QKRTt1JqFXC5f5cWNpoyLHY09d+Pvn B/HLhsmmwKMQD2RrsbN9UWPqohx0a2SDc8Ebk2h3BD6ZGdBiGiPRSUmlPmZmQ3mmNWy5 A6I3K6UKC3MzsNOZamRDp2BizDjET38vUR1pJkVso14Sr2lWhfcWxpYfj7p7jKkmH8F7 iqgAkmuTkPwegmiLvrMYbAociKT2qGUMLlmO4cKjF6UnvGc3oa3mf0SpXZgwaa7eeTqf 3m+Rzr4lgON1FFEaLHHRUIgp3M762LSVtc8fzzeoKz5c/9iINdcl31j5LlMEUZdftnL1 /WaA==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1723007757; x=1723612557; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:to:from :sender:from:to:cc:subject:date:message-id:reply-to; bh=jWtix/waddC87nPAARkFI0p6MV0sHvL7WB6VETQ7sYw=; b=OsJ66uADU3GgC74na0jZ7Z2Mlu9kIUavZXIzCSG7OW2/usCgtAzpcHX9/2x4Ti7wm6 n0bKW8ZZH4/zQfN65wQb9dOHuMTXxkAAA4ya2VRMDBuRYputgt1dOVz1qmbtoy3K5hId prX4cDbEa55GYao3+qiiy77baSbXT3Z5xkHf2uPQuLizSXAvVxJ+owZHY+7fIsK/rOBN KVaerZhwbEYOvLIaQDWm4ohESFeC5q4gLjDvoyd9/WjiUbiJtCzMbYZY/k04D8Hj73Ed dStQm04zjh2ckNrJWE9IvwrSBIHPhvBKlv+5m92F5JfqrMJiFsuqt+9wsj2Hr9yXndDn 6XRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723007757; x=1723612557; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:to:from:x-beenthere:x-gm-message-state :sender:from:to:cc:subject:date:message-id:reply-to; bh=jWtix/waddC87nPAARkFI0p6MV0sHvL7WB6VETQ7sYw=; b=JWFJtwSAIugAwY6T0Uig4YOQeYq4F71BsvOCHuJhwGMKEC+0OVqJuTKtRdFkNTMwQo /8nIoEVe/ay6NwD/G3Gd2SRKkdwRTrYTDEdwuLEJO20hqzG14Eo6SUt0pgQw3lad/8nC aXM9AT854VatHGPJ54h5PTd+G34RDQk8vd/0xpR7PLJfxpbptaouLISYIjmPFqE6u3bj 3dCv5IhauevgIzZ5E3Gp7u3o/GkWXZ3OPKOr4EQEd7AYqlHjz44u44Q2qzsvb+7G+Zcw nYe/c9cletleAMtKNwrsR2iXjzLTpiMyFEK9IwHg97ikX+F9dK0VmPv6s26pibqHeZe0 imZQ== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCXa8N6QwcvMrmIr6sGjmW07lKAC9ob1//wuPYWHWDM466sgEOacXTgwqFN5BbVNvkastIKEKPNGO4SxH0U704FtXtc= X-Gm-Message-State: AOJu0YzyTrjhJ88gLQrtibn7IDczCLD2N26mvP2GtiCDmC5CMHll57NI nQZ4y+cNmnyOLsOV0Mx2ZnO4bbGSIQsTELaUmlOuCpSqYIZTG0aw X-Google-Smtp-Source: AGHT+IGSJI7g62BLCHKLH0mTjISHUbxeExGfDIun0E6deDbOd3m58Ezce8Ey+Upp+eOPYsfsySUFkA== X-Received: by 2002:a2e:97ca:0:b0:2ef:2f17:9edd with SMTP id 38308e7fff4ca-2f15ab38098mr104772731fa.44.1723007756859; Tue, 06 Aug 2024 22:15:56 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:600c:3c8a:b0:426:73d7:f1f5 with SMTP id 5b1f17b1804b1-428ede2001fls19013025e9.1.-pod-prod-07-eu; Tue, 06 Aug 2024 22:15:54 -0700 (PDT) X-Received: by 2002:a05:600c:1d24:b0:426:6e9a:7a1c with SMTP id 5b1f17b1804b1-428e6fb66eamr101491025e9.25.1723007753966; Tue, 06 Aug 2024 22:15:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723007753; cv=none; d=google.com; s=arc-20160816; b=ifeVW47+pg1Qsmb+4XscA5zFVS+d5R6nsc8iO0jcx5QxPN1kbyI+pBzvf/pMe1SZZ4 rabzKGhqShse+vr47v60B+QjjP10lgLDtt96aAtxpR+Ma+5FI2fXrc+HCPNCw2mppL2H JM+YJeUHMoVfhUmu/jJ7YRNhBUcayvh7pdWJHKPo3UP4n6tep81pl4Do85mWnofUKme5 XRuOuksl+w7livvVluav6BdYCc9kJN4vjZ4Y8CcdGh68OyM3JtegY2XoP0p3NosYG6HT 5QAgYa6DcMH9/iz8yROvEHFEqcQ8sKAK/mX+hCm1Qo5CnpMcrpIJXE6Y7jSOKjQa2nq8 h8Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from; bh=FK2tjeXs19we88quIGM+9LjIXaTuwG2d38nvIujmKxk=; fh=7tclEdh7YbwSQowgJ6LNq720O7H5HTEaqj22NJWRE2E=; b=l8nsM6dTRv0wpoL8s1ArPMYCPw49II56Y0mDCNbWI499fuROSqyj9dEk7nRT3+d/bi zH+bsLRxDuDZlaP/DBU5vjNhIkFDFqFmJmiz0HcV0mfKUNPy5ID9syExKmyenhGrfrO+ fXER/4RVNo1vFkvZ/d24Mxee608gnLDCCdyTZ+ly2yR0//h53e/QMaUf53IbNaJyqLXw /y5HIqYLwn7hF+SBfgq9SNLWM2nt38kj7F8R5q99m2ZZKnuipGCF2+HLPlH6ssHZYXX+ +BNzXqIbJX2GINme+OX0wdFr5iPfgteq4rtznuxIPrYdDBsBj4KqymmRWOJFuGueLzay jUfg==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id 5b1f17b1804b1-42905633f75si319995e9.0.2024.08.06.22.15.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 06 Aug 2024 22:15:53 -0700 (PDT) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from home.promwad.com (44-208-124-178-static.mgts.by [178.124.208.44] (may be forged)) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 4775FqPj012862 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 7 Aug 2024 07:15:53 +0200 From: Uladzimir Bely To: isar-users@googlegroups.com Subject: [PATCH v3] ci: Add test cases for container fetching and loading Date: Wed, 7 Aug 2024 08:12:05 +0300 Message-ID: <20240807051547.7448-1-ubely@ilbers.de> X-Mailer: git-send-email 2.44.2 MIME-Version: 1.0 X-Spam-Status: No, score=-4.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, 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-Original-Sender: ubely@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Content-Type: text/plain; charset="UTF-8" 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-TUID: ZgoVPl4tm7FR 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 Signed-off-by: Uladzimir Bely --- meta-test/recipes-core/images/isar-image-ci.bb | 2 ++ testsuite/citest.py | 13 ++++++++++++- testsuite/scripts/test_prebuilt_containers.sh | 16 ++++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100755 testsuite/scripts/test_prebuilt_containers.sh This is a drop-in replacement of patch 4 from "[PATCH v4 0/5] Introduce container fetcher and pre-loader" series: - Fixed syntax errors (incorrectly escaped '\$') - Fixed long lines in order to pass flake8 Changes since v2: - Run the tests in the VM that was previously run. This: - reduces test execution time; - avoids filesystem failures in the VM image caused by previously killed machine. Changes since v1: - Switched from running command to script for better readability. 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 7064c1e4..18d3af97 100755 --- a/testsuite/citest.py +++ b/testsuite/citest.py @@ -539,6 +539,7 @@ class VmBootTestFull(CIBaseTest): 'bookworm', image='isar-image-ci', script='test_kernel_module.sh example_module', + keep=True, ) def test_i386_buster(self): @@ -577,7 +578,7 @@ class VmBootTestFull(CIBaseTest): def test_amd64_bookworm(self): self.init() - self.vm_start('amd64', 'bookworm', image='isar-image-ci') + self.vm_start('amd64', 'bookworm', image='isar-image-ci', keep=True) def test_arm_bookworm(self): self.init() @@ -609,3 +610,13 @@ class VmBootTestFull(CIBaseTest): 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', + script='test_prebuilt_containers.sh') + + def test_arm64_bookworm_prebuilt_containers(self): + self.init() + self.vm_start('arm64', 'bookworm', image='isar-image-ci', + script='test_prebuilt_containers.sh') diff --git a/testsuite/scripts/test_prebuilt_containers.sh b/testsuite/scripts/test_prebuilt_containers.sh new file mode 100755 index 00000000..1700e653 --- /dev/null +++ b/testsuite/scripts/test_prebuilt_containers.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +echo root | su -c '\ + set -e + export 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 +' -- 2.44.2 -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/20240807051547.7448-1-ubely%40ilbers.de.