Commit 767389c8 authored by Paolo Abeni's avatar Paolo Abeni Committed by David S. Miller

selftests: mptcp: dump more info on errors

Even if that may sound completely unlikely, the mptcp implementation
is not perfect, yet.

When the self-tests report an error we usually need more information
of what the scripts currently report. iproute allow provides
some additional goodies since a few releases, let's dump them.
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
Signed-off-by: default avatarMat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c3ff3b02
......@@ -128,6 +128,7 @@ cleanup()
local netns
for netns in "$ns1" "$ns2" "$ns3" "$ns4";do
ip netns del $netns
rm -f /tmp/$netns.{nstat,out}
done
}
......@@ -438,16 +439,24 @@ do_transfer()
kill ${cappid_connector}
fi
NSTAT_HISTORY=/tmp/${listener_ns}.nstat ip netns exec ${listener_ns} \
nstat | grep Tcp > /tmp/${listener_ns}.out
if [ ${listener_ns} != ${connector_ns} ]; then
NSTAT_HISTORY=/tmp/${connector_ns}.nstat ip netns exec ${connector_ns} \
nstat | grep Tcp > /tmp/${connector_ns}.out
fi
local duration
duration=$((stop-start))
duration=$(printf "(duration %05sms)" $duration)
if [ ${rets} -ne 0 ] || [ ${retc} -ne 0 ]; then
echo "$duration [ FAIL ] client exit code $retc, server $rets" 1>&2
echo -e "\nnetns ${listener_ns} socket stat for ${port}:" 1>&2
ip netns exec ${listener_ns} ss -nita 1>&2 -o "sport = :$port"
ip netns exec ${listener_ns} ss -Menita 1>&2 -o "sport = :$port"
cat /tmp/${listener_ns}.out
echo -e "\nnetns ${connector_ns} socket stat for ${port}:" 1>&2
ip netns exec ${connector_ns} ss -nita 1>&2 -o "dport = :$port"
ip netns exec ${connector_ns} ss -Menita 1>&2 -o "dport = :$port"
[ ${listener_ns} != ${connector_ns} ] && cat /tmp/${connector_ns}.out
cat "$capout"
return 1
fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment