Message ID | 20210727131753.10924-2-magnus.karlsson@gmail.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | BPF |
Headers | show |
Series | selftests: xsk: various simplifications | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | fail | Series longer than 15 patches |
netdev/tree_selection | success | Clearly marked for bpf-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | warning | 6 maintainers not CCed: linux-kselftest@vger.kernel.org kpsingh@kernel.org kafai@fb.com john.fastabend@gmail.com songliubraving@fb.com shuah@kernel.org |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 63 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
On 7/27/21 6:17 AM, Magnus Karlsson wrote: > From: Magnus Karlsson <magnus.karlsson@intel.com> > > Remove color mode. Could you add some reasoning in the commit message why removing color mode is a good idea? > > Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com> > --- > tools/testing/selftests/bpf/test_xsk.sh | 10 +++----- > tools/testing/selftests/bpf/xsk_prereqs.sh | 27 +++++----------------- > 2 files changed, 9 insertions(+), 28 deletions(-) > > diff --git a/tools/testing/selftests/bpf/test_xsk.sh b/tools/testing/selftests/bpf/test_xsk.sh > index 46633a3bfb0b..cd7bf32e6a17 100755 > --- a/tools/testing/selftests/bpf/test_xsk.sh > +++ b/tools/testing/selftests/bpf/test_xsk.sh > @@ -63,14 +63,11 @@ > # ---------------- > # Must run with CAP_NET_ADMIN capability. > # > -# Run (full color-coded output): > -# sudo ./test_xsk.sh -c > +# Run: > +# sudo ./test_xsk.sh > # > # If running from kselftests: > -# sudo make colorconsole=1 run_tests > -# > -# Run (full output without color-coding): > -# sudo ./test_xsk.sh > +# sudo make run_tests [...]
On Tue, Jul 27, 2021 at 6:43 PM Yonghong Song <yhs@fb.com> wrote: > > > > On 7/27/21 6:17 AM, Magnus Karlsson wrote: > > From: Magnus Karlsson <magnus.karlsson@intel.com> > > > > Remove color mode. > > Could you add some reasoning in the commit message why > removing color mode is a good idea? Will do. The reason is that I do not see color text output adding any value and less code means less of a maintenance burden which is a good thing. But if someone feels that color output is adding value and is using it, I can likely be convinced to keep it. > > > > Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com> > > --- > > tools/testing/selftests/bpf/test_xsk.sh | 10 +++----- > > tools/testing/selftests/bpf/xsk_prereqs.sh | 27 +++++----------------- > > 2 files changed, 9 insertions(+), 28 deletions(-) > > > > diff --git a/tools/testing/selftests/bpf/test_xsk.sh b/tools/testing/selftests/bpf/test_xsk.sh > > index 46633a3bfb0b..cd7bf32e6a17 100755 > > --- a/tools/testing/selftests/bpf/test_xsk.sh > > +++ b/tools/testing/selftests/bpf/test_xsk.sh > > @@ -63,14 +63,11 @@ > > # ---------------- > > # Must run with CAP_NET_ADMIN capability. > > # > > -# Run (full color-coded output): > > -# sudo ./test_xsk.sh -c > > +# Run: > > +# sudo ./test_xsk.sh > > # > > # If running from kselftests: > > -# sudo make colorconsole=1 run_tests > > -# > > -# Run (full output without color-coding): > > -# sudo ./test_xsk.sh > > +# sudo make run_tests > [...]
diff --git a/tools/testing/selftests/bpf/test_xsk.sh b/tools/testing/selftests/bpf/test_xsk.sh index 46633a3bfb0b..cd7bf32e6a17 100755 --- a/tools/testing/selftests/bpf/test_xsk.sh +++ b/tools/testing/selftests/bpf/test_xsk.sh @@ -63,14 +63,11 @@ # ---------------- # Must run with CAP_NET_ADMIN capability. # -# Run (full color-coded output): -# sudo ./test_xsk.sh -c +# Run: +# sudo ./test_xsk.sh # # If running from kselftests: -# sudo make colorconsole=1 run_tests -# -# Run (full output without color-coding): -# sudo ./test_xsk.sh +# sudo make run_tests # # Run with verbose output: # sudo ./test_xsk.sh -v @@ -83,7 +80,6 @@ while getopts "cvD" flag do case "${flag}" in - c) colorconsole=1;; v) verbose=1;; D) dump_pkts=1;; esac diff --git a/tools/testing/selftests/bpf/xsk_prereqs.sh b/tools/testing/selftests/bpf/xsk_prereqs.sh index dac1c5f78752..8fe022a4dbfa 100755 --- a/tools/testing/selftests/bpf/xsk_prereqs.sh +++ b/tools/testing/selftests/bpf/xsk_prereqs.sh @@ -8,11 +8,6 @@ ksft_xfail=2 ksft_xpass=3 ksft_skip=4 -GREEN='\033[0;92m' -YELLOW='\033[0;93m' -RED='\033[0;31m' -NC='\033[0m' -STACK_LIM=131072 SPECFILE=veth.spec XSKOBJ=xdpxceiver NUMPKTS=10000 @@ -50,22 +45,12 @@ validate_veth_spec_file() test_status() { statusval=$1 - if [ -n "${colorconsole+set}" ]; then - if [ $statusval -eq 2 ]; then - echo -e "${YELLOW}$2${NC}: [ ${RED}FAIL${NC} ]" - elif [ $statusval -eq 1 ]; then - echo -e "${YELLOW}$2${NC}: [ ${RED}SKIPPED${NC} ]" - elif [ $statusval -eq 0 ]; then - 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 + 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 }