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-20 12:42:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/os-autoinst (Old)
 and      /work/SRC/openSUSE:Factory/.os-autoinst.new.3698736 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "os-autoinst"

Tue Oct 20 12:42:55 2026 rev:632 rq:1386389 version:5.1792446083.2bd94ba

Changes:
--------
--- /work/SRC/openSUSE:Factory/os-autoinst/os-autoinst.changes  2026-10-16 
20:14:47.615039001 +0200
+++ /work/SRC/openSUSE:Factory/.os-autoinst.new.3698736/os-autoinst.changes     
2026-10-20 12:43:20.301084661 +0200
@@ -1,0 +2,6 @@
+Mon Oct 19 21:41:35 UTC 2026 - [email protected]
+
+- Update to version 5.1792446083.2bd94ba:
+  * feat(generalhw): Support HARDWARE_CONSOLE_LOG
+
+-------------------------------------------------------------------

Old:
----
  os-autoinst-5.1792077508.50bc19e.obscpio

New:
----
  os-autoinst-5.1792446083.2bd94ba.obscpio

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

Other differences:
------------------
++++++ os-autoinst-devel-test.spec ++++++
--- /var/tmp/diff_new_pack.otwwYP/_old  2026-10-20 12:43:22.365171010 +0200
+++ /var/tmp/diff_new_pack.otwwYP/_new  2026-10-20 12:43:22.368171136 +0200
@@ -18,7 +18,7 @@
 
 %define         short_name os-autoinst-devel
 Name:           %{short_name}-test
-Version:        5.1792077508.50bc19e
+Version:        5.1792446083.2bd94ba
 Release:        0
 Summary:        Test package for %{short_name}
 License:        GPL-2.0-or-later

++++++ os-autoinst-openvswitch-test.spec ++++++
--- /var/tmp/diff_new_pack.otwwYP/_old  2026-10-20 12:43:22.412172977 +0200
+++ /var/tmp/diff_new_pack.otwwYP/_new  2026-10-20 12:43:22.414173060 +0200
@@ -19,7 +19,7 @@
 %define name_ext -test
 %define         short_name os-autoinst-openvswitch
 Name:           %{short_name}%{?name_ext}
-Version:        5.1792077508.50bc19e
+Version:        5.1792446083.2bd94ba
 Release:        0
 Summary:        test package for %{short_name}
 License:        GPL-2.0-or-later

++++++ os-autoinst-test.spec ++++++
--- /var/tmp/diff_new_pack.otwwYP/_old  2026-10-20 12:43:22.444174315 +0200
+++ /var/tmp/diff_new_pack.otwwYP/_new  2026-10-20 12:43:22.445174357 +0200
@@ -19,7 +19,7 @@
 %define name_ext -test
 %define         short_name os-autoinst
 Name:           %{short_name}%{?name_ext}
-Version:        5.1792077508.50bc19e
+Version:        5.1792446083.2bd94ba
 Release:        0
 Summary:        test package for os-autoinst
 License:        GPL-2.0-or-later

++++++ os-autoinst.spec ++++++
--- /var/tmp/diff_new_pack.otwwYP/_old  2026-10-20 12:43:22.472175487 +0200
+++ /var/tmp/diff_new_pack.otwwYP/_new  2026-10-20 12:43:22.475175612 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           os-autoinst
-Version:        5.1792077508.50bc19e
+Version:        5.1792446083.2bd94ba
 Release:        0
 Summary:        OS-level test automation
 License:        GPL-2.0-or-later

++++++ os-autoinst-5.1792077508.50bc19e.obscpio -> 
os-autoinst-5.1792446083.2bd94ba.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/os-autoinst-5.1792077508.50bc19e/backend/generalhw.pm 
new/os-autoinst-5.1792446083.2bd94ba/backend/generalhw.pm
--- old/os-autoinst-5.1792077508.50bc19e/backend/generalhw.pm   2026-10-15 
17:18:28.000000000 +0200
+++ new/os-autoinst-5.1792446083.2bd94ba/backend/generalhw.pm   2026-10-19 
23:41:23.000000000 +0200
@@ -13,6 +13,7 @@
 use IPC::Run ();
 require IPC::System::Simple;
 use File::Basename 'basename';
