From: Shaun Tancheff Date: Tue, 7 Apr 2020 23:05:06 +0000 (-0500) Subject: LU-13423 tests: cleanup_netns correctly set result X-Git-Tag: 2.13.54~191 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;ds=sidebyside;h=refs%2Fchanges%2F57%2F38157%2F2;p=fs%2Flustre-release.git LU-13423 tests: cleanup_netns correctly set result The existence test for 'test1pl' should not result in cleanup_netns returning failure to the caller. A slightly more terse if/else can be used to ensure the caller is notified of failure only in the case of test1pl not being deleted. Test-Parameters: trivial HPE-bug-id: LUS-8713 Signed-off-by: Shaun Tancheff Change-Id: I85dee20ec0f0ccd0be17597431fcedda9469d9da Reviewed-on: https://review.whamcloud.com/38157 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Chris Horn Reviewed-by: James Simmons Reviewed-by: Aurelien Degremont Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/sanity-lnet.sh b/lustre/tests/sanity-lnet.sh index 4a78b38..b7217e0 100755 --- a/lustre/tests/sanity-lnet.sh +++ b/lustre/tests/sanity-lnet.sh @@ -109,9 +109,7 @@ setup_netns() { cleanup_netns() { (ip netns list | grep -q $TESTNS) && ip netns del $TESTNS - if ip link show test1pl >/dev/null 2>&1; then - ip link del test1pl - fi + ip link show test1pl >& /dev/null && ip link del test1pl || return 0 } configure_dlc() {