* [PATCH] CI: Restore downstream compatibility for startvm
@ 2024-01-25 9:09 Anton Mikanovich
2024-01-25 9:11 ` Anton Mikanovich
2024-01-31 14:42 ` Uladzimir Bely
0 siblings, 2 replies; 3+ messages in thread
From: Anton Mikanovich @ 2024-01-25 9:09 UTC (permalink / raw)
To: isar-users; +Cc: Anton Mikanovich
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 <amikan@ilbers.de>
---
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] CI: Restore downstream compatibility for startvm
2024-01-25 9:09 [PATCH] CI: Restore downstream compatibility for startvm Anton Mikanovich
@ 2024-01-25 9:11 ` Anton Mikanovich
2024-01-31 14:42 ` Uladzimir Bely
1 sibling, 0 replies; 3+ messages in thread
From: Anton Mikanovich @ 2024-01-25 9:11 UTC (permalink / raw)
To: isar-users
25/01/2024 11:09, Anton Mikanovich wrote:
> 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 <amikan@ilbers.de>
This patch should be placed on the top of: `[PATCH 0/4] Improve variables
obtaining in CI` patchset (but not depend on it).
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] CI: Restore downstream compatibility for startvm
2024-01-25 9:09 [PATCH] CI: Restore downstream compatibility for startvm Anton Mikanovich
2024-01-25 9:11 ` Anton Mikanovich
@ 2024-01-31 14:42 ` Uladzimir Bely
1 sibling, 0 replies; 3+ messages in thread
From: Uladzimir Bely @ 2024-01-31 14:42 UTC (permalink / raw)
To: Anton Mikanovich, isar-users
On Thu, 2024-01-25 at 11:09 +0200, Anton Mikanovich wrote:
> 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 <amikan@ilbers.de>
> ---
> testsuite/cibuilder.py | 8 ++---
> testsuite/citest.py | 82 +++++++++++++++++-----------------------
> --
> 2 files changed, 36 insertions(+), 54 deletions(-)
Applied to next.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-01-31 14:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-25 9:09 [PATCH] CI: Restore downstream compatibility for startvm Anton Mikanovich
2024-01-25 9:11 ` Anton Mikanovich
2024-01-31 14:42 ` Uladzimir Bely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox