public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "'Jan Kiszka' via isar-users" <isar-users@googlegroups.com>
To: Uladzimir Bely <ubely@ilbers.de>,
	isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH v4 4/5] ci: Add test cases for container fetching and loading
Date: Tue, 30 Jul 2024 23:45:04 +0200	[thread overview]
Message-ID: <38ba708f-aacd-4f9b-a777-40a993335cc8@web.de> (raw)
In-Reply-To: <624dbb193e9bfbaedbfb7e288b6b295bd9fe5a06.camel@ilbers.de>

On 30.07.24 09:44, Uladzimir Bely wrote:
> On Fri, 2024-07-19 at 18:38 +0200, 'Jan Kiszka' via isar-users wrote:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> 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 <jan.kiszka@siemens.com>
>> ---
>>  .../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\'')
>
> This appears to fail in CI:
>
> [stdlog] 2024-07-30 07:29:37,721 avocado.app ERROR| qemu-system-
> aarch64: -drive
> file=/workspace/build/isar_ub_devel/49/build/tmp/deploy/images/qemuarm6
> 4/isar-image-ci-debian-bookworm-
> qemuarm64.ext4,if=none,format=raw,id=hd0: Could not open
> '/workspace/build/isar_ub_devel/49/build/tmp/deploy/images/qemuarm64/is
> ar-image-ci-debian-bookworm-qemuarm64.ext4': No such file or directory
>
> Should be either changed the bullseye here (not yet checked if it
> works). Or, we need to build arm64-bullseye image in build tests
> before.

bullseye is legacy.

Unfortunately, the testsuite lacks a dependency model. Here,
VmBootTestFull depends on CrossTest and NoCrossTest - apparently this
was not the case so far.

I'm still wondering why we are using such an unhandy and non-standard
test framework if not even such basic things are expressed - or are even
expressible?

Jan

-- 
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/38ba708f-aacd-4f9b-a777-40a993335cc8%40web.de.

  reply	other threads:[~2024-07-30 21:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-19 16:38 [PATCH v4 0/5] Introduce container fetcher and pre-loader 'Jan Kiszka' via isar-users
2024-07-19 16:38 ` [PATCH v4 1/5] Introduce fetcher from container registries 'Jan Kiszka' via isar-users
2024-07-25 10:48   ` 'Niedermayr, BENEDIKT' via isar-users
2024-07-25 11:10     ` 'Niedermayr, BENEDIKT' via isar-users
2024-07-19 16:38 ` [PATCH v4 2/5] container-loader: Introduce helper to load container images into local registry 'Jan Kiszka' via isar-users
2024-07-19 16:38 ` [PATCH v4 3/5] meta-isar: Add demo packages for installing prebuilt containers 'Jan Kiszka' via isar-users
2024-07-19 16:38 ` [PATCH v4 4/5] ci: Add test cases for container fetching and loading 'Jan Kiszka' via isar-users
2024-07-30  7:44   ` Uladzimir Bely
2024-07-30 21:45     ` 'Jan Kiszka' via isar-users [this message]
2024-08-05  7:20       ` Uladzimir Bely
2024-07-19 16:38 ` [PATCH v4 5/5] doc: Describe how to use the container fetcher and loader 'Jan Kiszka' via isar-users
2024-08-08  6:35 ` [PATCH v4 0/5] Introduce container fetcher and pre-loader Uladzimir Bely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=38ba708f-aacd-4f9b-a777-40a993335cc8@web.de \
    --to=isar-users@googlegroups.com \
    --cc=jan.kiszka@web.de \
    --cc=ubely@ilbers.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox