[Bug 297324] sysutils/py-clustershell: Fix unportable tests
[email protected] Fri, 07 Aug 2026 02:34:13 +0000
| Newsgroups | gmane.os.freebsd.devel.ports.bugs |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=297324
Bug ID: 297324
Summary: sysutils/py-clustershell: Fix unportable tests
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: Individual Port(s)
Assignee: [email protected]
Reporter: [email protected]
Created attachment 273515
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=273515&action=edit
v1 sysutils/py-clustershell: Fix bash completion on FreeBSD
While enabling the upstream test suite as suggested in Bug #297050, multiple
unportable tests FAILED on FreeBSD. One cluster of tests was related to the
usage of grep -oP. Since BSD grep does not have a -P option, the test failed. I
patched the affected files to use a combination of grep -E and sed to achieve
the same result, without relying on GNU grep. Another test that failed was the
setrlimit test. It relied on setting RLIMIT_NOFILE to -1 to raise ValueError.
On Linux this seems to work fine, but on FreeBSD an RLIMIT_NOFILE value of -1
represents RLIMIT_INFINITY and is accepted by setrlimit. I patched the test to
mock resource limits and make resource.setrlimit() raise ValueError explicitly.
This makes the test independent of platform-specific rlimit semantics.
I attached two patches to fix these two test failure groups. They may be
merged, or committed separately, whatever seems most appropriate.
--
You are receiving this mail because:
You are the assignee for the bug.