Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package os-autoinst for openSUSE:Factory 
checked in at 2026-10-01 16:42:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/os-autoinst (Old)
 and      /work/SRC/openSUSE:Factory/.os-autoinst.new.1253 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "os-autoinst"

Thu Oct  1 16:42:05 2026 rev:626 rq:1381552 version:5.1790705326.6badaca

Changes:
--------
--- /work/SRC/openSUSE:Factory/os-autoinst/os-autoinst.changes  2026-09-29 
17:49:57.599656329 +0200
+++ /work/SRC/openSUSE:Factory/.os-autoinst.new.1253/os-autoinst.changes        
2026-10-01 16:43:54.005131094 +0200
@@ -1,0 +2,13 @@
+Tue Sep 29 18:08:59 UTC 2026 - [email protected]
+
+- Update to version 5.1790705326.6badaca:
+  * test: Update tests after 111e01b69 was merged
+  * feat: Record failures during post fail hook "Failed (post)"
+  * feat: Record info about entering post fail hook
+  * feat: Record failures during post fail hook as such
+  * feat: Record failures that happened during `post_fail_hook`
+  * refactor: Move handling test exceptions into a separate function
+  * feat: Make offset between NICs configurable
+  * fix: Fix typo in QEMU backend comment
+
+-------------------------------------------------------------------

Old:
----
  os-autoinst-5.1790592325.87022d5.obscpio

New:
----
  os-autoinst-5.1790705326.6badaca.obscpio

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ os-autoinst-devel-test.spec ++++++
--- /var/tmp/diff_new_pack.GMVysD/_old  2026-10-01 16:43:55.364188066 +0200
+++ /var/tmp/diff_new_pack.GMVysD/_new  2026-10-01 16:43:55.366188149 +0200
@@ -18,7 +18,7 @@
 
 %define         short_name os-autoinst-devel
 Name:           %{short_name}-test
-Version:        5.1790592325.87022d5
+Version:        5.1790705326.6badaca
 Release:        0
 Summary:        Test package for %{short_name}
 License:        GPL-2.0-or-later

++++++ os-autoinst-openvswitch-test.spec ++++++
--- /var/tmp/diff_new_pack.GMVysD/_old  2026-10-01 16:43:55.398189491 +0200
+++ /var/tmp/diff_new_pack.GMVysD/_new  2026-10-01 16:43:55.400189575 +0200
@@ -19,7 +19,7 @@
 %define name_ext -test
 %define         short_name os-autoinst-openvswitch
 Name:           %{short_name}%{?name_ext}
-Version:        5.1790592325.87022d5
+Version:        5.1790705326.6badaca
 Release:        0
 Summary:        test package for %{short_name}
 License:        GPL-2.0-or-later

++++++ os-autoinst-test.spec ++++++
--- /var/tmp/diff_new_pack.GMVysD/_old  2026-10-01 16:43:55.428190748 +0200
+++ /var/tmp/diff_new_pack.GMVysD/_new  2026-10-01 16:43:55.430190832 +0200
@@ -19,7 +19,7 @@
 %define name_ext -test
 %define         short_name os-autoinst
 Name:           %{short_name}%{?name_ext}
-Version:        5.1790592325.87022d5
+Version:        5.1790705326.6badaca
 Release:        0
 Summary:        test package for os-autoinst
 License:        GPL-2.0-or-later

++++++ os-autoinst.spec ++++++
--- /var/tmp/diff_new_pack.GMVysD/_old  2026-10-01 16:43:55.463192216 +0200
+++ /var/tmp/diff_new_pack.GMVysD/_new  2026-10-01 16:43:55.465192300 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           os-autoinst
-Version:        5.1790592325.87022d5
+Version:        5.1790705326.6badaca
 Release:        0
 Summary:        OS-level test automation
 License:        GPL-2.0-or-later

++++++ os-autoinst-5.1790592325.87022d5.obscpio -> 
os-autoinst-5.1790705326.6badaca.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/os-autoinst-5.1790592325.87022d5/backend/qemu.pm 
new/os-autoinst-5.1790705326.6badaca/backend/qemu.pm
--- old/os-autoinst-5.1790592325.87022d5/backend/qemu.pm        2026-09-28 
12:45:25.000000000 +0200
+++ new/os-autoinst-5.1790705326.6badaca/backend/qemu.pm        2026-09-29 
20:08:46.000000000 +0200
@@ -823,17 +823,18 @@
     @tapscript = split /\s*,\s*/, $vars->{TAPSCRIPT} if $vars->{TAPSCRIPT};
     @tapdownscript = split /\s*,\s*/, $vars->{TAPDOWNSCRIPT} if 
