Tests: Fix detection of incoming domain
There can be qemu proccess that is defunct or
in D state (uninterruptible sleep).
We are not counting with the latter case in our detection.
This commit filters out the lines with the state.
@@ -1822,7 +1822,7 @@ var _ = Describe("[Serial][rfe_id:393][crit:high][vendor:cnv-qe@redhat.com][leve
podName := fmt.Sprintf("migration-killer-pod-%d", idx)
// kill the handler right as we detect the qemu target process come online
- pod := tests.RenderPrivilegedPod(podName, []string{"/bin/bash", "-c"}, []string{fmt.Sprintf("while true; do ps aux | grep -v \"defunct\" | grep \"%s\" && pkill -9 virt-handler && sleep 5; done", emulator)})
+ pod := tests.RenderPrivilegedPod(podName, []string{"/bin/bash", "-c"}, []string{fmt.Sprintf("while true; do ps aux | grep -v \"defunct\" | grep -v \"D\" | grep \"%s\" && pkill -9 virt-handler && sleep 5; done", emulator)})
pod.Spec.NodeName = entry.Name
createdPod, err := virtClient.CoreV1().Pods(util.NamespaceTestDefault).Create(context.Background(), pod, metav1.CreateOptions{})
