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.
Loading
Please register or sign in to comment