Skip to content

Commit

Permalink
psh: support both [idle] and [kthread] in ps test
Browse files Browse the repository at this point in the history
JIRA: CI-455
  • Loading branch information
damianloew committed Jun 6, 2024
1 parent d592f9e commit 5a5901a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions psh/test-ps.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
(psh)% ps
PID PPID PR STATE %CPU WAIT TIME VMEM THR CMD
0 0 7 ready 97.1 2.9s 31:25 2.6M 1 [idle]
0 0 7 ready 97.1 2.9s 31:25 2.6M 1 [kthread]
5 1 1 sleep 1.7 295ms 0:37 124K 3 uart16550
4 1 4 ready 0.6 7ms 0:12 140K 1 psh
2 1 4 sleep 0.1 52ms 0:03 308K 1 dummyfs
Expand All @@ -14,7 +14,7 @@
@psh.run
def harness(p):
header_seen = False
expected_tasks = ['[idle]', 'init', 'psh']
expected_tasks = ['[kthread]', 'init', 'psh']
ps_header = 'PID PPID PR STATE %CPU WAIT TIME VMEM THR CMD'.split()

p.sendline('ps')
Expand All @@ -41,6 +41,8 @@ def harness(p):
# handle for example /bin/psh
if task.endswith('psh'):
task = 'psh'
if task == '[idle]':
task = '[kthread]' # allow old name of kernel thread
if task in expected_tasks:
expected_tasks.remove(task)

Expand Down

0 comments on commit 5a5901a

Please sign in to comment.