From 190059c69d0aa01b3f17ba5191d0a6e6d9669841 Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Mon, 17 Apr 2023 19:58:47 +0200 Subject: Add CI testing for OpenBSD and NetBSD (#2240) --- psutil/_psbsd.py | 4 ++-- psutil/tests/test_process.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'psutil') 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: -- cgit v1.2.1