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 2025-05-02 15:01:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/os-autoinst (Old) and /work/SRC/openSUSE:Factory/.os-autoinst.new.30101 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "os-autoinst" Fri May 2 15:01:23 2025 rev:513 rq:1273992 version:5.1745509934.49afb50 Changes: -------- --- /work/SRC/openSUSE:Factory/os-autoinst/os-autoinst.changes 2025-04-22 17:30:54.317690278 +0200 +++ /work/SRC/openSUSE:Factory/.os-autoinst.new.30101/os-autoinst.changes 2025-05-02 15:03:37.064598160 +0200 @@ -1,0 +2,12 @@ +Thu Apr 24 15:52:23 UTC 2025 - ok...@suse.com + +- Update to version 5.1745509934.49afb50: + * video_stream: support setting EDID also with ustreamer + * video_stream: add support for BGR3 format via ustreamer + * tidy: Enforce blank lines before subs + * New script: os-autoinst-generate-needle-preview + * Revert removal of '%cmd' after regressions + * backend: Make screen check time exceed check configurable + * backend: Make stall detection factor configurable + +------------------------------------------------------------------- Old: ---- os-autoinst-5.1745266261.8745de3.obscpio New: ---- os-autoinst-5.1745509934.49afb50.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ os-autoinst-devel-test.spec ++++++ --- /var/tmp/diff_new_pack.utVX3Q/_old 2025-05-02 15:03:39.388696367 +0200 +++ /var/tmp/diff_new_pack.utVX3Q/_new 2025-05-02 15:03:39.388696367 +0200 @@ -18,7 +18,7 @@ %define short_name os-autoinst-devel Name: %{short_name}-test -Version: 5.1745266261.8745de3 +Version: 5.1745509934.49afb50 Release: 0 Summary: Test package for %{short_name} License: GPL-2.0-or-later ++++++ os-autoinst-openvswitch-test.spec ++++++ --- /var/tmp/diff_new_pack.utVX3Q/_old 2025-05-02 15:03:39.608705664 +0200 +++ /var/tmp/diff_new_pack.utVX3Q/_new 2025-05-02 15:03:39.616706002 +0200 @@ -19,7 +19,7 @@ %define name_ext -test %define short_name os-autoinst-openvswitch Name: %{short_name}%{?name_ext} -Version: 5.1745266261.8745de3 +Version: 5.1745509934.49afb50 Release: 0 Summary: test package for %{short_name} License: GPL-2.0-or-later ++++++ os-autoinst-test.spec ++++++ --- /var/tmp/diff_new_pack.utVX3Q/_old 2025-05-02 15:03:39.736711073 +0200 +++ /var/tmp/diff_new_pack.utVX3Q/_new 2025-05-02 15:03:39.736711073 +0200 @@ -19,7 +19,7 @@ %define name_ext -test %define short_name os-autoinst Name: %{short_name}%{?name_ext} -Version: 5.1745266261.8745de3 +Version: 5.1745509934.49afb50 Release: 0 Summary: test package for os-autoinst License: GPL-2.0-or-later ++++++ os-autoinst.spec ++++++ --- /var/tmp/diff_new_pack.utVX3Q/_old 2025-05-02 15:03:39.832715130 +0200 +++ /var/tmp/diff_new_pack.utVX3Q/_new 2025-05-02 15:03:39.836715298 +0200 @@ -17,7 +17,7 @@ Name: os-autoinst -Version: 5.1745266261.8745de3 +Version: 5.1745509934.49afb50 Release: 0 Summary: OS-level test automation License: GPL-2.0-or-later ++++++ os-autoinst-5.1745266261.8745de3.obscpio -> os-autoinst-5.1745509934.49afb50.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/os-autoinst-5.1745266261.8745de3/consoles/video_stream.pm new/os-autoinst-5.1745509934.49afb50/consoles/video_stream.pm --- old/os-autoinst-5.1745266261.8745de3/consoles/video_stream.pm 2025-04-21 22:11:01.000000000 +0200 +++ new/os-autoinst-5.1745509934.49afb50/consoles/video_stream.pm 2025-04-24 17:52:14.000000000 +0200 @@ -89,12 +89,14 @@ sub connect_remote ($self, $args) { $self->{_last_update_received} = 0; - if ($args->{url} =~ m/^\/dev\/video/) { + if ($args->{url} =~ m/^(ustreamer:\/\/)?(\/dev\/video\d+)/) { if ($args->{edid}) { - my $ret = _v4l2_ctl($args->{url}, $args->{video_cmd_prefix}, "--set-edid $args->{edid}"); + my $ret = _v4l2_ctl($2, $args->{video_cmd_prefix}, "--set-edid $args->{edid}"); die "Failed to set EDID" unless defined $ret; } + } + if ($args->{url} =~ m/^\/dev\/video/) { my $timings = _v4l2_ctl($args->{url}, $args->{video_cmd_prefix}, '--get-dv-timings'); if ($timings) { if ($timings ne "0x0pnan") { @@ -121,7 +123,8 @@ } sub _get_ffmpeg_cmd ($self, $url) { - my $fps = $1 if ($url =~ s/\?fps=([0-9]+)//); + my $fps = $1 if ($url =~ s/[\?&]fps=([0-9]+)//); + die "ffmpeg url does not support format=" if ($url =~ s/[\?&]format=([A-Z0-9]+)//); $fps //= 4; my @cmd; @cmd = split(/ /, $self->{args}->{video_cmd_prefix}) if $self->{args}->{video_cmd_prefix}; @@ -131,11 +134,13 @@ } sub _get_ustreamer_cmd ($self, $url, $sink_name) { - my $fps = $1 if ($url =~ s/\?fps=([0-9]+)//); + my $fps = $1 if ($url =~ s/[\?&]fps=([0-9]+)//); + my $format = $1 if ($url =~ s/[\?&]format=([A-Z0-9]+)//); $fps //= 5; + $format //= 'UYVY'; return [ 'ustreamer', '--device', $url, '-f', $fps, - '-m', 'UYVY', # specify preferred format + '-m', $format, # specify preferred format '-c', 'NOOP', # do not produce JPEG stream '--raw-sink', $sink_name, '--raw-sink-rm', # raw memsink '--dv-timings', # enable using DV timings (getting resolution, and reacting to changes) @@ -359,6 +364,20 @@ 16, # blue_shift ); $img->map_raw_data(substr($ustreamer_map, $data_offset, $used), 0, 0, $width, $height, $vncinfo); + } elsif ($format eq 'BGR3') { + $img = tinycv::new($width, $height); + my $vncinfo = tinycv::new_vncinfo( + 0, # do_endian_conversion + 1, # true_color + 3, # bytes_per_pixel + 0xff, # red_mask + 16, # red_shift + 0xff, # green_mask + 8, # green_shift + 0xff, # blue_mask + 0, # blue_shift + ); + $img->map_raw_data(substr($ustreamer_map, $data_offset, $used), 0, 0, $width, $height, $vncinfo); } elsif ($format eq 'UYVY') { $img = tinycv::new($width, $height); $img->map_raw_data_uyvy(substr($ustreamer_map, $data_offset, $used)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/os-autoinst-5.1745266261.8745de3/doc/backend_vars.asciidoc new/os-autoinst-5.1745509934.49afb50/doc/backend_vars.asciidoc --- old/os-autoinst-5.1745266261.8745de3/doc/backend_vars.asciidoc 2025-04-21 22:11:01.000000000 +0200 +++ new/os-autoinst-5.1745509934.49afb50/doc/backend_vars.asciidoc 2025-04-24 17:52:14.000000000 +0200 @@ -325,7 +325,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 -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. Ustreamer support requires pack("D") working, which rules out openSUSE 15.5's perl. +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 or RGB24). 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 GENERAL_HW_KEYBOARD_URL;string;;URL to keyboard emulation device. eg. 'http://1.2.3.4/cmd' - see https://github.com/os-autoinst/os-autoinst-distri-opensuse/tree/master/data/generalhw_scripts/rpi_pico_w_keyboard[rpi_pico_w_keyboard] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/os-autoinst-5.1745266261.8745de3/t/26-video_stream.t new/os-autoinst-5.1745509934.49afb50/t/26-video_stream.t --- old/os-autoinst-5.1745266261.8745de3/t/26-video_stream.t 2025-04-21 22:11:01.000000000 +0200 +++ new/os-autoinst-5.1745509934.49afb50/t/26-video_stream.t 2025-04-24 17:52:14.000000000 +0200 @@ -107,6 +107,9 @@ 'ffmpeg', '-loglevel', 'fatal', '-i', '/dev/video0', '-vcodec', 'ppm', '-f', 'rawvideo', '-r', 3, '-'], "correct cmd built for fps=3"; + # unsupported format= + throws_ok { $mock_console->original('_get_ffmpeg_cmd')->($console, '/dev/video0?fps=3&format=BGR3') } qr/does not support format/, 'dies ok - ffmpeg cmdline with format='; + $mock_console->redefine(update_framebuffer => sub ($self) { $self->{_last_update_received} = 200; return 0; }); $console->request_screen_update(); is $console->{dv_timings_supported}, 1, 'dv timings are supported'; @@ -123,6 +126,16 @@ is $console->{dv_timings_supported}, 0, "correctly skipping DV timing"; is_deeply \@v4l2_ctl_calls, [], "calls to v4l2-ctl"; + @v4l2_ctl_calls = (); + %v4l2_ctl_results = ( + '--set-edid type=hdmi' => "CTA-861 Header\n...\n\nHDMI Vendor-Specific Data Block\n...\n", + ); + $console->connect_remote({url => 'ustreamer:///dev/video0', edid => 'type=hdmi'}); + is $console->{dv_timings_supported}, 0, "use v4l2-ctl and set edid"; + is_deeply \@v4l2_ctl_calls, [ + [('/dev/video0', undef, '--set-edid type=hdmi')], + ], "calls to v4l2-ctl"; + my $cmd = $mock_console->original('_get_ustreamer_cmd')->($console, '/dev/video0', 'raw-sink-dev-video0.raw'); is_deeply $cmd, [ 'ustreamer', '--device', '/dev/video0', '-f', '5', @@ -130,13 +143,20 @@ '-c', 'NOOP', '--raw-sink', 'raw-sink-dev-video0.raw', '--raw-sink-rm', '--dv-timings'], "correct cmd built for ustreamer"; - $cmd = $mock_console->original('_get_ustreamer_cmd')->($console, '/dev/video0?fps=2', 'raw-sink-dev-video0.raw'); + $cmd = $mock_console->original('_get_ustreamer_cmd')->($console, '/dev/video0?fps=2&format=BGR3', 'raw-sink-dev-video0.raw'); is_deeply $cmd, [ 'ustreamer', '--device', '/dev/video0', '-f', '2', - '-m', 'UYVY', + '-m', 'BGR3', '-c', 'NOOP', '--raw-sink', 'raw-sink-dev-video0.raw', '--raw-sink-rm', - '--dv-timings'], "correct cmd built for fps=2"; + '--dv-timings'], "correct cmd built for fps=2 and format=BGR3"; + $cmd = $mock_console->original('_get_ustreamer_cmd')->($console, '/dev/video0&format=BGR3', 'raw-sink-dev-video0.raw'); + is_deeply $cmd, [ + 'ustreamer', '--device', '/dev/video0', '-f', '5', + '-m', 'BGR3', + '-c', 'NOOP', + '--raw-sink', 'raw-sink-dev-video0.raw', '--raw-sink-rm', + '--dv-timings'], "correct cmd built for format=BGR3"; }; subtest 'frames parsing' => sub { @@ -260,6 +280,16 @@ ok $received_img, 'current screen available to read for UYVY v7 frame' or return; is $received_img->similarity($img), 1_000_000, "received correct UYVY v7 frame"; $console->disable_video; + + # ustreamer v7 frame, actual data, encoded as BGR3 aka BGR24 + copy($data_dir . "ustreamer7-shared-full-frame-bgr3", '/dev/shm/raw-sink-dev-video0.raw'); + $console->connect_remote({url => 'ustreamer:///dev/video0'}); + + $img = tinycv::read($data_dir . "ustreamer7-shared-full-frame-bgr3.png"); + $received_img = $console->current_screen(); + ok $received_img, 'current screen available to read for BGR3 v7 frame' or return; + is $received_img->similarity($img), 1_000_000, "received correct BGR3 v7 frame"; + $console->disable_video; }; subtest 'v4l2 resolution' => sub { Binary files old/os-autoinst-5.1745266261.8745de3/t/data/ustreamer7-shared-full-frame-bgr3 and new/os-autoinst-5.1745509934.49afb50/t/data/ustreamer7-shared-full-frame-bgr3 differ Binary files old/os-autoinst-5.1745266261.8745de3/t/data/ustreamer7-shared-full-frame-bgr3.png and new/os-autoinst-5.1745509934.49afb50/t/data/ustreamer7-shared-full-frame-bgr3.png differ ++++++ os-autoinst.obsinfo ++++++ --- /var/tmp/diff_new_pack.utVX3Q/_old 2025-05-02 15:03:42.000806743 +0200 +++ /var/tmp/diff_new_pack.utVX3Q/_new 2025-05-02 15:03:42.000806743 +0200 @@ -1,5 +1,5 @@ name: os-autoinst -version: 5.1745266261.8745de3 -mtime: 1745266261 -commit: 8745de34ae590c390e7251f78fed3694de1ab3a0 +version: 5.1745509934.49afb50 +mtime: 1745509934 +commit: 49afb509ef16be98aa94ecae795f89a604cc4064