From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7327960466609668096 X-Received: by 2002:a05:6000:124d:b0:337:b02a:3f6b with SMTP id j13-20020a056000124d00b00337b02a3f6bmr352471wrx.48.1706173752552; Thu, 25 Jan 2024 01:09:12 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a5d:4c82:0:b0:339:48fa:cc09 with SMTP id z2-20020a5d4c82000000b0033948facc09ls944820wrs.2.-pod-prod-01-eu; Thu, 25 Jan 2024 01:09:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IE+jBAPRCVOEKl2XYFdBWEWjyZ1E6LDFlfc4cNxkuWBg4R8MnchFwfCkHmDwlW5if+1kvEd X-Received: by 2002:a05:600c:568a:b0:40d:90d1:2757 with SMTP id jt10-20020a05600c568a00b0040d90d12757mr319975wmb.229.1706173750544; Thu, 25 Jan 2024 01:09:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1706173750; cv=none; d=google.com; s=arc-20160816; b=oE6kMHk0AuqmCs5m7d2rv2Qt6hbztDdEzZAK+61tsiK6qg0uISx5tYZDgTtkwfcmt9 skqKxE9cVz66ek8Bl1NeN+qHYOjzwLBrX02KqMCgvMbo1UI40oYtlf4bsxJ0cDfSKsE7 tiP0csrHQSgS/Qi1bRGUxqQ16zchHjnKxxJVDYV1GQMWw9Wla9UXj8yUnCl5yThReJWm EuwUWO17kLFzeym1H4MWJjYEjWIEK1gvUyGXJUftxaYrMZn7ivcJYfowhgUFOAH32EhN jsBJiyDM7lqjqXJOyqu00PrTowybqnR81XCzSuDVN8eHWdc5eO2sn5iOHE8LZWHLC3oN gOiQ== 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:cc :to:from; bh=cKLb8cdKDjoNlU8a7sXREmaI4Px+WprPkt80vCZgQ/k=; fh=/h9QQkzJ8EboVkWg45aWwpaUro6WMavIVd2OhN45RtE=; b=e+T2zzKnQuJhEEfRvKBygT3NJQ8OwPyTQRgeJ8kVBDxqQeK959Icw/tctVKpKOgiqV PrvaiFKfID11nTrvxAoe8IU0ZfRs5QT0qoiJ/OyKfJS6z0cWcJYCoIDYPwPjGQovR+Ek zuyS8CT56RMtYaM+dZXRrLyP5WqYEOjK1ProoBqOHjK6vgiwIxEkPvVNGnj0dLEJXZ6L od3+/cR+c8BD+Y2fjogMtJZ1Mgz3beJutfiLgQxAKRQgs3gz7NLK2sktMcxDRxPMQkcP IvFvYYBe5kI0/t5/fuGcwWZHYaBlSpxzh+v6SdtB/iqN/08SeLLNgcOhGhKK9U5DhpDM lSMA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id f9-20020a05600c154900b0040ece9830a7si42773wmg.2.2024.01.25.01.09.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 25 Jan 2024 01:09:10 -0800 (PST) Received-SPF: pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Received: from user-B660.promwad.corp ([159.148.83.123]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 40P999fZ011220 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Jan 2024 10:09:09 +0100 From: Anton Mikanovich To: isar-users@googlegroups.com Cc: Anton Mikanovich Subject: [PATCH] CI: Restore downstream compatibility for startvm Date: Thu, 25 Jan 2024 11:09:02 +0200 Message-Id: <20240125090902.2946108-1-amikan@ilbers.de> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED 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-TUID: MoxnYjziaISZ Downstream CI should not generate running qemu machines if not using new options. That's why migrate from mandatory stop_vm=True option to optional keep=True. Default startvm call without any other options will stop qemu just like it behaved before adding keep alive ability. Signed-off-by: Anton Mikanovich --- testsuite/cibuilder.py | 8 ++--- testsuite/citest.py | 82 +++++++++++++++++------------------------- 2 files changed, 36 insertions(+), 54 deletions(-) diff --git a/testsuite/cibuilder.py b/testsuite/cibuilder.py index 0f2aa0f5..002a368b 100755 --- a/testsuite/cibuilder.py +++ b/testsuite/cibuilder.py @@ -562,7 +562,7 @@ BBPATH .= ":${LAYERDIR}"\ def vm_start(self, arch='amd64', distro='buster', enforce_pcbios=False, skip_modulecheck=False, image='isar-image-base', cmd=None, script=None, - stop_vm=False): + keep=False): time_to_wait = self.params.get('time_to_wait', default=DEF_VM_TO_SEC) self.log.info('===================================================') @@ -626,18 +626,18 @@ BBPATH .= ":${LAYERDIR}"\ rc, stdout, stderr = self.remote_run(cmd, script, timeout) if rc != 0: - if stop_vm: + if not keep: self.vm_turn_off(vm) self.fail('Failed to run test over ssh') else: multiconfig = 'mc:qemu' + arch + '-' + distro + ':' + image rc = self.vm_parse_output(boot_log, multiconfig, skip_modulecheck) if rc != 0: - if stop_vm: + if not keep: self.vm_turn_off(vm) self.fail('Failed to parse output') - if stop_vm: + if not keep: self.vm_turn_off(vm) return stdout, stderr diff --git a/testsuite/citest.py b/testsuite/citest.py index 7efe0059..cdeace56 100755 --- a/testsuite/citest.py +++ b/testsuite/citest.py @@ -61,18 +61,15 @@ class DevTest(CIBaseTest): def test_dev_run_amd64_bullseye(self): self.init() - self.vm_start('amd64', 'bullseye', image='isar-image-ci', - stop_vm=True) + self.vm_start('amd64', 'bullseye', image='isar-image-ci') def test_dev_run_arm64_bullseye(self): self.init() - self.vm_start('arm64', 'bullseye', - stop_vm=True) + self.vm_start('arm64', 'bullseye') def test_dev_run_arm_bullseye(self): self.init() - self.vm_start('arm', 'bullseye', skip_modulecheck=True, - stop_vm=True) + self.vm_start('arm', 'bullseye', skip_modulecheck=True) class ReproTest(CIBaseTest): @@ -311,8 +308,7 @@ class SingleTest(CIBaseTest): machine = self.params.get('machine', default='qemuamd64') distro = self.params.get('distro', default='bullseye') - self.vm_start(machine.removeprefix('qemu'), distro, - stop_vm=True) + self.vm_start(machine.removeprefix('qemu'), distro) class SourceTest(CIBaseTest): @@ -340,50 +336,47 @@ class VmBootTestFast(CIBaseTest): def test_arm_bullseye(self): self.init() - self.vm_start('arm','bullseye', image='isar-image-ci') + self.vm_start('arm','bullseye', image='isar-image-ci', keep=True) def test_arm_bullseye_example_module(self): self.init() self.vm_start('arm','bullseye', image='isar-image-ci', - cmd='lsmod | grep example_module') + cmd='lsmod | grep example_module', keep=True) def test_arm_bullseye_getty_target(self): self.init() self.vm_start('arm','bullseye', image='isar-image-ci', - script='test_systemd_unit.sh getty.target 10', - stop_vm=True) + script='test_systemd_unit.sh getty.target 10') def test_arm_buster(self): self.init() - self.vm_start('arm','buster', image='isar-image-ci') + self.vm_start('arm','buster', image='isar-image-ci', keep=True) def test_arm_buster_getty_target(self): self.init() self.vm_start('arm','buster', image='isar-image-ci', - cmd='systemctl is-active getty.target') + cmd='systemctl is-active getty.target', keep=True) def test_arm_buster_example_module(self): self.init() self.vm_start('arm','buster', image='isar-image-ci', - script='test_kernel_module.sh example_module', - stop_vm=True) + script='test_kernel_module.sh example_module') def test_arm_bookworm(self): self.init() - self.vm_start('arm','bookworm', image='isar-image-ci') + self.vm_start('arm','bookworm', image='isar-image-ci', keep=True) def test_arm_bookworm_example_module(self): self.init() self.vm_start('arm','bookworm', image='isar-image-ci', - cmd='lsmod | grep example_module') + cmd='lsmod | grep example_module', keep=True) def test_arm_bookworm_getty_target(self): self.init() self.vm_start('arm','bookworm', image='isar-image-ci', - script='test_systemd_unit.sh getty.target 10', - stop_vm=True) + script='test_systemd_unit.sh getty.target 10') class VmBootTestFull(CIBaseTest): @@ -396,103 +389,92 @@ class VmBootTestFull(CIBaseTest): def test_arm_bullseye(self): self.init() - self.vm_start('arm','bullseye', - stop_vm=True) + self.vm_start('arm','bullseye') def test_arm_buster(self): self.init() - self.vm_start('arm','buster', image='isar-image-ci') + self.vm_start('arm','buster', image='isar-image-ci', keep=True) def test_arm_buster_example_module(self): self.init() self.vm_start('arm','buster', image='isar-image-ci', - cmd='lsmod | grep example_module') + cmd='lsmod | grep example_module', keep=True) def test_arm_buster_getty_target(self): self.init() self.vm_start('arm','buster', image='isar-image-ci', - script='test_systemd_unit.sh getty.target 10', - stop_vm=True) + script='test_systemd_unit.sh getty.target 10') def test_arm64_bullseye(self): self.init() - self.vm_start('arm64','bullseye', image='isar-image-ci') + self.vm_start('arm64','bullseye', image='isar-image-ci', keep=True) def test_arm64_bullseye_getty_target(self): self.init() self.vm_start('arm64','bullseye', image='isar-image-ci', - cmd='systemctl is-active getty.target') + cmd='systemctl is-active getty.target', keep=True) def test_arm64_bullseye_example_module(self): self.init() self.vm_start('arm64','bullseye', image='isar-image-ci', - script='test_kernel_module.sh example_module', - stop_vm=True) + script='test_kernel_module.sh example_module') def test_i386_buster(self): self.init() - self.vm_start('i386','buster', - stop_vm=True) + self.vm_start('i386','buster') def test_amd64_buster(self): self.init() # test efi boot - self.vm_start('amd64','buster', image='isar-image-ci', - stop_vm=True) + self.vm_start('amd64','buster', image='isar-image-ci') # test pcbios boot - self.vm_start('amd64', 'buster', True, image='isar-image-ci', - stop_vm=True) + self.vm_start('amd64', 'buster', True, image='isar-image-ci') def test_amd64_focal(self): self.init() - self.vm_start('amd64','focal', image='isar-image-ci') + self.vm_start('amd64','focal', image='isar-image-ci', keep=True) def test_amd64_focal_example_module(self): self.init() self.vm_start('amd64','focal', image='isar-image-ci', - cmd='lsmod | grep example_module') + cmd='lsmod | grep example_module', keep=True) def test_amd64_focal_getty_target(self): self.init() self.vm_start('amd64','focal', image='isar-image-ci', - script='test_systemd_unit.sh getty.target 10', - stop_vm=True) + script='test_systemd_unit.sh getty.target 10') def test_amd64_bookworm(self): self.init() - self.vm_start('amd64', 'bookworm', image='isar-image-ci', - stop_vm=True) + self.vm_start('amd64', 'bookworm', image='isar-image-ci') def test_arm_bookworm(self): self.init() - self.vm_start('arm','bookworm', image='isar-image-ci', - stop_vm=True) + self.vm_start('arm','bookworm', image='isar-image-ci') def test_i386_bookworm(self): self.init() - self.vm_start('i386','bookworm', - stop_vm=True) + self.vm_start('i386','bookworm') def test_mipsel_bookworm(self): self.init() - self.vm_start('mipsel','bookworm', image='isar-image-ci') + self.vm_start('mipsel','bookworm', image='isar-image-ci', keep=True) def test_mipsel_bookworm_getty_target(self): self.init() self.vm_start('mipsel','bookworm', image='isar-image-ci', - cmd='systemctl is-active getty.target') + cmd='systemctl is-active getty.target', keep=True) def test_mipsel_bookworm_example_module(self): self.init() self.vm_start('mipsel','bookworm', image='isar-image-ci', - script='test_kernel_module.sh example_module', - stop_vm=True) + script='test_kernel_module.sh example_module') -- 2.34.1