Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210825093722.10219-2-magnus.karlsson@gmail.com

authored by

Magnus Karlsson and committed by
Alexei Starovoitov
d18b09bf 35cba298

+9 -28
+3 -7
tools/testing/selftests/bpf/test_xsk.sh
··· 63 63 # ---------------- 64 64 # Must run with CAP_NET_ADMIN capability. 65 65 # 66 - # Run (full color-coded output): 67 - # sudo ./test_xsk.sh -c 66 + # Run: 67 + # sudo ./test_xsk.sh 68 68 # 69 69 # If running from kselftests: 70 - # sudo make colorconsole=1 run_tests 71 - # 72 - # Run (full output without color-coding): 73 - # sudo ./test_xsk.sh 70 + # sudo make run_tests 74 71 # 75 72 # Run with verbose output: 76 73 # sudo ./test_xsk.sh -v ··· 80 83 while getopts "cvD" flag 81 84 do 82 85 case "${flag}" in 83 - c) colorconsole=1;; 84 86 v) verbose=1;; 85 87 D) dump_pkts=1;; 86 88 esac
+6 -21
tools/testing/selftests/bpf/xsk_prereqs.sh
··· 8 8 ksft_xpass=3 9 9 ksft_skip=4 10 10 11 - GREEN='\033[0;92m' 12 - YELLOW='\033[0;93m' 13 - RED='\033[0;31m' 14 - NC='\033[0m' 15 - STACK_LIM=131072 16 11 SPECFILE=veth.spec 17 12 XSKOBJ=xdpxceiver 18 13 NUMPKTS=10000 ··· 45 50 test_status() 46 51 { 47 52 statusval=$1 48 - if [ -n "${colorconsole+set}" ]; then 49 - if [ $statusval -eq 2 ]; then 50 - echo -e "${YELLOW}$2${NC}: [ ${RED}FAIL${NC} ]" 51 - elif [ $statusval -eq 1 ]; then 52 - echo -e "${YELLOW}$2${NC}: [ ${RED}SKIPPED${NC} ]" 53 - elif [ $statusval -eq 0 ]; then 54 - echo -e "${YELLOW}$2${NC}: [ ${GREEN}PASS${NC} ]" 55 - fi 56 - else 57 - if [ $statusval -eq 2 ]; then 58 - echo -e "$2: [ FAIL ]" 59 - elif [ $statusval -eq 1 ]; then 60 - echo -e "$2: [ SKIPPED ]" 61 - elif [ $statusval -eq 0 ]; then 62 - echo -e "$2: [ PASS ]" 63 - fi 53 + if [ $statusval -eq 2 ]; then 54 + echo -e "$2: [ FAIL ]" 55 + elif [ $statusval -eq 1 ]; then 56 + echo -e "$2: [ SKIPPED ]" 57 + elif [ $statusval -eq 0 ]; then 58 + echo -e "$2: [ PASS ]" 64 59 fi 65 60 } 66 61