提交 0a286afe 编写于 作者: S Sabrina Dubroca 提交者: David S. Miller

selftests: pmtu: properly redirect stderr to /dev/null

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: d1f1b9cb ("selftests: net: Introduce first PMTU test")
Signed-off-by: NSabrina Dubroca <sd@queasysnail.net>
Acked-by: NStefano Brivio <sbrivio@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 87ebcffd
......@@ -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
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册