Skip to content
Commit e2952da4 authored by Douglas Raillard's avatar Douglas Raillard
Browse files

tests: Fix test_get_task_id

FIX

Fix the test checking that a given comm or pid can only be resolved by
TasksAnalysis.tasks.get_task_id() if it is unambiguously matching a
single (pid, comm) tuple.

The test is testing the "sh" comm is ambiguous, as lots of processes
start their life with the "sh" name (because of shell forking, and the
child is only renamed in a later phase). However, a given PID might only
ever have the "sh" name if it was indeed a shell process. Same applies
for sshd processes.

Therefore, remove the PIDs that can successfully be paired with a single
comm, and make sure we test the entire list, not just until the first
exception is raised.
parent d9053ef9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment