From d078a1113febf93ec9124521c0d4d7ee8409b178 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Fri, 15 Jul 2022 15:21:35 +1000 Subject: tests: Remove unnecessary ^D in passt_in_ns teardown teardown_passt_in_ns() sends a ^D to the NS pane, which appears to be intended to terminate the nsenter running there, leaving the namespace. However, we've also sent a ^D to the PASST pane which will exit the pasta instance which created the namespace. With the namespace destroyed the nsenter in the NS pane will be killed, so it does not need to be exited explicitly. In fact sending the extra ^D can be harmful, since it will exit the shell in which the nsenter was run, causing the whole pane to be closed. That can then mean that the "pane_wait NS" hangs indefinitely. I believe this will sometimes work, because there's a race between the various options here, but it should be more reliable without the extra ^D. Signed-off-by: David Gibson --- test/lib/setup | 2 -- 1 file changed, 2 deletions(-) (limited to 'test/lib') diff --git a/test/lib/setup b/test/lib/setup index e010545..92f9ce1 100755 --- a/test/lib/setup +++ b/test/lib/setup @@ -306,8 +306,6 @@ teardown_passt_in_ns() { [ ${VALGRIND} -eq 0 ] && pane_status GUEST tmux send-keys -t ${PANE_PASST} "C-d" - tmux send-keys -t ${PANE_NS} "C-d" - pane_wait GUEST pane_wait NS pane_wait PASST -- cgit v1.2.3