+use File::Path 'mkpath';
 use Mojo::IOLoop::ReadWriteProcess::Session 'session';
 
 sub new ($class) {
@@ -169,13 +170,13 @@
     $self->restart_host;
     $self->relogin_vnc if ($bmwqemu::vars{GENERAL_HW_VNC_IP});
     $self->reconnect_video_stream if 
($bmwqemu::vars{GENERAL_HW_VIDEO_STREAM_URL});
-    $self->start_serial_grab if (($bmwqemu::vars{GENERAL_HW_VNC_IP} || 
$bmwqemu::vars{GENERAL_HW_SOL_CMD}) && !$bmwqemu::vars{GENERAL_HW_NO_SERIAL});
+    $self->start_serial_grab if $self->_use_serial || 
$self->_use_hardware_console_log;
     return {};
 }
 
 sub do_stop_vm ($self, @) {
     $self->poweroff_host;
-    $self->stop_serial_grab() if (($bmwqemu::vars{GENERAL_HW_VNC_IP} || 
$bmwqemu::vars{GENERAL_HW_SOL_CMD}) && !$bmwqemu::vars{GENERAL_HW_NO_SERIAL});
+    $self->stop_serial_grab() if $self->_use_serial || 
$self->_use_hardware_console_log;
     $self->disable_consoles;
     return {};
 }
@@ -186,14 +187,32 @@
 
 # serial grab
 
+sub _use_serial ($self) {
+    return ($bmwqemu::vars{GENERAL_HW_VNC_IP} || 
$bmwqemu::vars{GENERAL_HW_SOL_CMD}) && !$bmwqemu::vars{GENERAL_HW_NO_SERIAL};
+}
+
+sub _use_hardware_console_log ($self) {
+    return $bmwqemu::vars{HARDWARE_CONSOLE_LOG} && 
$bmwqemu::vars{GENERAL_HW_SOL_CMD};
+}
+
+sub _serial_grab_cmd ($self) {
+    my $cmd = $self->get_cmd('GENERAL_HW_SOL_CMD');
+    return $cmd unless $self->_use_hardware_console_log;
+    # duplicate the serial output into a log file uploaded as part of the job 
results
+    mkpath 'ulogs';
+    return "$cmd 2>&1 | tee -a ulogs/hardware-console-log.txt";
+}
+
 sub start_serial_grab ($self) {
+    my $output = $self->_use_serial ? $self->{serialfile} : '/dev/null';
     $self->{serialpid} = fork;
     return unless $self->{serialpid} == 0;
     setpgrp 0, 0;    # uncoverable statement
-    open my $serial, '>', $self->{serialfile};    # uncoverable statement
+    my $cmd = $self->_serial_grab_cmd;    # uncoverable statement
+    open my $serial, '>', $output;    # uncoverable statement
     open STDOUT, '>&', $serial;    # uncoverable statement
     open STDERR, '>&', $serial;    # uncoverable statement
-    exec $self->get_cmd('GENERAL_HW_SOL_CMD');    # uncoverable statement
+    exec $cmd;    # uncoverable statement
     die "exec failed $!";    # uncoverable statement
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/os-autoinst-5.1792077508.50bc19e/doc/backend_vars.md 
new/os-autoinst-5.1792446083.2bd94ba/doc/backend_vars.md
--- old/os-autoinst-5.1792077508.50bc19e/doc/backend_vars.md    2026-10-15 
17:18:28.000000000 +0200
+++ new/os-autoinst-5.1792446083.2bd94ba/doc/backend_vars.md    2026-10-19 
23:41:23.000000000 +0200
@@ -327,6 +327,7 @@
 | GENERAL_HW_VNC_DEPTH | integer | 16 | Color depth for VNC server |
 | GENERAL_HW_VNC_JPEG | integer | 0 | Advertise support for Tight JPEG 
encoding |
 | GENERAL_HW_NO_SERIAL | boolean |  | Don't use serial |
+| HARDWARE_CONSOLE_LOG | boolean | undef | Enable direct log capture of the 
GENERAL_HW_SOL_CMD output (e.g. firmware and kernel messages) into 
hardware-console-log.txt, disabled by default. Works also with 
GENERAL_HW_NO_SERIAL. |
 | GENERAL_HW_VIDEO_STREAM_URL | string |  | Video stream URL (in ffmpeg's 
syntax) to receive, for example 'udp://@:5004' or '/dev/video0'. Using 
'ustreamer:///dev/videoN' will use ustreamer from PiKVM instead of ffmpeg to 
read '/dev/videoN'. The URL can have '?fps=..' appended to specify desired FPS 
to capture with. The URL can also have 'format=' parameter to specify ustream 
format (default is UYVY, can be also set to BGR24, RGB24, RGB24swap). The URL 
can also have 'mediadev=...' and 'mediaentity=' parameters, necessary on 
Raspberry Pi 5. Ustreamer support requires pack("D") working, which rules out 
openSUSE 15.5's perl. |
 | GENERAL_HW_VIDEO_CMD_PREFIX | string |  | Prefix to prepend to 'ffmpeg' and 
'v4l2-ctl' commands, can be used to run them on a different host via SSH. 
Example: 'ssh root@pikvm'. Note: the value is tokenized on spaces, so avoid 
their use in command name or any of the parameters. |
 | VIDEO_STREAM_PIPE_BUFFER_SIZE | integer | 1680*1050*3+20 | Buffer containing 
at least a single PPM frame for video capturing |
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/os-autoinst-5.1792077508.50bc19e/t/29-backend-generalhw.t 
new/os-autoinst-5.1792446083.2bd94ba/t/29-backend-generalhw.t
--- old/os-autoinst-5.1792077508.50bc19e/t/29-backend-generalhw.t       
2026-10-15 17:18:28.000000000 +0200
+++ new/os-autoinst-5.1792446083.2bd94ba/t/29-backend-generalhw.t       
2026-10-19 23:41:23.000000000 +0200
@@ -97,6 +97,18 @@
     is_deeply \@video_connects, [['udp://@:5004']], 'tried to connect to video 
stream' or always_explain \@vnc_logins;
 };
 