$vars->{TAPDOWNSCRIPT};
 
+    my $nic_offset = $vars->{NICOFFSET} // 64;
     my $num_networks = $vars->{OFFLINE_SUT} ? 0 : max(1, scalar @nicmac, 
scalar @nicvlan, scalar @tapdev);
     for (my $i = 0; $i < $num_networks; $i++) {
         # ensure MAC addresses differ globally
         # and allow MAC addresses for more than 256 workers (up to 16384)
         my $workerid = $vars->{WORKER_ID};
-        $nicmac[$i] //= sprintf '52:54:00:12:%02x:%02x', int($workerid / 256) 
+ $i * 64, $workerid % 256;
+        $nicmac[$i] //= sprintf '52:54:00:12:%02x:%02x', int($workerid / 256) 
+ $i * $nic_offset, $workerid % 256;
 
         # always set proper TAPDEV for os-autoinst when using tap network mode
         my $instance = ($vars->{WORKER_INSTANCE} || 'manual') eq 'manual' ? 
255 : $vars->{WORKER_INSTANCE};
-        # use $instance for tap name so it is predicable, network is still 
configured staticaly
-        $tapdev[$i] = 'tap' . ($instance - 1 + $i * 64) if 
!defined($tapdev[$i]) || $tapdev[$i] eq 'auto';
+        # use $instance for tap name so it is predicable, network is still 
configured statically
+        $tapdev[$i] = 'tap' . ($instance - 1 + $i * $nic_offset) if 
!defined($tapdev[$i]) || $tapdev[$i] eq 'auto';
         my $vlan = (@nicvlan) ? $nicvlan[-1] : 0;
         $nicvlan[$i] //= $vlan;
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/os-autoinst-5.1790592325.87022d5/basetest.pm 
new/os-autoinst-5.1790705326.6badaca/basetest.pm
--- old/os-autoinst-5.1790592325.87022d5/basetest.pm    2026-09-28 
12:45:25.000000000 +0200
+++ new/os-autoinst-5.1790705326.6badaca/basetest.pm    2026-09-29 
20:08:46.000000000 +0200
@@ -292,8 +292,12 @@
     my $post_fail_hook_start_time = time;
     unless ($bmwqemu::vars{_SKIP_POST_FAIL_HOOKS}) {
         $self->{post_fail_hook_running} = 1;
+        $self->record_resultfile('Post-fail', 'Entering post fail hook', 
result => 'unk');
         try { $self->post_fail_hook }
-        catch ($e) { bmwqemu::diag("post_fail_hook failed: $e") }    # 
uncoverable statement
+        catch ($e) {
+            $self->_handle_test_exception($e, 'Post fail hook', 
"Failed\n(post)");
+            bmwqemu::diag("post_fail_hook failed: $e");
+        }
         $self->{post_fail_hook_running} = 0;
 
         # There might be more messages on serial now.
@@ -316,6 +320,52 @@
     bmwqemu::modstate(sprintf 'finished %s %s (runtime: %d s)', $self->{name}, 
$self->{category}, $self->{execution_time});
 }
 
+sub _handle_test_exception ($self, $e, $what, $type, $died = undef) {
+    # copy the exception early
+    my $internal = 
Exception::Class->caught('OpenQA::Exception::InternalException');
+
+    my $stacktrace = [];
+    my $error_message = "$e";
+    if ((ref $e) =~ 'OpenQA::Exception::(?:TestapiError|FailedNeedle)') {
+        my $s = $e->error;
+        while (my $frame = $e->trace->next_frame) {
+            push @$stacktrace, {filename => $frame->filename, line => 
$frame->line, sub => $frame->subroutine, frame => $frame->as_string};
+        }
+        $stacktrace = bmwqemu::filter_stack_trace($stacktrace);
+    }
+    elsif ($error_message =~ m/ at ((\S+) line (\d+))/) {
+        $stacktrace = bmwqemu::filter_stack_trace([{filename => $2, line => 
$3, frame => $1}]);
+    }
+
+    $self->{result} = 'fail';
+    # add a fail screenshot in case there is none
+    if (!@{$self->{details}} || ($self->{details}->[-1]->{result} || '') ne 
'fail') {
+        bmwqemu::update_line_number([reverse @$stacktrace]);
+        $self->take_screenshot();
+    }
+    if (!$internal && $error_message =~ /Can't locate .+ in \@INC/) {
+        my $msg = "# $what died with missing dependency: $e";
+        bmwqemu::fctinfo($msg);
+        bmwqemu::update_line_number();
+        $self->record_resultfile($type, $msg, result => 'fail');
+        $self->{fatal_failure} = 1;
+        bmwqemu::serialize_state(component => 'tests', msg => "Missing Perl 
module: $e", result => 'incomplete');
+        $$died = 1 if $died;
+    }
+    # show a text result with the die message unless the die was internally 
generated
+    if (!$internal) {
+        my $msg = "# $what died: $error_message";
+        if (@$stacktrace) {
+            $msg .= "\n--- # stack trace\n" . (join '', map { $_->{frame} . 
"\n" } @$stacktrace);
+        }
+        bmwqemu::fctinfo($msg);
+        bmwqemu::update_line_number([reverse @$stacktrace]);
+        $self->record_resultfile($type, $msg, result => 'fail');
+        $$died = 1 if $died;
+    }
+    return $error_message;
+}
+
 sub runtest ($self) {
     $self->{test_start_time} = time;
 
@@ -329,50 +379,7 @@
         $self->post_run_hook();
     }
     catch ($e) {
-        # copy the exception early
-        my $internal = 
Exception::Class->caught('OpenQA::Exception::InternalException');
-
-        my $stacktrace = [];
-        $error_message = "$e";
-        if ((ref $e) =~ 'OpenQA::Exception::(?:TestapiError|FailedNeedle)') {
-            my $s = $e->error;
-            while (my $frame = $e->trace->next_frame) {
-                push @$stacktrace, {filename => $frame->filename, line => 
$frame->line, sub => $frame->subroutine, frame => $frame->as_string};
-            }
-            $stacktrace = bmwqemu::filter_stack_trace($stacktrace);
-        }
-        else {
-            if ($error_message =~ m/ at ((\S+) line (\d+))/) {
-                $stacktrace = bmwqemu::filter_stack_trace([{filename => $2, 
line => $3, frame => $1}]);
-            }
-        }
-
-        $self->{result} = 'fail';
-        # add a fail screenshot in case there is none
-        if (!@{$self->{details}} || ($self->{details}->[-1]->{result} || '') 
ne 'fail') {
-            bmwqemu::update_line_number([reverse @$stacktrace]);
-            $self->take_screenshot();
-        }
-        if (!$internal && $error_message =~ /Can't locate .+ in \@INC/) {
-            my $msg = "# Test died with missing dependency: $e";
-            bmwqemu::fctinfo($msg);
-            bmwqemu::update_line_number();
-            $self->record_resultfile('Failed', $msg, result => 'fail');
-            $self->{fatal_failure} = 1;
-            bmwqemu::serialize_state(component => 'tests', msg => "Missing 
Perl module: $e", result => 'incomplete');
-            $died = 1;
-        }
-        # show a text result with the die message unless the die was 
internally generated
-        if (!$internal) {
-            my $msg = "# Test died: $error_message";
-            if (@$stacktrace) {
-                $msg .= "\n--- # stack trace\n" . (join '', map { $_->{frame} 
. "\n" } @$stacktrace);
-            }
-            bmwqemu::fctinfo($msg);
-            bmwqemu::update_line_number([reverse @$stacktrace]);
-            $self->record_resultfile('Failed', $msg, result => 'fail');
-            $died = 1;
-        }
+        $error_message = $self->_handle_test_exception($e, 'Test', 'Failed', 
\$died);
     }
 
     try { $self->search_for_expected_serial_failures() }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/os-autoinst-5.1790592325.87022d5/doc/backend_vars.md 
new/os-autoinst-5.1790705326.6badaca/doc/backend_vars.md
--- old/os-autoinst-5.1790592325.87022d5/doc/backend_vars.md    2026-09-28 
12:45:25.000000000 +0200
+++ new/os-autoinst-5.1790705326.6badaca/doc/backend_vars.md    2026-09-29 
20:08:46.000000000 +0200
@@ -140,6 +140,7 @@
 | NICTYPE | user\|tap\|vde | user | Instruct QEMU to either use user 
networking or to connect virtual NIC to existin system TAP device |
 | NICTYPE_USER_OPTIONS | string | undef | Arbitrary options for NICTYPE, e.g 
when set to `hostfwd=tcp::2223-:22` would enable port forwarding. |
 | NICVLAN | integer | undef | Comma-separated list of network (vlan) numbers 
to which the NIC should be connected, assigned by scheduler to jobs with 
NICTYPE != user |
+| NICOFFSET | integer | 64 | The offset between NICs used if a test configures 
more than one NIC. Has to be greather than the number of workers running on the 
same host to avoid conflicts between worker instances. Has to be in accordance 
with statically configured devices. |
 | NICPCIADDR | integer | undef | Assign NIC device a specific address on the 
PCI bus |
 | NUMDISKS | integer | 1 | Number of disks to be created and attached to VM, 
can be 0 to disable disks, if using RAIDLEVEL, will be set to 4 |
 | OFFLINE_SUT | boolean | 0 | Disable network for a VM |
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/os-autoinst-5.1790592325.87022d5/script/os-autoinst-setup-multi-machine 
new/os-autoinst-5.1790705326.6badaca/script/os-autoinst-setup-multi-machine
--- old/os-autoinst-5.1790592325.87022d5/script/os-autoinst-setup-multi-machine 
2026-09-28 12:45:25.000000000 +0200
+++ new/os-autoinst-5.1790705326.6badaca/script/os-autoinst-setup-multi-machine 
2026-09-29 20:08:46.000000000 +0200
@@ -1,6 +1,7 @@
 #!/bin/bash -e
 set -euo pipefail
 instances="${instances:-20}"
+nicoffset=${OS_AUTOINST_NICOFFSET:-64}
 bridge="${bridge:-"br1"}"
 ethernet="${ethernet:-""}"
 zone="${zone:-"trusted"}"
@@ -118,6 +119,17 @@
     systemctl enable --now nftables
 }
 
+compute_tap_dev_numbers() {
+    local nicoffset_1 nicoffset_2
+    nicoffset_1=$((1 * nicoffset))
+    nicoffset_2=$((2 * nicoffset))
+    tap_dev_numbers=(0 $(
+        seq 1 "$instances"
+        seq "$nicoffset_1" $(("$nicoffset_1" + instances))
+        seq "$nicoffset_2" $(("$nicoffset_2" + instances))
+    ))
+}
+
 create_gre_preup_script() {
     local location=$1
     cat > "$location" << EOF
@@ -168,11 +180,7 @@
     nmcli con add type ovs-port con.int "$bridge" con.master "$bridge"
     nmcli con add type ovs-interface con.int "$bridge" con.master "$bridge" 
ipv4.method manual ipv4.address 10.0.2.2/15 ipv4.dad-timeout 0 ipv6.method 
manual ipv6.address fec0::2/63 ethernet.mtu "$mtu" con.zone "$zone"
     # Create tap interfaces
-    for i in 0 $(
-        seq 1 "$instances"
-        seq 64 $((64 + instances))
-        seq 128 $((128 + instances))
-    ); do
+    for i in "${tap_dev_numbers[@]}"; do
         nmcli con add type ovs-port con.int "tap$i" con.master "$bridge"
         nmcli con add type tun mode tap owner "$(id -u _openqa-worker)" group 
"$(getent group nogroup | cut -f3 -d:)" con.int "tap$i" master "tap$i"
     done
@@ -203,11 +211,7 @@
 TUNNEL_SET_GROUP='nogroup'
 TUNNEL_SET_OWNER='_openqa-worker'
 EOF
-    for i in $(
-        seq 1 "$instances"
-        seq 64 $((64 + instances))
-        seq 128 $((128 + instances))
-    ); do ln -sf ifcfg-tap0 "/etc/sysconfig/network/ifcfg-tap$i" && echo 
"OVS_BRIDGE_PORT_DEVICE_$i='tap$i'" >> "/etc/sysconfig/network/ifcfg-$bridge"; 
done
+    for i in "${tap_dev_numbers[@]}"; do ln -sf ifcfg-tap0 
"/etc/sysconfig/network/ifcfg-tap$i" && echo 
"OVS_BRIDGE_PORT_DEVICE_$i='tap$i'" >> "/etc/sysconfig/network/ifcfg-$bridge"; 
done
     create_gre_preup_script /etc/wicked/scripts/gre_tunnel_preup.sh
 
     # ensure the zone of the uplink/ethernet device is set in accordance as 
well
@@ -248,6 +252,7 @@
         echo "This script only works with wicked network daemon or 
NetworkManager"
         exit 1
     }
+    compute_tap_dev_numbers
     ensure_ip_forwarding
     install_packages
     determine_ethernet_interface
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/os-autoinst-5.1790592325.87022d5/t/17-basetest.t 
new/os-autoinst-5.1790705326.6badaca/t/17-basetest.t
--- old/os-autoinst-5.1790592325.87022d5/t/17-basetest.t        2026-09-28 
12:45:25.000000000 +0200
+++ new/os-autoinst-5.1790705326.6badaca/t/17-basetest.t        2026-09-29 
20:08:46.000000000 +0200
@@ -110,6 +110,30 @@
     combined_like { dies_ok { $basetest->runtest } 'run_post_fail ends up with 
die (2)' } qr/finished foo.*post fail hook/s,
       'finished module and ran post fail hook';
     is $basetest->{result}, 'softfail', 'test considered softfailed after 
forcing softfailure in post fail hook';
+
+    my $test_post_failhook_error_handling = sub () {
+        local $bmwqemu::vars{CASEDIR} = 't';
+        $basetest = bless {details => [], name => 'foo', category => 
'category1', execute_time => 42}, $basetest_class;
+        $logs = combined_from { dies_ok { $basetest->runtest } 'run_post_fail 
ends up with die' };
+        like $logs, qr/post_fail_hook failed: failure during post fail hook/, 
'post fail hook failure logged';
+        is $basetest->{result}, 'fail', 'test considered failed after post 
fail hook failed';
+        is scalar @{$basetest->{details}}, 3, 'failures of both test and post 
fail hook recorded';
+        is $basetest->{details}->[1]->{title}, 'Post-fail', 'info about post 
fail hook recorded';
+        is $basetest->{details}->[2]->{title}, "Failed\n(post)", 'failure 
during post fail hook recorded as result';
+        is $basetest->{details}->[2]->{result}, 'fail', 'failure during post 
fail hook has fail result';
+        my $hook_fail_result_file = path('testresults', 
$basetest->{details}->[1]->{text});
+        ok -e $hook_fail_result_file, 'result file for entering post fail hook 
created';
+        is $hook_fail_result_file->slurp, 'Entering post fail hook', 'entering 
post fail hook recorded';
+        $hook_fail_result_file = path('testresults', 
$basetest->{details}->[2]->{text});
+        ok -e $hook_fail_result_file, 'result file for post fail hook failure 
created';
+        like $hook_fail_result_file->slurp, qr/# Post fail hook died: failure 
during post fail hook.*--- # stack trace/s,
+          'stack trace for post fail hook failure recorded';
+        is $basetest->{post_fail_hook_running}, 0, 'post_fail_hook_running 
flag reset';
+    };
+    $mock_basetest->mock(post_fail_hook => sub ($self) { die 'failure during 
post fail hook' });
+    subtest 'post fail hook dies' => $test_post_failhook_error_handling;
+    $mock_basetest->mock(post_fail_hook => sub ($self) { 
OpenQA::Exception::TestapiError->throw(error => 'failure during post fail 
hook') });
+    subtest 'test API failure in post fail hook' => 
$test_post_failhook_error_handling;
 };
 
 subtest modules_test => sub {

++++++ os-autoinst.obsinfo ++++++
--- /var/tmp/diff_new_pack.GMVysD/_old  2026-10-01 16:43:58.512320035 +0200
+++ /var/tmp/diff_new_pack.GMVysD/_new  2026-10-01 16:43:58.518320287 +0200
@@ -1,5 +1,5 @@
 name: os-autoinst
-version: 5.1790592325.87022d5
-mtime: 1790592325
-commit: 87022d5346d2a913cda4cb45360256e5f32012f8
+version: 5.1790705326.6badaca
+mtime: 1790705326
+commit: 6badaca44aecd87a345b4bfb44f47c4909a7fbb3
 

Reply via email to