diff --git a/.gitignore b/.gitignore index a232fb1..7731b37 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,4 @@ /os-autoinst-f21226c3b2c8987e5b5840dde04229e3298a07e0.tar.gz /os-autoinst-5361bf1c6c542b41f7dac978ca59e43e267789b0.tar.gz /os-autoinst-ad28b4b59369ada5731ebd7f0916bc2e52324988.tar.gz +/os-autoinst-627473ea5222dd4ad4cb0bfe82f0d5b5bcbe23c8.tar.gz diff --git a/1764.patch b/1764.patch deleted file mode 100644 index 98c7682..0000000 --- a/1764.patch +++ /dev/null @@ -1,85 +0,0 @@ -From 9e0a29dacf60cb63edf20b6558207691abcf40e8 Mon Sep 17 00:00:00 2001 -From: Marius Kittler -Date: Wed, 8 Sep 2021 17:21:57 +0200 -Subject: [PATCH] Fix `qemu-img` failure with QEMU 6.1.0 due to missing file - format - -* Specify format of backing file on image creation with `qemu-img` -* See https://progress.opensuse.org/issues/98117 ---- - OpenQA/Qemu/BlockDev.pm | 10 ++++++---- - t/18-qemu.t | 16 ++++++++-------- - 2 files changed, 14 insertions(+), 12 deletions(-) - -diff --git a/OpenQA/Qemu/BlockDev.pm b/OpenQA/Qemu/BlockDev.pm -index 19f70a98bf..99a970ddb6 100644 ---- a/OpenQA/Qemu/BlockDev.pm -+++ b/OpenQA/Qemu/BlockDev.pm -@@ -158,13 +158,15 @@ creating. - - =cut - sub gen_qemu_img_cmdlines { -- my $self = shift; -- my @cmdlns = defined $self->backing_file ? $self->backing_file->gen_qemu_img_cmdlines : (); -+ my $self = shift; -+ -+ my $backing_file = $self->backing_file; -+ my @cmdlns = defined $backing_file ? $backing_file->gen_qemu_img_cmdlines : (); - return @cmdlns unless $self->needs_creating; - - my @params = ('create', '-f', $self->driver); -- push(@params, ('-b', $self->backing_file->file)) -- if defined $self->backing_file; -+ push(@params, '-F', $backing_file->driver, '-b', $backing_file->file) -+ if defined $backing_file; - push(@params, $self->file); - push(@params, $self->size); - -diff --git a/t/18-qemu.t b/t/18-qemu.t -index 147ed8a2e4..2d15dc1850 100755 ---- a/t/18-qemu.t -+++ b/t/18-qemu.t -@@ -84,7 +84,7 @@ $bdc->add_existing_drive('hd1', '/abs/path/sle15-minimal.qcow2', 'virtio-blk', 2 - @gcmdl = $bdc->gen_cmdline(); - is_deeply(\@gcmdl, \@cmdl, 'Generate qemu command line for single existing drive'); - --@cmdl = ([qw(create -f qcow2 -b /abs/path/sle15-minimal.qcow2 raid/hd1-overlay0 22548578304)]); -+@cmdl = ([qw(create -f qcow2 -F qcow2 -b /abs/path/sle15-minimal.qcow2 raid/hd1-overlay0 22548578304)]); - @gcmdl = $bdc->gen_qemu_img_cmdlines(); - is_deeply(\@gcmdl, \@cmdl, 'Generate qemu-img command line for single existing drive'); - -@@ -114,7 +114,7 @@ $proc = qemu_proc('-foo', \%vars); - @gcmdl = $proc->gen_cmdline(); - is_deeply(\@gcmdl, \@cmdl, 'Generate qemu command line for single existing UEFI disk using vars'); - --@cmdl = ([qw(create -f qcow2 -b), "$Bin/data/Core-7.2.iso", qw(raid/hd0-overlay0 11116544)]); -+@cmdl = ([qw(create -f qcow2 -F qcow2 -b), "$Bin/data/Core-7.2.iso", qw(raid/hd0-overlay0 11116544)]); - @gcmdl = $proc->blockdev_conf->gen_qemu_img_cmdlines(); - is_deeply(\@gcmdl, \@cmdl, 'Generate qemu-img command line for single existing UEFI disk'); - -@@ -229,8 +229,8 @@ $proc->deserialise_state(path($path)->slurp()); - is_deeply(\@gcmdl, \@cmdl, 'Command line after snapshot and serialisation') - || diag(explain(\@gcmdl)); - --@cmdl = ([qw(create -f qcow2 -b raid/hd0 raid/hd0-overlay1 10G)], -- [qw(create -f qcow2 -b raid/cd0-overlay0 raid/cd0-overlay1 11116544)]); -+@cmdl = ([qw(create -f qcow2 -F qcow2 -b raid/hd0 raid/hd0-overlay1 10G)], -+ [qw(create -f qcow2 -F qcow2 -b raid/cd0-overlay0 raid/cd0-overlay1 11116544)]); - @gcmdl = $bdc->gen_qemu_img_cmdlines(); - is_deeply(\@gcmdl, \@cmdl, 'Generate reverted snapshot images'); - -@@ -384,10 +384,10 @@ subtest 'relative assets' => sub { - symlink("$Bin/data/Core-7.2.iso", "./Core-7.2.iso"); - $proc = qemu_proc('-foo', \%vars); - my @gcmdl = $proc->blockdev_conf->gen_qemu_img_cmdlines(); -- @cmdl = map { [qw(create -f qcow2 -b), "$dir/Core-7.2.iso", "raid/$_-overlay0", 11116544] } qw(hd0 cd0 cd1); -- push @cmdl, ["create", "-f", "qcow2", "-b", "$Bin/data/uefi-code.bin", "raid/pflash-code-overlay0", 1966080]; -- push @cmdl, ["create", "-f", "qcow2", "-b", "$dir/Core-7.2.iso", "raid/pflash-vars-overlay0", 11116544]; -- is_deeply(\@gcmdl, \@cmdl, 'find the asset real path'); -+ @cmdl = map { [qw(create -f qcow2 -F), $_ eq 'hd0' ? 'qcow2' : 'raw', '-b', "$dir/Core-7.2.iso", "raid/$_-overlay0", 11116544] } qw(hd0 cd0 cd1); -+ push @cmdl, [qw(create -f qcow2 -F raw -b), "$Bin/data/uefi-code.bin", "raid/pflash-code-overlay0", 1966080]; -+ push @cmdl, [qw(create -f qcow2 -F raw -b), "$dir/Core-7.2.iso", "raid/pflash-vars-overlay0", 11116544]; -+ is_deeply(\@gcmdl, \@cmdl, 'find the asset real path') or diag explain \@gcmdl; - }; - - subtest 'qemu was killed due to the system being out of memory' => sub { diff --git a/1765.patch b/1765.patch deleted file mode 100644 index ab8cd30..0000000 --- a/1765.patch +++ /dev/null @@ -1,102 +0,0 @@ -From 489916d5a18113365a97eb3181cbb6c5e351c467 Mon Sep 17 00:00:00 2001 -From: Marius Kittler -Date: Wed, 8 Sep 2021 18:20:52 +0200 -Subject: [PATCH] Deduce format of backing file from extension - -* So even if we assign an ISO as HDD_x we would use the correct parameter - `-F raw` (and not `-F qcow2`) -* See https://github.com/os-autoinst/os-autoinst/pull/1764/files#r704549754 - and https://progress.opensuse.org/issues/98117 ---- - OpenQA/Qemu/BlockDev.pm | 4 +++- - OpenQA/Qemu/BlockDevConf.pm | 10 ++++------ - t/18-qemu.t | 16 +++++++++++----- - 3 files changed, 18 insertions(+), 12 deletions(-) - -diff --git a/OpenQA/Qemu/BlockDev.pm b/OpenQA/Qemu/BlockDev.pm -index 99a970ddb6..58f226fc65 100644 ---- a/OpenQA/Qemu/BlockDev.pm -+++ b/OpenQA/Qemu/BlockDev.pm -@@ -33,7 +33,7 @@ weakened. - =cut - - package OpenQA::Qemu::BlockDev; --use Mojo::Base 'OpenQA::Qemu::MutParams'; -+use Mojo::Base 'OpenQA::Qemu::MutParams', -signatures; - - use Scalar::Util 'weaken'; - use OpenQA::Qemu::SnapshotConf; -@@ -216,6 +216,8 @@ sub _from_map { - ->snapshot($snap_conf->get_snapshot(sequence => $this->{snapshot})); - } - -+sub deduce_driver ($self) { $self->driver($self->file =~ qr/\.qcow2$/ ? 'qcow2' : 'raw') } -+ - sub CARP_TRACE { 'OpenQA::Qemu::BlockDev(' . (shift->node_name || '') . ')' } - - 1; -diff --git a/OpenQA/Qemu/BlockDevConf.pm b/OpenQA/Qemu/BlockDevConf.pm -index 2b8dacbf32..bac282dfbc 100644 ---- a/OpenQA/Qemu/BlockDevConf.pm -+++ b/OpenQA/Qemu/BlockDevConf.pm -@@ -131,7 +131,7 @@ new overlay is created so that the existing qcow2 image is not modified. - sub add_existing_drive { - my ($self, $id, $file_name, $model, $size, $num_queues) = @_; - -- my $base_drive = $self->add_existing_base($id, $file_name, $size)->implicit(1); -+ my $base_drive = $self->add_existing_base($id, $file_name, $size)->implicit(1)->deduce_driver; - my $overlay = $self->add_new_overlay($id . OVERLAY_POSTFIX . '0', $base_drive); - - return $self->_push_new_drive_dev($id, $overlay, $model, $num_queues); -@@ -164,11 +164,9 @@ variables. See the OpenQA::Qemu::PFlashDevice class. - =cut - sub add_pflash_drive { - my ($self, $id, $file_name, $size) = @_; -- my $base_drive = $self->add_existing_base($id, $file_name, $size) -- ->implicit(1) -- ->driver($file_name =~ qr/\.qcow2$/ ? 'qcow2' : 'raw'); -- my $overlay = $self->add_new_overlay($id . OVERLAY_POSTFIX . '0', $base_drive); -- my $pflash = OpenQA::Qemu::PFlashDevice->new() -+ my $base_drive = $self->add_existing_base($id, $file_name, $size)->implicit(1)->deduce_driver; -+ my $overlay = $self->add_new_overlay($id . OVERLAY_POSTFIX . '0', $base_drive); -+ my $pflash = OpenQA::Qemu::PFlashDevice->new() - ->id($id) - ->drive($overlay); - -diff --git a/t/18-qemu.t b/t/18-qemu.t -index 2d15dc1850..9483b296d4 100755 ---- a/t/18-qemu.t -+++ b/t/18-qemu.t -@@ -114,7 +114,7 @@ $proc = qemu_proc('-foo', \%vars); - @gcmdl = $proc->gen_cmdline(); - is_deeply(\@gcmdl, \@cmdl, 'Generate qemu command line for single existing UEFI disk using vars'); - --@cmdl = ([qw(create -f qcow2 -F qcow2 -b), "$Bin/data/Core-7.2.iso", qw(raid/hd0-overlay0 11116544)]); -+@cmdl = ([qw(create -f qcow2 -F raw -b), "$Bin/data/Core-7.2.iso", qw(raid/hd0-overlay0 11116544)]); - @gcmdl = $proc->blockdev_conf->gen_qemu_img_cmdlines(); - is_deeply(\@gcmdl, \@cmdl, 'Generate qemu-img command line for single existing UEFI disk'); - -@@ -380,13 +380,19 @@ subtest DriveDevice => sub { - }; - - subtest 'relative assets' => sub { -- $vars{$_} = "Core-7.2.iso" for qw(ISO ISO_1 HDD_1 UEFI_PFLASH_VARS); -+ $vars{$_} = "Core-7.2.iso" for qw(ISO ISO_1 UEFI_PFLASH_VARS); -+ $vars{$_} = "some.qcow2" for qw(HDD_1 UEFI_PFLASH_VARS); - symlink("$Bin/data/Core-7.2.iso", "./Core-7.2.iso"); -+ path('./some.qcow2')->spurt('123'); - $proc = qemu_proc('-foo', \%vars); - my @gcmdl = $proc->blockdev_conf->gen_qemu_img_cmdlines(); -- @cmdl = map { [qw(create -f qcow2 -F), $_ eq 'hd0' ? 'qcow2' : 'raw', '-b', "$dir/Core-7.2.iso", "raid/$_-overlay0", 11116544] } qw(hd0 cd0 cd1); -- push @cmdl, [qw(create -f qcow2 -F raw -b), "$Bin/data/uefi-code.bin", "raid/pflash-code-overlay0", 1966080]; -- push @cmdl, [qw(create -f qcow2 -F raw -b), "$dir/Core-7.2.iso", "raid/pflash-vars-overlay0", 11116544]; -+ @cmdl = ( -+ [qw(create -f qcow2 -F qcow2 -b), "$dir/some.qcow2", "raid/hd0-overlay0", 512], -+ [qw(create -f qcow2 -F raw -b), "$dir/Core-7.2.iso", "raid/cd0-overlay0", 11116544], -+ [qw(create -f qcow2 -F raw -b), "$dir/Core-7.2.iso", "raid/cd1-overlay0", 11116544], -+ [qw(create -f qcow2 -F raw -b), "$Bin/data/uefi-code.bin", "raid/pflash-code-overlay0", 1966080], -+ [qw(create -f qcow2 -F qcow2 -b), "$dir/some.qcow2", "raid/pflash-vars-overlay0", 512], -+ ); - is_deeply(\@gcmdl, \@cmdl, 'find the asset real path') or diag explain \@gcmdl; - }; - diff --git a/os-autoinst.spec b/os-autoinst.spec index da96f75..fe6fc93 100644 --- a/os-autoinst.spec +++ b/os-autoinst.spec @@ -2,22 +2,16 @@ # https://build.opensuse.org/package/view_file/devel:openQA/os-autoinst/os-autoinst.spec # License: GPLv2+ -# Full stack test only runs reliably on x86 +# Full stack test only runs reliably on these arches, and they're all +# we really care about %ifnarch %{ix86} x86_64 %global no_fullstack 1 %endif -# 18-qemu-options.t broken on 32-bit ARM on F30 2019/08 -# works on F31, works in a mock root...really not worth debugging more -# 14-isotovideo.t also broken since ~2020/04, os-autoinst apparently -# does not run in first subtest, can't figure out why not -%ifarch %{arm} s390x -%global no_options 1 -%global no_isotovideo 1 -%endif -%ifarch %{arm} -# 18-qemu.t broken since the 'qemu was killed due to the system being out of memory' -# subtest got added. could just patch that out, but it's work. -%global no_qemu 1 + +# This test fails intermittently on these arches, weird bug: +# https://github.com/mudler/Mojo-IOLoop-ReadWriteProcess/issues/20 +%ifarch ppc64le s390x +%global no_osutils 1 %endif # os-autoinst has a bunch of annoyingly-badly-named private modules, @@ -36,23 +30,18 @@ %global github_owner os-autoinst %global github_name os-autoinst %global github_version 4.6 -%global github_commit ad28b4b59369ada5731ebd7f0916bc2e52324988 +%global github_commit 627473ea5222dd4ad4cb0bfe82f0d5b5bcbe23c8 # if set, will be a post-release snapshot build, otherwise a 'normal' build -%global github_date 20210803 +%global github_date 20211126 %global shortcommit %(c=%{github_commit}; echo ${c:0:7}) Name: os-autoinst Version: %{github_version} -Release: 42%{?github_date:.%{github_date}git%{shortcommit}}%{?dist} +Release: 43%{?github_date:.%{github_date}git%{shortcommit}}%{?dist} Summary: OS-level test automation License: GPLv2+ URL: https://os-autoinst.github.io/openQA/ Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{github_name}-%{github_commit}.tar.gz -# Fix qemu-img invocation with qemu 6.1.0 (next two patches) -# https://github.com/os-autoinst/os-autoinst/pull/1764 -Patch0: 1764.patch -# https://github.com/os-autoinst/os-autoinst/pull/1765 -Patch1: 1765.patch # on SUSE this is conditional, for us it doesn't have to be but we # still use a macro just to keep build_requires similar for ease of @@ -71,7 +60,7 @@ Patch1: 1765.patch # which does not exist in Fedora - we have perl(base) in # main_requires_additional and the perl(:MODULE_COMPAT) require below # The following line is generated from dependencies.yaml (upstream) -%define main_requires %main_requires_additional git-core perl(B::Deparse) perl(Carp) perl(Carp::Always) perl(Class::Accessor::Fast) perl(Config) perl(Cpanel::JSON::XS) perl(Crypt::DES) perl(Cwd) perl(Data::Dumper) perl(Digest::MD5) perl(DynaLoader) perl(English) perl(Errno) perl(Exception::Class) perl(Exporter) perl(ExtUtils::testlib) perl(Fcntl) perl(File::Basename) perl(File::Find) perl(File::Path) perl(File::Spec) perl(File::Temp) perl(File::Touch) perl(File::Which) perl(File::chdir) perl(IO::Handle) perl(IO::Scalar) perl(IO::Select) perl(IO::Socket) perl(IO::Socket::INET) perl(IO::Socket::UNIX) perl(IPC::Open3) perl(IPC::Run::Debug) perl(IPC::System::Simple) perl(List::MoreUtils) perl(List::Util) perl(Mojo::IOLoop::ReadWriteProcess) >= 0.26 perl(Mojo::JSON) perl(Mojo::Log) perl(Mojo::URL) perl(Mojo::UserAgent) perl(Mojolicious) >= 8.42 perl(Mojolicious::Lite) perl(Net::DBus) perl(Net::IP) perl(Net::SNMP) perl(Net::SSH2) perl(POSIX) perl(Scalar::Util) perl(Socket) perl(Socket::MsgHdr) perl(Term::ANSIColor) perl(Thread::Queue) perl(Time::HiRes) perl(Time::Seconds) perl(Try::Tiny) perl(XML::LibXML) perl(XML::SemanticDiff) perl(autodie) perl(base) perl(constant) perl(integer) perl(strict) perl(version) perl(warnings) +%define main_requires %main_requires_additional git-core perl(B::Deparse) perl(Carp) perl(Carp::Always) perl(Class::Accessor::Fast) perl(Config) perl(Cpanel::JSON::XS) perl(Crypt::DES) perl(Cwd) perl(Data::Dumper) perl(Digest::MD5) perl(DynaLoader) perl(English) perl(Errno) perl(Exception::Class) perl(Exporter) perl(ExtUtils::testlib) perl(Fcntl) perl(File::Basename) perl(File::Find) perl(File::Path) perl(File::Temp) perl(File::Touch) perl(File::Which) perl(File::chdir) perl(IO::Handle) perl(IO::Scalar) perl(IO::Select) perl(IO::Socket) perl(IO::Socket::INET) perl(IO::Socket::UNIX) perl(IPC::Open3) perl(IPC::Run::Debug) perl(IPC::System::Simple) perl(List::MoreUtils) perl(List::Util) perl(Mojo::IOLoop::ReadWriteProcess) >= 0.26 perl(Mojo::JSON) perl(Mojo::Log) perl(Mojo::URL) perl(Mojo::UserAgent) perl(Mojolicious) >= 8.42 perl(Mojolicious::Lite) perl(Net::DBus) perl(Net::IP) perl(Net::SNMP) perl(Net::SSH2) perl(POSIX) perl(Scalar::Util) perl(Socket) perl(Socket::MsgHdr) perl(Term::ANSIColor) perl(Thread::Queue) perl(Time::HiRes) perl(Time::Moment) perl(Time::Seconds) perl(Try::Tiny) perl(XML::LibXML) perl(XML::SemanticDiff) perl(autodie) perl(base) perl(constant) perl(integer) perl(strict) perl(version) perl(warnings) # diff from SUSE: SUSE has python3-yamllint, Fedora has just yamllint # The following line is generated from dependencies.yaml (upstream) %define yamllint_requires yamllint @@ -101,13 +90,14 @@ BuildRequires: perl(Mojo::File) # tinycv is a compiled public module, so we should have this Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) Recommends: tesseract -Recommends: qemu >= 2.0.0 +Recommends: qemu >= 4.0.0 Recommends: qemu-kvm Recommends: /usr/bin/qemu-img BuildRequires: %test_requires %test_version_only_requires Requires: %main_requires Requires(pre): %{_bindir}/getent Requires(pre): %{_sbindir}/useradd +ExcludeArch: %{arm} %description The OS-autoinst project aims at providing a means to run fully @@ -145,17 +135,9 @@ sed -i 's/ my $thisversion = qx{git.*rev-parse HEAD}.*;/ my $thisversion = "%{v rm -f t/99-full-stack.t %endif # no_fullstack -%if 0%{?no_options} -rm -f t/18-qemu-options.t -%endif - -%if 0%{?no_qemu} -rm -f t/18-qemu.t -%endif - -%if 0%{?no_isotovideo} -rm -f t/14-isotovideo.t -%endif +%if 0%{?no_osutils} +rm -f t/13-osutils.t +%endif # no_osutils # Tesseract 4.0.0 (in Rawhide as of 2018-11) fails utterly to OCR # the test needle properly: @@ -188,6 +170,9 @@ export NO_BRP_STALE_LINK_ERROR=yes %check export CI=1 +# account for sporadic slowness in build environments +# https://progress.opensuse.org/issues/89059 +export OPENQA_TEST_TIMEOUT_SCALE_CI=20 # 00-compile-check-all.t fails if this is present and Perl::Critic is # not installed rm tools/lib/perlcritic/Perl/Critic/Policy/*.pm @@ -242,6 +227,11 @@ rm tools/lib/perlcritic/Perl/Critic/Policy/*.pm %files devel %changelog +* Thu Nov 25 2021 Adam Williamson - 4.6-43.20211126git627473e +- Update to latest git, resync spec +- Don't build on 32-bit ARM (tests indicate it doesn't really work anyway) +- Update test exclusions + * Fri Sep 03 2021 Adam Williamson - 4.6-42.20210803gitad28b4b - Fix qemu-img invocation with qemu 6.1.0 (specify backing file format) diff --git a/sources b/sources index 2ecadf8..b617fe9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (os-autoinst-ad28b4b59369ada5731ebd7f0916bc2e52324988.tar.gz) = 18dca7ea8d587953aa0823e376c7bd8197c3fbd2a1c57d148a5946a2edf4bfe02c8ad81067c950166719c906c7170a79935f8fd4baea6df1dd0f3844097c983c +SHA512 (os-autoinst-627473ea5222dd4ad4cb0bfe82f0d5b5bcbe23c8.tar.gz) = ce2092237fe81e67fa5292d0ffd1d08f9deda9828831a7794599669067799d77bdff2282fcc760884815d7edfcf5972f4466c6e70caea1dd07ea835d5b0867d4