public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Martin Jackson <mhjacks@swbell.net>
To: git-commits@fedoraproject.org
Subject: [rpms/ckermit] f44: Patch for dir len test error
Date: Sun, 22 Nov 2026 19:32:44 GMT	[thread overview]
Message-ID: <179537596404.1.6549874993930875372.rpms-ckermit-a4689829999c@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/ckermit
Branch : f44
Commit : a4689829999c92799a5d1f21021865da535551a2
Author : Martin Jackson <mhjacks@swbell.net>
Date   : 2026-09-30T19:59:28-05:00
Stats  : +75/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/ckermit/c/a4689829999c92799a5d1f21021865da535551a2?branch=f44

Log:
Patch for dir len test error

---
diff --git a/ckermit-513-fix-dirlentest.patch b/ckermit-513-fix-dirlentest.patch
new file mode 100644
index 0000000..ff34045
--- /dev/null
+++ b/ckermit-513-fix-dirlentest.patch
@@ -0,0 +1,66 @@
+From ea79f73a12785ef4e00b3e0dd47adcddc71ea2c6 Mon Sep 17 00:00:00 2001
+From: John Goerzen <jgoerzen@complete.org>
+Date: Wed, 30 Sep 2026 14:32:07 -0600
+Subject: [PATCH] Test: Fix the assembly of a path
+
+When tmpdir is a certain size, the generated directory name could end in
+a slash, confusing the length-selecting algorithm.  Now stop the loop a
+few bytes earlier to guarantee this won't happen.
+
+Fixes #40.  Thank you Martin Jackson for the report from Fedora.
+---
+ tests/test_wconversion_boundaries.py | 27 +++++++++++++++++----------
+ 1 file changed, 17 insertions(+), 10 deletions(-)
+
+diff --git a/tests/test_wconversion_boundaries.py b/tests/test_wconversion_boundaries.py
+index 208327a..9ed4b99 100644
+--- a/tests/test_wconversion_boundaries.py
++++ b/tests/test_wconversion_boundaries.py
+@@ -23,6 +23,21 @@ def _distinct_chars(length):
+     return "".join(chr(97 + (i % 26)) for i in range(length))
+ 
+ 
++def _long_dirname(base, total=450):
++    """Return a path under base of exactly total characters.
++
++    Each loop component adds 11 characters, so the loop ends between
++    13 and 3 characters short of total.  The final component then has
++    at least two characters and the path never ends in a slash.
++    """
++    path = str(base)
++    while len(path) < total - 13:
++        path += "/" + _distinct_chars(10)
++    path += "/" + "x" * (total - 1 - len(path))
++    assert len(path) == total
++    return path
++
++
+ def test_send_except_pattern_over_256_rejected(run_wermit):
+     """Verify SEND /EXCEPT: rejects patterns longer than 256 characters."""
+     pattern = _distinct_chars(300)
+@@ -106,11 +121,7 @@ def test_get_move_to_long_directory_created(tmp_path, run_wermit):
+ 
+     The directory is created before checking for an active connection.
+     """
+-    destdir = str(tmp_path)
+-    while len(destdir) < 440:
+-        destdir += "/" + _distinct_chars(10)
+-    destdir += "/" + "x" * (449 - len(destdir))
+-    assert len(destdir) == 450
++    destdir = _long_dirname(tmp_path)
+ 
+     result = run_wermit(f"get /move-to:{destdir} nonexistent.txt")
+     assert result.returncode >= 0, (
+@@ -164,11 +175,7 @@ def test_send_move_to_long_directory_created(tmp_path, run_wermit):
+     """
+     src = tmp_path / "f.txt"
+     src.write_text("hello world")
+-    destdir = str(tmp_path)
+-    while len(destdir) < 440:
+-        destdir += "/" + _distinct_chars(10)
+-    destdir += "/" + "x" * (449 - len(destdir))
+-    assert len(destdir) == 450
++    destdir = _long_dirname(tmp_path)
+ 
+     result = run_wermit(f"send /move-to:{destdir} {src}")
+     assert result.returncode >= 0, (

diff --git a/ckermit.spec b/ckermit.spec
index ab1d87b..ec38235 100644
--- a/ckermit.spec
+++ b/ckermit.spec
@@ -8,7 +8,7 @@
 Summary:       The quintessential all-purpose communications program
 Name:          ckermit
 Version:       11.0.513
-Release:       1%{?dist}
+Release:       2%{?dist}
 # Most of the package is under a three-clause BSD license, but the file
 # ckuat2.h appears to be covered by three licenses:
 #   The blanket license in COPYING.TXT and ckcmai.c, which is BSD three-clause
@@ -22,6 +22,7 @@ Source3:       cku-%{name}.modem.generic.ini
 Source4:       cku-%{name}.locale.ini
 Source5:       cku-%{name}.phone
 Source6:       README.fedora
+Patch0:        ckermit-513-fix-dirlentest.patch
 URL:           https://www.openkermit.org/
 BuildRequires: gcc
 BuildRequires: pam-devel
@@ -55,6 +56,7 @@ communication tasks.
 %prep
 %setup -q
 cp %{SOURCE6} .
+%autopatch -p 1
 
 %build
 %make_build linux \
@@ -99,6 +101,12 @@ pytest-3 -n auto
 %{_mandir}/man1/kermit.1*
 
 %changelog
+* Wed Sep 30 2026 Martin Jackson <mhjacks@swbell.net> - 11.0.513-2
+- Test fix for dir len test error
+
+* Wed Sep 30 2026 Martin Jackson <mhjacks@swbell.net> - 11.0.513-1
+- Update to 10.0.513
+
 * Wed Sep 30 2026 Martin Jackson <mhjacks@swbell.net> - 11.0.512-1
 - Update to 10.0.512
 

                 reply	other threads:[~2026-11-22 19:32 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=179537596404.1.6549874993930875372.rpms-ckermit-a4689829999c@fedoraproject.org \
    --to=mhjacks@swbell.net \
    --cc=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