public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/kitty] rawhide: Fix test with coreutils 9.12
Date: Tue, 22 Sep 2026 11:56:57 GMT	[thread overview]
Message-ID: <179007821717.1.9756307178178884863.rpms-kitty-e0993e7e122a@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/kitty
            Branch : rawhide
            Commit : e0993e7e122aad0bcbcf03cf44f28fd99631fd46
            Author : Miro Hrončok <miro@hroncok.cz>
            Date   : 2026-09-22T13:44:40+02:00
            Stats  : +83/-0 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/kitty/c/e0993e7e122aad0bcbcf03cf44f28fd99631fd46?branch=rawhide

            Log:
            Fix test with coreutils 9.12

Assisted-By: Claude Sonnet 5

---
diff --git a/10513.patch b/10513.patch
new file mode 100644
index 0000000..a4ea108
--- /dev/null
+++ b/10513.patch
@@ -0,0 +1,79 @@
+From 9e0d98d48b2e5f2a2cd72e3eac756564fe1d3990 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
+Date: Tue, 22 Sep 2026 13:34:54 +0200
+Subject: [PATCH] tests: accept coreutils >= 9.12 shell-quoted env output in
+ test_ssh_env_vars
+
+Since coreutils 9.12, env shell-quotes values written to a terminal
+by default (a pty counts as one, see coreutils issue #355 for the
+history: https://github.com/coreutils/coreutils/issues/355).
+
+This makes the literal, unquoted match for TSET= in
+test_ssh_env_vars no longer find the value, so the test times out
+waiting for it and eventually surfaces as an EIO reading from the pty
+once the child has already exited. Accept the shlex-quoted form of
+the value as well, since the ssh kitten's own env-passing code does
+not use env and is unaffected.
+
+Observed failure (Fedora rawhide buildroot with coreutils-9.12-1.fc46):
+
+    ======================================================================
+    ERROR: test_ssh_env_vars (kitty_tests.ssh.SSHKitten.test_ssh_env_vars)
+    ----------------------------------------------------------------------
+    Traceback (most recent call last):
+      File "kitty_tests/__init__.py", line 461, in wait_till
+        self.process_input_from_child(timeout=end_time - time.monotonic())
+      File "kitty_tests/__init__.py", line 449, in process_input_from_child
+        data = os.read(self.master_fd, io.DEFAULT_BUFFER_SIZE)
+    OSError: [Errno 5] Input/output error
+
+    The above exception was the direct cause of the following exception:
+
+    Traceback (most recent call last):
+      File "kitty_tests/__init__.py", line 250, in wrapper
+        return func(*args, **kwargs)
+      File "kitty_tests/ssh.py", line 146, in test_ssh_env_vars
+        pty.wait_till(lambda: 'TSET={}'.format(tset.replace('$A', 'AAA')) in pty.screen_contents())
+      File "kitty_tests/__init__.py", line 464, in wait_till
+        raise Exception(f'Failed to read from pty with error: {e}. {self.screen_contents_for_error()}') from e
+    Exception: Failed to read from pty with error: [Errno 5] Input/output error. Screen contents as repr:
+    '...\nA=AAA\nTSET=\'AAA-$(echo no)-`echo no2` !Q5 "something else"\'\n...'
+
+    Ran 337 tests in 19.341s
+    FAILED (errors=1, skipped=3)
+
+Assisted-By: Claude Sonnet 5
+---
+ kitty_tests/ssh.py | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/kitty_tests/ssh.py b/kitty_tests/ssh.py
+index 3d930b1..9bbd629 100644
+--- a/kitty_tests/ssh.py
++++ b/kitty_tests/ssh.py
+@@ -4,6 +4,7 @@
+ import glob
+ import json
+ import os
++import shlex
+ import shutil
+ import subprocess
+ import tempfile
+@@ -143,7 +144,13 @@ def test_ssh_env_vars(self):
+                 pty = self.check_bootstrap(
+                     sh, tdir, test_script='env; pwd; exit 0', SHELL_INTEGRATION_VALUE='', conf=conf
+                 )
+-                pty.wait_till(lambda: 'TSET={}'.format(tset.replace('$A', 'AAA')) in pty.screen_contents())
++                # coreutils >= 9.12 has env(1) shell-quote values written to a terminal,
++                # so accept both the raw and the shell-quoted form of the value.
++                expected_tset = tset.replace('$A', 'AAA')
++                pty.wait_till(lambda: (
++                    f'TSET={expected_tset}' in pty.screen_contents()
++                    or f'TSET={shlex.quote(expected_tset)}' in pty.screen_contents()
++                ))
+                 self.assertNotIn('COLORTERM', pty.screen_contents())
+                 pty.wait_till(lambda: '/cwd' in pty.screen_contents())
+                 self.assertTrue(pty.is_echo_on())
+-- 
+2.55.0
+

diff --git a/kitty.spec b/kitty.spec
index 8e7ce61..7d2e562 100644
--- a/kitty.spec
+++ b/kitty.spec
@@ -43,6 +43,10 @@ Patch:          kitty-do-not-treat-DeprecationWarnings-as-errors-in-tests.patch
 # https://github.com/kovidgoyal/kitty/pull/10491 rebased
 Patch:          10491.patch
 
+# tests: accept coreutils >= 9.12 shell-quoted env output in test_ssh_env_vars
+# https://github.com/kovidgoyal/kitty/pull/10513 rebased
+Patch:          10513.patch
+
 # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
 ExcludeArch:    %{ix86}
 

                 reply	other threads:[~2026-09-22 11:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179007821717.1.9756307178178884863.rpms-kitty-e0993e7e122a@fedoraproject.org \
    --to=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox