From e6bff45281de1a3e55978812468424086b0edac4 Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Sat, 7 Sep 2019 23:38:05 +0200 Subject: fix #1527: Linux process CPU iowait time --- psutil/tests/test_linux.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'psutil/tests/test_linux.py') diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py index bb74ab31..ad3ed936 100755 --- a/psutil/tests/test_linux.py +++ b/psutil/tests/test_linux.py @@ -1993,6 +1993,9 @@ class TestProcess(unittest.TestCase): "0", # cnswap "0", # exit_signal "6", # processor + "0", # rt priority + "0", # policy + "7", # delayacct_blkio_ticks ] content = " ".join(args).encode() with mock_open_content('/proc/%s/stat' % os.getpid(), content): @@ -2007,6 +2010,7 @@ class TestProcess(unittest.TestCase): self.assertEqual(cpu.system, 3 / CLOCK_TICKS) self.assertEqual(cpu.children_user, 4 / CLOCK_TICKS) self.assertEqual(cpu.children_system, 5 / CLOCK_TICKS) + self.assertEqual(cpu.iowait, 7 / CLOCK_TICKS) self.assertEqual(p.cpu_num(), 6) def test_status_file_parsing(self): -- cgit v1.2.1