Open mtelka opened 9 months ago
Haven't had access to a SunOS box for a long time now. I'm afraid you're on your own.
Haven't had access to a SunOS box for a long time now. I'm afraid you're on your own.
BTW, it is possible to install OpenIndiana as a virtual machine. In VirtualBox it works well.
TestFSAPIsWithInvalidPath.test_proc_cmdline
fails similarly too:
self = <psutil.tests.test_unicode.TestFSAPIsWithInvalidPath testMethod=test_proc_cmdline>
def test_proc_cmdline(self):
cmd = [self.funky_name, "-c", "import time; time.sleep(10)"]
subp = self.spawn_testproc(cmd)
p = psutil.Process(subp.pid)
cmdline = p.cmdline()
for part in cmdline:
self.assertIsInstance(part, str)
if self.expect_exact_path_match():
> self.assertEqual(cmdline, cmd)
E AssertionError: Lists differ: ['/tm[18 chars]94a8zf\udcc0\udc80', '-c', 'import', 'time;', 'time.sleep(10)'] != ['/tm[18 chars]94a8zf\udcc0\udc80', '-c', 'import time; time.sleep(10)']
E
E First differing element 2:
E 'import'
E 'import time; time.sleep(10)'
E
E First list contains 2 additional elements.
E First extra element 3:
E 'time;'
E
E + ['/tmp/@psutil-1700-7zi94a8zf\udcc0\udc80', '-c', 'import time; time.sleep(10)']
E - ['/tmp/@psutil-1700-7zi94a8zf\udcc0\udc80',
E - '-c',
E - 'import',
E - 'time;',
E - 'time.sleep(10)']
psutil/tests/test_unicode.py:227: AssertionError
Summary
Description
The current
Process.cmdline()
implementation for SUNOS is this (filepsutil/_pssunos.py
):Unfortunately, this does not work properly when an argument contains space. This causes the
psutil/tests/test_process.py::TestProcess::test_long_cmdline
test to fail:Please note that
pargs
works properly: