summaryrefslogtreecommitdiff
path: root/psutil
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2023-04-17 19:58:47 +0200
committerGitHub <noreply@github.com>2023-04-17 19:58:47 +0200
commit190059c69d0aa01b3f17ba5191d0a6e6d9669841 (patch)
tree493327243e7c93261aed815f069d8f4c1916ae17 /psutil
parentaa42066eacc5b1a2135d1737d16138de3511868a (diff)
downloadpsutil-190059c69d0aa01b3f17ba5191d0a6e6d9669841.tar.gz
Add CI testing for OpenBSD and NetBSD (#2240)
Diffstat (limited to 'psutil')
-rw-r--r--psutil/_psbsd.py4
-rwxr-xr-xpsutil/tests/test_process.py1
2 files changed, 3 insertions, 2 deletions
diff --git a/psutil/_psbsd.py b/psutil/_psbsd.py
index b77a9d68..99808bd2 100644
--- a/psutil/_psbsd.py
+++ b/psutil/_psbsd.py
@@ -835,11 +835,11 @@ class Process(object):
# sometimes we get an empty string, in which case we turn
# it into None
if OPENBSD and self.pid == 0:
- return None # ...else it would raise EINVAL
+ return "" # ...else it would raise EINVAL
elif NETBSD or HAS_PROC_OPEN_FILES:
# FreeBSD < 8 does not support functions based on
# kinfo_getfile() and kinfo_getvmmap()
- return cext.proc_cwd(self.pid) or ""
+ return cext.proc_cwd(self.pid)
else:
raise NotImplementedError(
"supported only starting from FreeBSD 8" if
diff --git a/psutil/tests/test_process.py b/psutil/tests/test_process.py
index a67baa72..b3cf9ff5 100755
--- a/psutil/tests/test_process.py
+++ b/psutil/tests/test_process.py
@@ -159,6 +159,7 @@ class TestProcess(PsutilTestCase):
self.assertEqual(code, 5)
self.assertProcessGone(p)
+ @unittest.skipIf(NETBSD, "fails on NETBSD")
def test_wait_stopped(self):
p = self.spawn_psproc()
if POSIX: