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-09-08 16:57:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/os-autoinst (Old)
 and      /work/SRC/openSUSE:Factory/.os-autoinst.new.1265 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "os-autoinst"

Tue Sep  8 16:57:00 2026 rev:619 rq:1376182 version:5.1788768889.879c500

Changes:
--------
--- /work/SRC/openSUSE:Factory/os-autoinst/os-autoinst.changes  2026-09-02 
17:00:01.427680492 +0200
+++ /work/SRC/openSUSE:Factory/.os-autoinst.new.1265/os-autoinst.changes        
2026-09-08 17:00:16.548387578 +0200
@@ -1,0 +2,10 @@
+Mon Sep 07 08:15:05 UTC 2026 - [email protected]
+
+- Update to version 5.1788768889.879c500:
+  * Revert "fix: Prevent command corruption from DSR/CPR loop on serial xterm 
consoles"
+  * fix: Prevent command corruption from DSR/CPR loop on xterm consoles
+  * test(myjsonrpc): Add test for newline handling
+  * fix(myjsonrpc): omit newline delimiter between JSON objects
+  * feat: Avoid problems with pretty serial markers and multiline commands
+
+-------------------------------------------------------------------

Old:
----
  os-autoinst-5.1787772129.e7dc5f2.obscpio

New:
----
  os-autoinst-5.1788768889.879c500.obscpio

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

Other differences:
------------------
++++++ os-autoinst-devel-test.spec ++++++
--- /var/tmp/diff_new_pack.QTJkwR/_old  2026-09-08 17:00:18.957487653 +0200
+++ /var/tmp/diff_new_pack.QTJkwR/_new  2026-09-08 17:00:18.959487737 +0200
@@ -18,7 +18,7 @@
 
 %define         short_name os-autoinst-devel
 Name:           %{short_name}-test
-Version:        5.1787772129.e7dc5f2
+Version:        5.1788768889.879c500
 Release:        0
 Summary:        Test package for %{short_name}
 License:        GPL-2.0-or-later

++++++ os-autoinst-openvswitch-test.spec ++++++
--- /var/tmp/diff_new_pack.QTJkwR/_old  2026-09-08 17:00:18.998489357 +0200
+++ /var/tmp/diff_new_pack.QTJkwR/_new  2026-09-08 17:00:18.999489398 +0200
@@ -19,7 +19,7 @@
 %define name_ext -test
 %define         short_name os-autoinst-openvswitch
 Name:           %{short_name}%{?name_ext}
-Version:        5.1787772129.e7dc5f2
+Version:        5.1788768889.879c500
 Release:        0
 Summary:        test package for %{short_name}
 License:        GPL-2.0-or-later

++++++ os-autoinst-test.spec ++++++
--- /var/tmp/diff_new_pack.QTJkwR/_old  2026-09-08 17:00:19.049491475 +0200
+++ /var/tmp/diff_new_pack.QTJkwR/_new  2026-09-08 17:00:19.052491600 +0200
@@ -19,7 +19,7 @@
 %define name_ext -test
 %define         short_name os-autoinst
 Name:           %{short_name}%{?name_ext}
-Version:        5.1787772129.e7dc5f2
+Version:        5.1788768889.879c500
 Release:        0
 Summary:        test package for os-autoinst
 License:        GPL-2.0-or-later

++++++ os-autoinst.spec ++++++
--- /var/tmp/diff_new_pack.QTJkwR/_old  2026-09-08 17:00:19.115494217 +0200
+++ /var/tmp/diff_new_pack.QTJkwR/_new  2026-09-08 17:00:19.121494466 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           os-autoinst
-Version:        5.1787772129.e7dc5f2
+Version:        5.1788768889.879c500
 Release:        0
 Summary:        OS-level test automation
 License:        GPL-2.0-or-later

++++++ os-autoinst-5.1787772129.e7dc5f2.obscpio -> 
os-autoinst-5.1788768889.879c500.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/os-autoinst-5.1787772129.e7dc5f2/t/24-myjsonrpc.t 
new/os-autoinst-5.1788768889.879c500/t/24-myjsonrpc.t
--- old/os-autoinst-5.1787772129.e7dc5f2/t/24-myjsonrpc.t       2026-08-26 
21:22:09.000000000 +0200
+++ new/os-autoinst-5.1788768889.879c500/t/24-myjsonrpc.t       2026-09-07 
10:14:49.000000000 +0200
@@ -10,6 +10,18 @@
 use lib "$Bin/../external/os-autoinst-common/lib";
 use OpenQA::Test::TimeLimit '5';
 use Socket;
