[ Upstream commit
1856628baa17032531916984808d1bdfd62700d4 ]
Return non-zero return value if there is any failure reported in this
script during the test. Otherwise it can only reflect the status of
the last command.
Fixes:
f86ca07eb531 ("selftests: net: add arp_ndisc_evict_nocarrier")
Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
readonly V6_ADDR0=2001:db8:91::1
readonly V6_ADDR1=2001:db8:91::2
nsid=100
+ret=0
cleanup_v6()
{
if [ $? -ne 0 ]; then
cleanup_v6
echo "failed"
- exit
+ exit 1
fi
# Set veth2 down, which will put veth1 in NOCARRIER state
if [ $? -ne 0 ]; then
cleanup_v4
echo "failed"
- exit
+ exit 1
fi
# Set veth1 down, which will put veth0 in NOCARRIER state
if [ $? -eq 0 ];then
echo "failed"
+ ret=1
else
echo "ok"
fi
echo "ok"
else
echo "failed"
+ ret=1
fi
cleanup_v4
if [ $? -eq 0 ];then
echo "failed"
+ ret=1
else
echo "ok"
fi
echo "ok"
else
echo "failed"
+ ret=1
fi
cleanup_v6
echo "ok"
else
echo "failed"
+ ret=1
fi
cleanup_v6
fi
run_all_tests
+exit $ret