Commit d18b09bf authored by Magnus Karlsson's avatar Magnus Karlsson Committed by Alexei Starovoitov

selftests: xsk: Remove color mode

Remove color mode since it does not add any value and having less code
means less maintenance which is a good thing.
Signed-off-by: default avatarMagnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210825093722.10219-2-magnus.karlsson@gmail.com
parent 35cba298
...@@ -63,14 +63,11 @@ ...@@ -63,14 +63,11 @@
# ---------------- # ----------------
# Must run with CAP_NET_ADMIN capability. # Must run with CAP_NET_ADMIN capability.
# #
# Run (full color-coded output): # Run:
# sudo ./test_xsk.sh -c # sudo ./test_xsk.sh
# #
# If running from kselftests: # If running from kselftests:
# sudo make colorconsole=1 run_tests # sudo make run_tests
#
# Run (full output without color-coding):
# sudo ./test_xsk.sh
# #
# Run with verbose output: # Run with verbose output:
# sudo ./test_xsk.sh -v # sudo ./test_xsk.sh -v
...@@ -83,7 +80,6 @@ ...@@ -83,7 +80,6 @@
while getopts "cvD" flag while getopts "cvD" flag
do do
case "${flag}" in case "${flag}" in
c) colorconsole=1;;
v) verbose=1;; v) verbose=1;;
D) dump_pkts=1;; D) dump_pkts=1;;
esac esac
......
...@@ -8,11 +8,6 @@ ksft_xfail=2 ...@@ -8,11 +8,6 @@ ksft_xfail=2
ksft_xpass=3 ksft_xpass=3
ksft_skip=4 ksft_skip=4
GREEN='\033[0;92m'
YELLOW='\033[0;93m'
RED='\033[0;31m'
NC='\033[0m'
STACK_LIM=131072
SPECFILE=veth.spec SPECFILE=veth.spec
XSKOBJ=xdpxceiver XSKOBJ=xdpxceiver
NUMPKTS=10000 NUMPKTS=10000
...@@ -50,22 +45,12 @@ validate_veth_spec_file() ...@@ -50,22 +45,12 @@ validate_veth_spec_file()
test_status() test_status()
{ {
statusval=$1 statusval=$1
if [ -n "${colorconsole+set}" ]; then if [ $statusval -eq 2 ]; then
if [ $statusval -eq 2 ]; then echo -e "$2: [ FAIL ]"
echo -e "${YELLOW}$2${NC}: [ ${RED}FAIL${NC} ]" elif [ $statusval -eq 1 ]; then
elif [ $statusval -eq 1 ]; then echo -e "$2: [ SKIPPED ]"
echo -e "${YELLOW}$2${NC}: [ ${RED}SKIPPED${NC} ]" elif [ $statusval -eq 0 ]; then
elif [ $statusval -eq 0 ]; then echo -e "$2: [ PASS ]"
echo -e "${YELLOW}$2${NC}: [ ${GREEN}PASS${NC} ]"
fi
else
if [ $statusval -eq 2 ]; then
echo -e "$2: [ FAIL ]"
elif [ $statusval -eq 1 ]; then
echo -e "$2: [ SKIPPED ]"
elif [ $statusval -eq 0 ]; then
echo -e "$2: [ PASS ]"
fi
fi 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