mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 21:57:43 +00:00
selftests: xsk: cleanup bash scripts
Remove the spec-file that is not used any longer from the shell scripts. Also remove an unused option. Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com> Link: https://lore.kernel.org/r/20220510115604.8717-2-magnus.karlsson@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
parent
b63b3c490e
commit
685e64a3c9
2 changed files with 1 additions and 18 deletions
|
@ -43,7 +43,6 @@
|
||||||
# ** veth<xxxx> in root namespace
|
# ** veth<xxxx> in root namespace
|
||||||
# ** veth<yyyy> in af_xdp<xxxx> namespace
|
# ** veth<yyyy> in af_xdp<xxxx> namespace
|
||||||
# ** namespace af_xdp<xxxx>
|
# ** namespace af_xdp<xxxx>
|
||||||
# * create a spec file veth.spec that includes this run-time configuration
|
|
||||||
# *** xxxx and yyyy are randomly generated 4 digit numbers used to avoid
|
# *** xxxx and yyyy are randomly generated 4 digit numbers used to avoid
|
||||||
# conflict with any existing interface
|
# conflict with any existing interface
|
||||||
# * tests the veth and xsk layers of the topology
|
# * tests the veth and xsk layers of the topology
|
||||||
|
@ -77,7 +76,7 @@
|
||||||
|
|
||||||
. xsk_prereqs.sh
|
. xsk_prereqs.sh
|
||||||
|
|
||||||
while getopts "cvD" flag
|
while getopts "vD" flag
|
||||||
do
|
do
|
||||||
case "${flag}" in
|
case "${flag}" in
|
||||||
v) verbose=1;;
|
v) verbose=1;;
|
||||||
|
@ -130,12 +129,7 @@ if [ $retval -ne 0 ]; then
|
||||||
exit $retval
|
exit $retval
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "${VETH0}:${VETH1},${NS1}" > ${SPECFILE}
|
|
||||||
|
|
||||||
validate_veth_spec_file
|
|
||||||
|
|
||||||
if [[ $verbose -eq 1 ]]; then
|
if [[ $verbose -eq 1 ]]; then
|
||||||
echo "Spec file created: ${SPECFILE}"
|
|
||||||
VERBOSE_ARG="-v"
|
VERBOSE_ARG="-v"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@ ksft_xfail=2
|
||||||
ksft_xpass=3
|
ksft_xpass=3
|
||||||
ksft_skip=4
|
ksft_skip=4
|
||||||
|
|
||||||
SPECFILE=veth.spec
|
|
||||||
XSKOBJ=xdpxceiver
|
XSKOBJ=xdpxceiver
|
||||||
|
|
||||||
validate_root_exec()
|
validate_root_exec()
|
||||||
|
@ -34,13 +33,6 @@ validate_veth_support()
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
validate_veth_spec_file()
|
|
||||||
{
|
|
||||||
if [ ! -f ${SPECFILE} ]; then
|
|
||||||
test_exit $ksft_skip 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
test_status()
|
test_status()
|
||||||
{
|
{
|
||||||
statusval=$1
|
statusval=$1
|
||||||
|
@ -74,9 +66,6 @@ clear_configs()
|
||||||
#veth node inside NS won't get removed so we explicitly remove it
|
#veth node inside NS won't get removed so we explicitly remove it
|
||||||
[ $(ip link show $1 &>/dev/null; echo $?;) == 0 ] &&
|
[ $(ip link show $1 &>/dev/null; echo $?;) == 0 ] &&
|
||||||
{ ip link del $1; }
|
{ ip link del $1; }
|
||||||
if [ -f ${SPECFILE} ]; then
|
|
||||||
rm -f ${SPECFILE}
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup_exit()
|
cleanup_exit()
|
||||||
|
|
Loading…
Reference in a new issue