From patchwork Tue Aug 6 15:16:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzimir Bely X-Patchwork-Id: 3738 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Tue, 06 Aug 2024 17:20:04 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-lj1-f191.google.com (mail-lj1-f191.google.com [209.85.208.191]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 476FK3J4009921 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 6 Aug 2024 17:20:04 +0200 Received: by mail-lj1-f191.google.com with SMTP id 38308e7fff4ca-2ef3157ae4csf10219851fa.2 for ; Tue, 06 Aug 2024 08:20:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1722957598; cv=pass; d=google.com; s=arc-20160816; b=Zq9oL9Emhk8NYwP5S/JdA4k/Od0lvtJs7qmqtsYQ6ZXH4a7b0LIS03kEZAjekt2SgL wQbTxMthED7s0Ywrnioyz5xLZ1Hs9x3ygC9Qpzns4Fjst6od7dvhp02ygYs7v0UkKOGp rUO/GVe5fkhIZZkTKwyzS5Yr2XZaLRQxH+SkuTzUE+xiOu657vR4/PzX0P6tDLHiKVjJ 7LQ2Pitu9foG0zahyDDwxHt7h1yG0HplO8Pg3EQZL0wpE/n6UVS5C+GdMsQubtozKF/Q wZrY+TWAp2LJQqFmE7NFDGCAfmjN02cTjm1JGTW4tSt5ZBDtXvSNo0mh4+XwYwwwzcxx rUhg== 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=TLI0l0DRYXUgKX1cHY/YqHKHMpMk0REBOZLuY32CbwI=; fh=n1lIH3QNzpU+b46XxXJlLkF0Y1K6OGXfs2B9JtUffr0=; b=TRI2TKjAtcD3rwvuRK+n5mJTmB+fwuKSnkTacdssnKzSQGHlZuTQfcYcFSqrgWbzF8 7IR1mgvidrO0+YpgOj5ldl4EPMKLtc6euXvM4IowfFCqSOfXxirN8CEnTngKvXRHaN9k 5Nqkxl+0i2VRKN6bsWpdGDLwcigYNpsYUR4i2FsP2CvtVqDnIU8gJbXNN9m8PwUyZDYv PxYGBN6k0mosza37G4uE2OAAqfp3bl5Z0zB4y/egVIcPlvG/V4kHQNlcKNrh7TXTYGQm wp2FP+qrN+dqWRH1OH15lkt70JgZvPPKihnwThy/9/zLEiu+09iIA3T2xN1GjIcqVnel ZVxg==; 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=1722957598; x=1723562398; 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=TLI0l0DRYXUgKX1cHY/YqHKHMpMk0REBOZLuY32CbwI=; b=Il7QQxiedFjN+1vbvqLbo9TxGGA45t0/BW/ZzxeTEcYEbQD9GU/oqNoopvaDM+L1CS oWwB230ZKPXLYDARLno7mjZtnp9SdMd0UhJvyfnZJK0iyVTs7Kk9dRTHJoBXSONebwIK E40OFzbOBlYqEB+PGyjuQO287pddIPvesZOoF6fTVsxbnSvrUh+qXswhRdlvLvrzBazz ix7vqopWKTS53J3/5BEokdNBykHW+cZySgfNvoOJDUZpCKdjoLcYBGM8RMngymZE4pcY OmbXbWd4kfvRt43o4xJQrcSOX61y6k1UBg5lfYnh9adnzTbjsK4yqTarZZN9pwX6Gx83 K+TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722957598; x=1723562398; 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=TLI0l0DRYXUgKX1cHY/YqHKHMpMk0REBOZLuY32CbwI=; b=Xhq6tv/dN9jv2ZctEYvsHABepGtQ4oykzuEDnKJNmJZJRU/Sygd+BMyEYP8vd9YRtQ SJiSPScqhA+tmIMy492xJ1Gtxb1pyjFNvS3ud20US7gzshonbGPJ4EgcamguWBgb8QlN uoenR1nFuWOsv9OG+rUOurFvlBWlAjd3AiNKdBRudHmjQ4Upalh1ed+sHYZIWEJMLlhU DBR1pGKbJuIBMIDExBeb4fnYkWqj7jQxM6s+o4UPO1i/hKpYvmBjR9sVJPvyNqBGRgxB n7ACHCUkP86+lXpSt8fz9T1sV7oAznkfld4wqVzltAn67ZZSKtcYkTZyJhVoktnloYP/ 6hrA== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCWF2/xayEh0eGHLUCZhPO7LXj1YVkWPmdj1ZmKVJmafal+IFjYEZ8hPzfpjRuH7XpGIXcmNCnc=@isar-build.org X-Gm-Message-State: AOJu0Yy6m4stdGnix5PW/7LAOa7497Wr/A0gU4CryCp2sFuRyFQPkqw8 pABSnw7WrR91lZA0A9Y5w/HnEHZHUjrMmXnHx88uYN1irZz9Eehj X-Google-Smtp-Source: AGHT+IHZrk7PJyJHK+J1TEshE7aPBXqgvgnojUmkGoAXwSJn+SEWpJmErnyf7M+GxDNQD/Gz/ckAHg== X-Received: by 2002:a2e:9845:0:b0:2ef:20ae:d117 with SMTP id 38308e7fff4ca-2f15aa88cc7mr127818301fa.10.1722957597675; Tue, 06 Aug 2024 08:19:57 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:2286:0:b0:2f1:5dd9:1b09 with SMTP id 38308e7fff4ca-2f16a6091fbls15454011fa.1.-pod-prod-05-eu; Tue, 06 Aug 2024 08:19:55 -0700 (PDT) X-Received: by 2002:a05:6512:12ce:b0:52e:9904:71e with SMTP id 2adb3069b0e04-530bb38cec2mr12538468e87.28.1722957594931; Tue, 06 Aug 2024 08:19:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722957594; cv=none; d=google.com; s=arc-20160816; b=epbgmDAjDBWhsZ7d89hftaz+bcD1QtwBLxn5OXezpGCGwKY82yzrYcZWFk8rEoURbm Sqi/8eThMmn0udK3WkGcAbJDcxBUUPZLzqUx+Zp0Cp7sdoNTVUu1wFhqjRp2ZmH/EFcz M5U4IVOKdR41mrHr5odbTo/7zaJcy4t2l34G6fMxqtBdkMFx1/yz/8c8xjXTam83NGeH O+dcLH4Pd/7XKlhaOO8fu4qt5tEx/NXQg3FuYYXZAKvL8hBo3f+u2dYqbUxXq3EqD9ca ILs/xEevV6LdDavLvcUvb4ddH5VNu9nC6qPclJxIvYxYxhI5KFOULJX+n7df6+rGBTu9 mAYg== 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=VFmn2emRj7t7f/ncet+L6oglcA9CMFB8WNR3aOKfOfQ=; fh=7tclEdh7YbwSQowgJ6LNq720O7H5HTEaqj22NJWRE2E=; b=APs4izoZzwtNl6UwMdw/JFzZ7sVO0+Nc7rf2SK5/CU9Lj4pRB9FquAt159kNokekGB BNLDLBWUu1YJLrMjjDt66fCSyaMG6Ym5dxFpCdm8UML8WXZB3czvtUGoF7XwWu++zMmI OeMcAL9NA08CS2yJ3OLOVIErAdEobPlnkDMbJJIdEgndjyhYV+kSZhkd7jiIAKCv+3Yv rK/Q3BgNny0+dhaBkk6/1kKFticTADveR849R5BtqIktPE3stPIYL3/6MVISSUI/elC4 NFBKYNPjjUrFvrytHv7QZsFi8eifNAnNJ69hBWHwymHy2TWfalSC8AzSj8KdPmRD3CdF 3oRg==; 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 2adb3069b0e04-530bba30802si196855e87.12.2024.08.06.08.19.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 06 Aug 2024 08:19:54 -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 476FJrPT009908 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 6 Aug 2024 17:19:53 +0200 From: Uladzimir Bely To: isar-users@googlegroups.com Subject: [PATCH v2] ci: Add test cases for container fetching and loading Date: Tue, 6 Aug 2024 18:16:42 +0300 Message-ID: <20240806151947.27113-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 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-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 Signed-off-by: Uladzimir Bely Reviewed-by: Jan Kiszka --- meta-test/recipes-core/images/isar-image-ci.bb | 2 ++ testsuite/citest.py | 10 ++++++++++ testsuite/scripts/test_prebuilt_containers.sh | 16 ++++++++++++++++ 3 files changed, 28 insertions(+) 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 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..87f34846 100755 --- a/testsuite/citest.py +++ b/testsuite/citest.py @@ -609,3 +609,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 +'