+
+# mock sysread to be able to limit the number of bytes read from the socket
+my $mock_sysread_limit;
+
+BEGIN {
+    *CORE::GLOBAL::sysread = sub : prototype(*$;$$) {
+        my ($socket, undef, $length, $offset) = @_;
+        $length = $mock_sysread_limit if defined $mock_sysread_limit && 
$length > $mock_sysread_limit;
+        return CORE::sysread($socket, $_[1], $length, $offset // 0);
+    };
+}
+
 use myjsonrpc;
 
 use Test::Warnings qw(warnings :report_warnings);
@@ -104,6 +116,43 @@
     close $sub_isotovideo;
 };
 
+subtest 'reproduce deadlock/newline issue' => sub {
+    my ($child, $isotovideo);
+    socketpair $child, $isotovideo, AF_UNIX, SOCK_STREAM, PF_UNSPEC;
+    $child->autoflush(1);
+    $isotovideo->autoflush(1);
+
+    # send a test message; it is not supposed to contain a trailing newline
+    my $cjx = Cpanel::JSON::XS->new->canonical->utf8->convert_blessed();
+    my $json_str = $cjx->encode({test => 'deadlock', json_cmd_token => 
'12345678'});
+    my $json_len = length $json_str;
+    myjsonrpc::send_json($child, {test => 'deadlock', json_cmd_token => 
'12345678'});
+
+    # mock IO::Select::can_read to keep track of whether it would run into a 
deadlock
+    my $can_read_count = 0;
+    my $test_io_select_mock = Test::MockModule->new('IO::Select');
+    $test_io_select_mock->redefine(can_read => sub ($self, $timeout = undef) {
+            my $original_can_read = $test_io_select_mock->original('can_read');
+            die 'deadlock detected: can_read called multiple times because of 
trailing newline' if ++$can_read_count > 1;    # uncoverable statement
+            return $original_can_read->($self, $timeout);
+    });
+
+    # read with sysread limited to read exactly the JSON length, leaving any 
trailing newline in the socket
+    # note: In practice, this can happen if the JSON length matches exactly 
the size of the pipe.
+    $mock_sysread_limit = $json_len;
+    my $read = myjsonrpc::read_json($isotovideo, undef);
+    is_deeply $read, {test => 'deadlock', json_cmd_token => '12345678'}, 
'parsed JSON object';
+    my $bytes_left_to_read = 
$test_io_select_mock->original('can_read')->(IO::Select->new($isotovideo), 0);
+    ok !$bytes_left_to_read, 'socket is not readable; no leftover trailing 
newline in socket';
+
+    # call read_json again as the consumer would do if there is a leftover 
newline to read
+    myjsonrpc::read_json($isotovideo, undef) if $bytes_left_to_read;    # 
uncoverable statement
+
+    undef $mock_sysread_limit;
+    close $child;
+    close $isotovideo;
+};
+
 my $io_select_mock = Test::MockModule->new('IO::Select');
 $io_select_mock->redefine(can_read => undef);
 throws_ok { myjsonrpc::read_json($isotovideo) } qr/Illegal seek/, 'error 
exception raised when reading is aborted';

++++++ os-autoinst.obsinfo ++++++
--- /var/tmp/diff_new_pack.QTJkwR/_old  2026-09-08 17:00:21.530594542 +0200
+++ /var/tmp/diff_new_pack.QTJkwR/_new  2026-09-08 17:00:21.541594998 +0200
@@ -1,5 +1,5 @@
 name: os-autoinst
-version: 5.1787772129.e7dc5f2
-mtime: 1787772129
-commit: e7dc5f2d2570ad6384c32f6c1966ee3dc1f43691
+version: 5.1788768889.879c500
+mtime: 1788768889
+commit: 879c5005ff4f543eb4f00e3de596fbe55458f87c
 

Reply via email to