diff mbox series

[v2,net-next,2/2] selftests: net: really check for bg process completion

Message ID 0e6f213811f8e93a235307e683af8225cc6277ae.1730828007.git.pabeni@redhat.com (mailing list archive)
State New
Headers show
Series ipv6: fix hangup on device removal | expand

Commit Message

Paolo Abeni Nov. 5, 2024, 6:23 p.m. UTC
A recent refactor transformed the check for process completion
in a true statement, due to a typo.

As a result, the relevant test-case is unable to catch the
regression it was supposed to detect.

Restore the correct condition.

Fixes: 691bb4e49c98 ("selftests: net: avoid just another constant wait")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
 tools/testing/selftests/net/pmtu.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Ahern Nov. 5, 2024, 9:40 p.m. UTC | #1
On 11/5/24 11:23 AM, Paolo Abeni wrote:
> A recent refactor transformed the check for process completion
> in a true statement, due to a typo.
> 
> As a result, the relevant test-case is unable to catch the
> regression it was supposed to detect.
> 
> Restore the correct condition.
> 
> Fixes: 691bb4e49c98 ("selftests: net: avoid just another constant wait")
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> ---
>  tools/testing/selftests/net/pmtu.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Reviewed-by: David Ahern <dsahern@kernel.org>
diff mbox series

Patch

diff --git a/tools/testing/selftests/net/pmtu.sh b/tools/testing/selftests/net/pmtu.sh
index 569bce8b6383..6c651c880fe8 100755
--- a/tools/testing/selftests/net/pmtu.sh
+++ b/tools/testing/selftests/net/pmtu.sh
@@ -2056,7 +2056,7 @@  check_running() {
 	pid=${1}
 	cmd=${2}
 
-	[ "$(cat /proc/${pid}/cmdline 2>/dev/null | tr -d '\0')" = "{cmd}" ]
+	[ "$(cat /proc/${pid}/cmdline 2>/dev/null | tr -d '\0')" = "${cmd}" ]
 }
 
 test_cleanup_vxlanX_exception() {