+subtest 'start VM with hardware console log only' => sub {
+    $bmwqemu::vars{GENERAL_HW_NO_SERIAL} = 1;
+    @invoked_cmds = ();
+    $backend->do_start_vm;
+    ok !grep({ $_ eq 'start_serial_grab' } @invoked_cmds), 'serial grab not 
started with GENERAL_HW_NO_SERIAL';
+    $bmwqemu::vars{HARDWARE_CONSOLE_LOG} = 1;
+    @invoked_cmds = ();
+    $backend->do_start_vm;
+    ok grep({ $_ eq 'start_serial_grab' } @invoked_cmds), 'serial grab started 
for HARDWARE_CONSOLE_LOG';
+    delete @bmwqemu::vars{qw(HARDWARE_CONSOLE_LOG GENERAL_HW_NO_SERIAL)};
+};
+
 subtest 'hdd args' => sub {
     # more complex disks setup
     $bmwqemu::vars{NUMDISKS} = '2';
@@ -206,6 +218,31 @@
         is waitpid($backend->{serialpid}, WNOHANG), -1, 'process terminated 
via stop_serial_grab';
         is $backend->stop_serial_grab, -1, 'returns -1 if process does not 
exist (but does not die)';
     };
+    subtest 'hardware console log' => sub {
+        my $cwd = Mojo::File->new->to_abs;
+        my $dir = tempdir;
+        chdir $dir;
+        my $log = $dir->child(qw(ulogs hardware-console-log.txt));
+        $bmwqemu::vars{GENERAL_HW_SOL_CMD} = 'echo -n foo';
+        is $backend->_serial_grab_cmd, '/usr/bin/echo -n foo infinity', 'plain 
command without HARDWARE_CONSOLE_LOG';
+        $bmwqemu::vars{HARDWARE_CONSOLE_LOG} = 1;
+        is $backend->_serial_grab_cmd, '/usr/bin/echo -n foo infinity 2>&1 | 
tee -a ulogs/hardware-console-log.txt',
+          'output duplicated with HARDWARE_CONSOLE_LOG';
+        $backend->start_serial_grab;
+        waitpid $backend->{serialpid}, 0;
+        is $serialfile->slurp, 'foo infinity', 'serial output captured';
+        is $log->slurp, 'foo infinity', 'serial output also captured in 
hardware console log';
+
+        $bmwqemu::vars{GENERAL_HW_NO_SERIAL} = 1;
+        $serialfile->spew('');
+        $backend->start_serial_grab;
+        waitpid $backend->{serialpid}, 0;
+        is $serialfile->slurp, '', 'serial output not captured with 
GENERAL_HW_NO_SERIAL';
+        is $log->slurp, 'foo infinityfoo infinity', 'hardware console log 
appended with GENERAL_HW_NO_SERIAL';
+
+        delete @bmwqemu::vars{qw(HARDWARE_CONSOLE_LOG GENERAL_HW_NO_SERIAL)};
+        chdir $cwd;
+    };
 
     $serialfile->remove;
 };

++++++ os-autoinst.obsinfo ++++++
--- /var/tmp/diff_new_pack.otwwYP/_old  2026-10-20 12:43:24.216248448 +0200
+++ /var/tmp/diff_new_pack.otwwYP/_new  2026-10-20 12:43:24.220248616 +0200
@@ -1,5 +1,5 @@
 name: os-autoinst
-version: 5.1792077508.50bc19e
-mtime: 1792077508
-commit: 50bc19e891aec51e4f61cec73e78abb6b308ce4b
+version: 5.1792446083.2bd94ba
+mtime: 1792446083
+commit: 2bd94ba81d9b441255ddd19aad6368f900501724
 

Reply via email to