Skip to content

Commit

Permalink
openbsd: skip test if cmdline() returns [] due to EBUSY
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Jun 6, 2024
1 parent 4b1a054 commit 9421bf8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion psutil/tests/test_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,9 +758,15 @@ def test_long_cmdline(self):
self.assertEqual(p.cmdline(), cmdline)
except psutil.ZombieProcess:
raise unittest.SkipTest("OPENBSD: process turned into zombie")
else:
elif NETBSD:
ret = p.cmdline()
if ret == []:
# https://github.com/giampaolo/psutil/issues/2250
raise unittest.SkipTest("OPENBSD: returned EBUSY")
self.assertEqual(p.cmdline(), cmdline)

self.assertEqual(p.cmdline(), cmdline)

def test_name(self):
p = self.spawn_psproc()
name = p.name().lower()
Expand Down

0 comments on commit 9421bf8

Please sign in to comment.