summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/xsk_prereqs.sh
diff options
context:
space:
mode:
authorMagnus Karlsson <magnus.karlsson@intel.com>2021-02-23 19:23:01 +0300
committerAlexei Starovoitov <ast@kernel.org>2021-02-26 23:08:48 +0300
commitecde60614d5ed60fde1c80b38b71582a3ea2e662 (patch)
tree5eb3a48bcb94852c0ad67c178c1db36112b53e51 /tools/testing/selftests/bpf/xsk_prereqs.sh
parente6ac593372aadacc14e02b198e4a1acfef1db595 (diff)
downloadlinux-ecde60614d5ed60fde1c80b38b71582a3ea2e662.tar.xz
selftest/bpf: Make xsk tests less verbose
Make the xsk tests less verbose by only printing the essentials. Currently, it is hard to see if the tests passed or not due to all the printouts. Move the extra printouts to a verbose option, if further debugging is needed when a problem arises. To run the xsk tests with verbose output: ./test_xsk.sh -v Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Link: https://lore.kernel.org/bpf/20210223162304.7450-2-ciara.loftus@intel.com
Diffstat (limited to 'tools/testing/selftests/bpf/xsk_prereqs.sh')
-rwxr-xr-xtools/testing/selftests/bpf/xsk_prereqs.sh9
1 files changed, 3 insertions, 6 deletions
diff --git a/tools/testing/selftests/bpf/xsk_prereqs.sh b/tools/testing/selftests/bpf/xsk_prereqs.sh
index 9d54c4645127..ef8c5b31f4b6 100755
--- a/tools/testing/selftests/bpf/xsk_prereqs.sh
+++ b/tools/testing/selftests/bpf/xsk_prereqs.sh
@@ -82,24 +82,21 @@ clear_configs()
{
if [ $(ip netns show | grep $3 &>/dev/null; echo $?;) == 0 ]; then
[ $(ip netns exec $3 ip link show $2 &>/dev/null; echo $?;) == 0 ] &&
- { echo "removing link $1:$2"; ip netns exec $3 ip link del $2; }
- echo "removing ns $3"
+ { ip netns exec $3 ip link del $2; }
ip netns del $3
fi
#Once we delete a veth pair node, the entire veth pair is removed,
#this is just to be cautious just incase the NS does not exist then
#veth node inside NS won't get removed so we explicitly remove it
[ $(ip link show $1 &>/dev/null; echo $?;) == 0 ] &&
- { echo "removing link $1"; ip link del $1; }
+ { ip link del $1; }
if [ -f ${SPECFILE} ]; then
- echo "removing spec file:" ${SPECFILE}
rm -f ${SPECFILE}
fi
}
cleanup_exit()
{
- echo "cleaning up..."
clear_configs $1 $2 $3
}
@@ -131,5 +128,5 @@ execxdpxceiver()
copy[$index]=${!current}
done
- ./${XSKOBJ} -i ${VETH0} -i ${VETH1},${NS1} ${copy[*]} -C ${NUMPKTS}
+ ./${XSKOBJ} -i ${VETH0} -i ${VETH1},${NS1} ${copy[*]} -C ${NUMPKTS} ${VERBOSE_ARG}
}