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 <shaun.tancheff@hpe.com>
Change-Id: I85dee20ec0f0ccd0be17597431fcedda9469d9da
Reviewed-on: https://review.whamcloud.com/38157
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Aurelien Degremont <degremoa@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
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() {