selftests: net: check jq command is supported
Subsystems (3)
PATCH 1/1 selftests: net: check jq command is supported
The jq command is used in vlan_bridge_binding.sh, if it is not supported, the test will spam the following log.
# ./vlan_bridge_binding.sh: line 51: jq: command not found # ./vlan_bridge_binding.sh: line 51: jq: command not found # ./vlan_bridge_binding.sh: line 51: jq: command not found # ./vlan_bridge_binding.sh: line 51: jq: command not found # ./vlan_bridge_binding.sh: line 51: jq: command not found
# TEST: Test bridge_binding on->off when lower down [FAIL]
# Got operstate of , expected 0
The rtnetlink.sh has the same problem. It makes sense to check if jq is installed before running these tests. After this patch, the vlan_bridge_binding.sh skipped if jq is not supported:
# timeout set to 3600 # selftests: net: vlan_bridge_binding.sh # TEST: jq not installed [SKIP]
--- tools/testing/selftests/net/rtnetlink.sh | 2 ++ tools/testing/selftests/net/vlan_bridge_binding.sh | 2 ++ 2 files changed, 4 insertions(+)
tools/testing/selftests/net/rtnetlink.sh +2 -0
@@ -1466,6 +1466,8 @@ usage: ${0##*/} OPTS EOF } +require_command jq + #check for needed privileges if [ "$(id -u)" -ne 0 ];then end_test "SKIP: Need root privileges"
tools/testing/selftests/net/vlan_bridge_binding.sh +2 -0
@@ -249,6 +249,8 @@ test_binding_toggle_off_when_upper_down() do_test_binding_off : "on->off when upper down" } +require_command jq + trap defer_scopes_cleanup EXIT setup_prepare tests_run
Signature · 1 line
2.34.1
Quoted 54 lines · Wang Liang
The jq command is used in
vlan_bridge_binding.sh, if it is not supported, the test will spam the following log.# ./vlan_bridge_binding.sh: line 51: jq: command not found # ./vlan_bridge_binding.sh: line 51: jq: command not found # ./vlan_bridge_binding.sh: line 51: jq: command not found # ./vlan_bridge_binding.sh: line 51: jq: command not found # ./vlan_bridge_binding.sh: line 51: jq: command not found
# TEST: Testbridge_bindingon->offwhen lower down [FAIL]
# Got operstate of , expected 0The
rtnetlink.shhas the same problem. It makes sense to check if jq is installed before running these tests. After this patch, thevlan_bridge_binding.shskipped if jq is not supported:# timeout set to 3600 # selftests: net: vlan_bridge_binding.sh # TEST: jq not installed [SKIP]Signed-off-by Wang Liang <[email protected]>--- tools/testing/selftests/net/rtnetlink.sh | 2 ++ tools/testing/selftests/net/vlan_bridge_binding.sh | 2 ++ 2 files changed, 4 insertions(+)tools/testing/selftests/net/rtnetlink.sh +2
-0@@ -1466,6 +1466,8 @@ usage: ${0##*/} OPTS EOF } +require_command jq + #check for needed privileges if [ "$(id -u)" -ne 0 ];then end_test "SKIP: Need root privileges"tools/testing/selftests/net/vlan_bridge_binding.sh +2
-0@@ -249,6 +249,8 @@ test_binding_toggle_off_when_upper_down() do_test_binding_off : "on->off when upper down" } +require_command jq + trap defer_scopes_cleanup EXIT setup_prepare tests_runSignature · 1 line
2.34.1
Paolo Abeni
maintainerQuoted 15 lines · Wang Liang
The jq command is used in
vlan_bridge_binding.sh, if it is not supported, the test will spam the following log.# ./vlan_bridge_binding.sh: line 51: jq: command not found # ./vlan_bridge_binding.sh: line 51: jq: command not found # ./vlan_bridge_binding.sh: line 51: jq: command not found # ./vlan_bridge_binding.sh: line 51: jq: command not found # ./vlan_bridge_binding.sh: line 51: jq: command not found
# TEST: Testbridge_bindingon->offwhen lower down [FAIL]
# Got operstate of , expected 0The
rtnetlink.shhas the same problem. It makes sense to check if jq is installed before running these tests. After this patch, thevlan_bridge_binding.shskipped if jq is not supported:
Quoted 5 lines
# timeout set to 3600 # selftests: net: vlan_bridge_binding.sh # TEST: jq not installed [SKIP]Signed-off-by Wang Liang <[email protected]>
This looks more a fix than net-next material (and net-next is currently closed for the merge window).
Please re-post for net including suitable fixes tag(s). You can retain Hangbin's ack.
Thanks,
Paolo
Quoted 24 lines · Paolo Abeni
Quoted 15 lines · Wang Liang
The jq command is used in
vlan_bridge_binding.sh, if it is not supported, the test will spam the following log.# ./vlan_bridge_binding.sh: line 51: jq: command not found # ./vlan_bridge_binding.sh: line 51: jq: command not found # ./vlan_bridge_binding.sh: line 51: jq: command not found # ./vlan_bridge_binding.sh: line 51: jq: command not found # ./vlan_bridge_binding.sh: line 51: jq: command not found
# TEST: Testbridge_bindingon->offwhen lower down [FAIL]
# Got operstate of , expected 0The
rtnetlink.shhas the same problem. It makes sense to check if jq is installed before running these tests. After this patch, thevlan_bridge_binding.shskipped if jq is not supported:Quoted 5 lines
# timeout set to 3600 # selftests: net: vlan_bridge_binding.sh # TEST: jq not installed [SKIP]Signed-off-by Wang Liang <[email protected]>This looks more a fix than net-next material (and net-next is currently closed for the merge window).
Quoted 6 lines
Please re-post for net including suitable fixes tag(s). You can retain Hangbin's ack.
Thanks,
Paolo
Thanks for your reminder!
I missed the ANN e-mail when I was in Chinese National Day vacation. I will repost this patch for net later.
------
Best regards
Wang Liang