Skip to content

Commit

Permalink
selftests: pmtu: properly redirect stderr to /dev/null
Browse files Browse the repository at this point in the history
The cleanup function uses "$CMD 2 > /dev/null", which doesn't actually
send stderr to /dev/null, so when the netns doesn't exist, the error
message is shown. Use "2> /dev/null" instead, so that those messages
disappear, as was intended.

Fixes: d1f1b9c ("selftests: net: Introduce first PMTU test")
Signed-off-by: Sabrina Dubroca <[email protected]>
Acked-by: Stefano Brivio <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
qsn authored and davem330 committed Sep 19, 2018
1 parent 87ebcff commit 0a286af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/testing/selftests/net/pmtu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ setup() {

cleanup() {
[ ${cleanup_done} -eq 1 ] && return
ip netns del ${NS_A} 2 > /dev/null
ip netns del ${NS_B} 2 > /dev/null
ip netns del ${NS_A} 2> /dev/null
ip netns del ${NS_B} 2> /dev/null
cleanup_done=1
}

Expand Down

0 comments on commit 0a286af

Please sign in to comment.