diff --git a/.gitignore b/.gitignore index 21b508a..bf6304b 100644 --- a/.gitignore +++ b/.gitignore @@ -54,3 +54,4 @@ /os-autoinst-fdd1a2d8bdc9fdf9b23ae8f01b42b5092e6343dd.tar.gz /os-autoinst-ab6013d738344791507525e45cbd9f972a444968.tar.gz /os-autoinst-8a7a14fa5175e3ce1dbd0f59c2c2ec2d73c572d6.tar.gz +/os-autoinst-ddf414b8d83576d0f5373c15acd70ab2c3ea9fb8.tar.gz diff --git a/0001-18-qemu-options.t-drop-some-fragile-and-unnecessary-.patch b/0001-18-qemu-options.t-drop-some-fragile-and-unnecessary-.patch deleted file mode 100644 index 421fdfa..0000000 --- a/0001-18-qemu-options.t-drop-some-fragile-and-unnecessary-.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 2cef27f5bfd2ff9c415b74b2299cbf44f80975f4 Mon Sep 17 00:00:00 2001 -From: Adam Williamson -Date: Wed, 25 May 2022 14:46:08 -0700 -Subject: [PATCH 2/2] 18-qemu-options.t: drop some fragile and unnecessary - asserts - -It's really not our job to test exactly what qemu does when we -call it with `-M ? -version`, and that behaviour seems to vary -anyhow, so let's drop these. - -https://progress.opensuse.org/issues/111602 - -Signed-off-by: Adam Williamson ---- - t/18-qemu-options.t | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/t/18-qemu-options.t b/t/18-qemu-options.t -index 4ef4a015..80fcd797 100755 ---- a/t/18-qemu-options.t -+++ b/t/18-qemu-options.t -@@ -74,8 +74,6 @@ subtest qemu_append_option => sub { - run_isotovideo(@common_options, QEMU_APPEND => 'M ? -version'); - like($log, qr/-M \?/, '-M ? option added'); - like($log, qr/-version/, '-version option added'); -- like($log, qr/QEMU emulator version/, 'QEMU version printed'); -- unlike($log, qr/Supported machines are\:/, 'Supported machines not listed'); - unlike($log, qr/\: invalid option/, 'no invalid option detected'); - like($log, qr/QEMU terminated before QMP connection could be established/, 'connecting to QMP socket aborted'); - $ENV{QEMU_QMP_CONNECT_ATTEMPTS} = $qmp_connect_attempts; --- -2.36.1 - diff --git a/0001-Fix-perl-5.36-warnings-on-use-of-_-in-functions-with.patch b/0001-Fix-perl-5.36-warnings-on-use-of-_-in-functions-with.patch deleted file mode 100644 index 2bd9a26..0000000 --- a/0001-Fix-perl-5.36-warnings-on-use-of-_-in-functions-with.patch +++ /dev/null @@ -1,169 +0,0 @@ -From 16ab03c44a445257110ad96de4c0222f4a7f6789 Mon Sep 17 00:00:00 2001 -From: Adam Williamson -Date: Tue, 7 Jun 2022 09:12:09 -0700 -Subject: [PATCH] Fix perl 5.36 warnings on use of @_ in functions with - signature - -When running the test suite with perl 5.36 we get several warnings -about use (explicit or implict) of `@_` in functions with -signatures being 'experimental'. - -These fixes were all suggested by tinita (thanks). In some cases -we can just use the function arguments, in three cases that fill -buffers we have to drop the signatures, as you cannot assign to -`@_` without triggering the warning when using signatures, and we -don't see an obvious way to have these functions do anything else. -In console_proxy we also drop the signature; we considered calling -`$AUTOLOAD` with the args instead, but @kraih thinks that will -cause problems with stack traces. - -Signed-off-by: Adam Williamson ---- - backend/console_proxy.pm | 12 +++++++++--- - backend/svirt.pm | 2 +- - consoles/serial_screen.pm | 5 ++++- - consoles/ssh_screen.pm | 6 +++++- - t/21-needle-downloader.t | 2 +- - t/31-sshSerial.t | 7 ++++++- - 6 files changed, 26 insertions(+), 8 deletions(-) - -diff --git a/backend/console_proxy.pm b/backend/console_proxy.pm -index eea75a8c..01c30080 100644 ---- a/backend/console_proxy.pm -+++ b/backend/console_proxy.pm -@@ -24,18 +24,20 @@ sub DESTROY () { } - # handles the attempt to invoke an undefined method on the proxy console object - # using query_isotovideo() to invoke the method on the actual console object in - # the right process --sub AUTOLOAD ($self, @args) { -+sub AUTOLOAD { # no:style:signatures - my $function = our $AUTOLOAD; - - $function =~ s,.*::,,; - - # allow symbolic references - no strict 'refs'; -- *$AUTOLOAD = sub ($self, @args) { -+ *$AUTOLOAD = sub { # no:style:signatures -+ my $self = shift; -+ my $args = \@_; - my $wrapped_call = { - console => $self->{console}, - function => $function, -- args => \@args, -+ args => $args, - wantarray => wantarray, - }; - -@@ -52,6 +54,10 @@ sub AUTOLOAD ($self, @args) { - return wantarray ? @{$wrapped_retval->{result}} : $wrapped_retval->{result}; - }; - -+ # this is why we can't use a signature for this function, goto -+ # implicitly uses @_ and that triggers a warning in a function -+ # with a signature. We want to use goto to hide frames in stack -+ # traces (per @kraih) - goto &$AUTOLOAD; - } - -diff --git a/backend/svirt.pm b/backend/svirt.pm -index 9726467b..52d8583d 100644 ---- a/backend/svirt.pm -+++ b/backend/svirt.pm -@@ -85,7 +85,7 @@ sub do_stop_vm ($self, @) { - - # Log stdout and stderr and return them in a list (comped). - sub scp_get ($self, $src, $dest) { -- bmwqemu::log_call(@_); -+ bmwqemu::log_call($self, $src, $dest); - - my %credentials = $self->get_ssh_credentials(_is_hyperv ? 'hyperv' : 'default'); - my $ssh = $self->new_ssh_connection(%credentials); -diff --git a/consoles/serial_screen.pm b/consoles/serial_screen.pm -index d1b365ba..3db0433f 100644 ---- a/consoles/serial_screen.pm -+++ b/consoles/serial_screen.pm -@@ -122,7 +122,8 @@ An undefined timeout will cause to wait indefinitely. A timeout of 0 means to - just read once. - - =cut --sub do_read ($self, $, %args) { -+sub do_read { # no:style:signatures -+ my ($self, undef, %args) = @_; - my $buffer = ''; - $args{timeout} //= undef; # wait till data is available - $args{max_size} //= 2048; -@@ -139,6 +140,8 @@ sub do_read ($self, $, %args) { - $read = sysread($fd, $buffer, $args{max_size}); - croak "Failed to read from virtio/svirt serial console char device: $ERRNO" if !defined($read) && !($ERRNO{EAGAIN} || $ERRNO{EWOULDBLOCK}); - } -+ # this is why we can't use a signature for this function, -+ # assigning to @_ in a function with signature triggers a warning - $_[1] = $buffer; - return $read; - } -diff --git a/consoles/ssh_screen.pm b/consoles/ssh_screen.pm -index b84c38fb..052308f5 100644 ---- a/consoles/ssh_screen.pm -+++ b/consoles/ssh_screen.pm -@@ -27,7 +27,8 @@ sub new ($class, @args) { - return $self->SUPER::new($self->ssh_channel); - } - --sub do_read ($self, $, %args) { -+sub do_read { # no:style:signatures -+ my ($self, undef, %args) = @_; - my $buffer = ''; - $args{timeout} //= undef; # wait till data is available - $args{max_size} //= 2048; -@@ -37,6 +38,9 @@ sub do_read ($self, $, %args) { - while (!$args{timeout} || (consoles::serial_screen::elapsed($stime) < $args{timeout})) { - my $read = $self->ssh_channel->read($buffer, $args{max_size}); - if (defined($read)) { -+ # this is why we can't use a signature for this function, -+ # assigning to @_ in a function with signature triggers a -+ # warning - $_[1] = $buffer; - print {$self->{loghandle}} $buffer if $self->{loghandle}; - return $read; -diff --git a/t/21-needle-downloader.t b/t/21-needle-downloader.t -index 38b1bda9..3a680bc1 100755 ---- a/t/21-needle-downloader.t -+++ b/t/21-needle-downloader.t -@@ -20,7 +20,7 @@ my $user_agent_mock = Test::MockModule->new('Mojo::UserAgent'); - my @queried_urls; - $user_agent_mock->redefine(get => sub ($self, $url) { - push(@queried_urls, $url); -- return $user_agent_mock->original('get')->(@_); -+ return $user_agent_mock->original('get')->($self, $url); - }); - - # setup needle directory -diff --git a/t/31-sshSerial.t b/t/31-sshSerial.t -index f80bfaae..7e2ffdc6 100755 ---- a/t/31-sshSerial.t -+++ b/t/31-sshSerial.t -@@ -49,7 +49,9 @@ $mock_channel->mock(blocking => sub ($self, $arg = undef) { - return $self->{blocking}; - }); - --$mock_channel->mock(read => sub ($self, $, $size) { -+$mock_channel->mock(read => sub { # no:style:signatures -+ my ($self, undef, $size) = @_; -+ - my $data = shift @{$self->{read_queue}}; - - if (!defined($data)) { -@@ -62,6 +64,9 @@ $mock_channel->mock(read => sub ($self, $, $size) { - $data = substr($data, 0, $size); - } - -+ # this is why we can't use a signature for this function, -+ # assigning to @_ in a function with signature triggers a -+ # warning - $_[1] = $data; - return length($data); - }); --- -2.36.1 - diff --git a/os-autoinst.spec b/os-autoinst.spec index 75a8593..38df163 100644 --- a/os-autoinst.spec +++ b/os-autoinst.spec @@ -30,29 +30,21 @@ %global github_owner os-autoinst %global github_name os-autoinst %global github_version 4.6 -%global github_commit 8a7a14fa5175e3ce1dbd0f59c2c2ec2d73c572d6 +%global github_commit ddf414b8d83576d0f5373c15acd70ab2c3ea9fb8 # if set, will be a post-release snapshot build, otherwise a 'normal' build -%global github_date 20220530 +%global github_date 20220617 %global shortcommit %(c=%{github_commit}; echo ${c:0:7}) Name: os-autoinst Version: %{github_version}%{?github_date:^%{github_date}git%{shortcommit}} -Release: 2%{?dist} +Release: 3%{?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 -# Disable some unsafe checks in 18-qemu-options.t: -# https://progress.opensuse.org/issues/111602 -Patch1: 0001-18-qemu-options.t-drop-some-fragile-and-unnecessary-.patch # Disable some checks that fail on s390x: # https://progress.opensuse.org/issues/111608 -Patch2: 0002-NOT-UPSTREAMABLE-disable-test-that-fails-on-s390x.patch -# Fix a warning that breaks the test suite on perl 5.36 (thanks tinita): -# https://bugzilla.redhat.com/show_bug.cgi?id=2093181 -# https://progress.opensuse.org/issues/112130 -# https://github.com/os-autoinst/os-autoinst/pull/2075 -Patch3: 0001-Fix-perl-5.36-warnings-on-use-of-_-in-functions-with.patch +Patch0: 0002-NOT-UPSTREAMABLE-disable-test-that-fails-on-s390x.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 @@ -143,10 +135,8 @@ This package contains Open vSwitch support for os-autoinst. %prep %setup -n %{github_name}-%{github_commit} -q -%patch1 -p1 -%patch3 -p1 %ifarch s390x -%patch2 -p1 +%patch0 -p1 %endif %if 0%{?no_fullstack} @@ -200,10 +190,6 @@ export PROVE_ARGS="--timer -v" # 00-compile-check-all.t fails if this is present and Perl::Critic is # not installed rm tools/lib/perlcritic/Perl/Critic/Policy/*.pm -# patch the version code in the in-tree copy of isotovideo the same -# way the build process does for the installed version -# https://progress.opensuse.org/issues/111605 -sed -i -e "s,my\ \$thisversion\ =\ \(.*\);,my\ \$thisversion\ =\ '4.6';," isotovideo %ninja_build -C %{__cmake_builddir} check-pkg-build %post openvswitch @@ -257,6 +243,9 @@ sed -i -e "s,my\ \$thisversion\ =\ \(.*\);,my\ \$thisversion\ =\ '4.6';," isotov %files devel %changelog +* Fri Jun 17 2022 Adam Williamson - 4.6^20220617gitddf414b-3 +- Update to latest git, drop merged/superseded patches + * Tue Jun 07 2022 Adam Williamson - 4.6^20220530git8a7a14f-2 - Backport PR #2075 to fix warnings with perl 5.36 which break tests (#2093181) diff --git a/sources b/sources index 9842d9f..619c24e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (os-autoinst-8a7a14fa5175e3ce1dbd0f59c2c2ec2d73c572d6.tar.gz) = 4dc085f0cdef6e419b85818572c982e62c7c2ff1312f011efa6c1696b93735807cfff8893fc11004b47353bccb9bfca84e1c7de03d9b07949c66deef55512970 +SHA512 (os-autoinst-ddf414b8d83576d0f5373c15acd70ab2c3ea9fb8.tar.gz) = 973629123c6ba484113acc287afe2525e84a791fbc8aa01a8431fcd3cfa55bd2c7fce793f9c205a51cf26e212120b7f871c3a1236ab29e9c4f09fef974d54f26