Migrate tests using virt_lib.sh and ipsec_lib.sh to new API
v2 cover Migrate tests using virt_lib.sh and ipsec_lib.sh to new API
Hi,
Changes v1->v2
Changes requested by Alexey:
* ipsec_lib.sh: remove IPSEC_SIZE_ARRAY and pass -s directly to TST_TEST_DATA, remove now unused IPSEC_LIB_IGNORE_IPSEC_SIZE_ARRAY
* Cleanup useless do_test as TST_TESTFUNC when can be avoided + move code to setup functions (gre01.sh, macsec01.sh, macsec02.sh)
* USE TST_TEST_DATA{,_IFS} for virt_test_0[12] + cleanup unused params
Changes requested by Cyril:
* Return when tst_lib.sh already loaded
Other changes:
* New commit net/virt_lib.sh: Remove possibility to pass custom sizes
* New commit adding macsec_lib.sh
* Remove left TCID
Kind regards,
Petr
Petr Vorel (8):
net/ipsec: Improve log info messages
tst_test.sh: Introduce TST_LIB_LOADED
tst_net.sh: Harden against multiple loading
net/ipsec: Use ':' as array separator for -s parameter net/{stress,virt}: Use SPDX-License-Identifier GPL-2.0-or-later net/virt_lib.sh: Remove possibility to pass custom sizes net/{stress,virt}: Migrate virt_lib.sh, ipsec_lib.sh + tests using
them
net/virt: Introduce macsec_lib.sh to reduce duplicity
runtest/net_stress.ipsec_dccp | 212 +++++++++--------- runtest/net_stress.ipsec_icmp | 168 +++++++------- runtest/net_stress.ipsec_sctp | 212 +++++++++--------- runtest/net_stress.ipsec_tcp | 212 +++++++++--------- runtest/net_stress.ipsec_udp | 208 ++++++++--------- testcases/lib/tst_net.sh | 59 +++-- testcases/lib/tst_test.sh | 3 + testcases/network/stress/dccp/dccp_ipsec.sh | 34 +-- .../network/stress/dccp/dccp_ipsec_vti.sh | 34 +-- .../network/stress/icmp/icmp-uni-basic.sh | 54 ++--- testcases/network/stress/icmp/icmp-uni-vti.sh | 39 ++-- testcases/network/stress/ipsec/ipsec_lib.sh | 171 +++++++------- testcases/network/stress/sctp/sctp_ipsec.sh | 35 +-- .../network/stress/sctp/sctp_ipsec_vti.sh | 35 +-- testcases/network/stress/tcp/tcp_ipsec.sh | 37 +-- testcases/network/stress/tcp/tcp_ipsec_vti.sh | 36 +-- testcases/network/stress/udp/udp_ipsec.sh | 39 +--- testcases/network/stress/udp/udp_ipsec_vti.sh | 39 +--- testcases/network/virt/geneve01.sh | 57 ++--- testcases/network/virt/gre01.sh | 46 ++-- testcases/network/virt/ipvlan01.sh | 29 +-- testcases/network/virt/macsec01.sh | 44 +--- testcases/network/virt/macsec02.sh | 47 +--- testcases/network/virt/macsec_lib.sh | 60 +++++ testcases/network/virt/macvlan01.sh | 29 +-- testcases/network/virt/macvtap01.sh | 29 +-- testcases/network/virt/virt_lib.sh | 212 ++++++------------ testcases/network/virt/vlan01.sh | 35 +-- testcases/network/virt/vlan02.sh | 28 +-- testcases/network/virt/vlan03.sh | 65 +++--- testcases/network/virt/vxlan01.sh | 31 +-- testcases/network/virt/vxlan02.sh | 32 +-- testcases/network/virt/vxlan03.sh | 53 ++--- 33 files changed, 999 insertions(+), 1425 deletions(-) create mode 100755 testcases/network/virt/macsec_lib.sh
Signature · 1 line
2.17.1
PATCH v2 1/8 net/ipsec: Improve log info messages
* Log all IPsec tst_ipsec_setup calls.
* Remove redundant log output from icmp-uni-basic.sh to make it similar to icmp-uni-vti.sh.
--- testcases/network/stress/icmp/icmp-uni-basic.sh | 14 +------------- testcases/network/stress/icmp/icmp-uni-vti.sh | 2 +- testcases/network/stress/ipsec/ipsec_lib.sh | 1 + 3 files changed, 3 insertions(+), 14 deletions(-)
testcases/network/stress/icmp/icmp-uni-basic.sh +1 -13
@@ -25,23 +25,11 @@ TST_CLEANUP="tst_ipsec_cleanup" . ipsec_lib.sh -# Test description -tst_resm TINFO "Sending ICMP messages with the following conditions" -tst_resm TINFO "- Version of IP is IPv${TST_IPV6:-4}" -tst_resm TINFO "- Size of packets are ( $IPSEC_SIZE_ARRAY )" - -if [ -n "$IPSEC_MODE" -a -n "$IPSEC_PROTO" ]; then - case $IPSEC_PROTO in - ah) tst_resm TINFO "- IPsec [ AH / $IPSEC_MODE ]" ;; - esp) tst_resm TINFO "- IPsec [ ESP / $IPSEC_MODE ]" ;; - comp) tst_resm TINFO "- IPcomp [ $IPSEC_MODE ]" ;; - esac -fi - tst_ipsec_setup PING_MAX="$IPSEC_REQUESTS" +tst_resm TINFO "Sending ICMP messages" tst_ping $(tst_iface) $(tst_ipaddr rhost) $IPSEC_SIZE_ARRAY tst_exit
testcases/network/stress/icmp/icmp-uni-vti.sh +1 -1
@@ -26,7 +26,7 @@ do_test() { PING_MAX="$IPSEC_REQUESTS" - tst_resm TINFO "Sending ICMP messages..." + tst_resm TINFO "Sending ICMP messages" tst_ping $tst_vti $ip_rmt_tun $IPSEC_SIZE_ARRAY }
testcases/network/stress/ipsec/ipsec_lib.sh +1 -0
@@ -115,6 +115,7 @@ tst_ipsec_setup() { # Configure SAD/SPD if [ -n "$IPSEC_MODE" -a -n "$IPSEC_PROTO" ]; then + tst_resm TINFO "IPsec[$IPSEC_PROTO/$IPSEC_MODE]" tst_ipsec lhost $(tst_ipaddr) $(tst_ipaddr rhost) tst_ipsec rhost $(tst_ipaddr rhost) $(tst_ipaddr) fi
Signature · 1 line
2.17.1
PATCH v2 2/8 tst_test.sh: Introduce TST_LIB_LOADED
In reply to Petr VorelThis allows to detect whether library was loaded more than once. This is used by tst_net.sh (which is loaded more than once itself by tests macsec0{1,2}.sh).
+ We don't waste time with multiple loading the library.
--- testcases/lib/tst_test.sh | 3 +++ 1 file changed, 3 insertions(+)
testcases/lib/tst_test.sh +3 -0
@@ -21,6 +21,8 @@ # This is a LTP test library for shell. # +[ -n "$TST_LIB_LOADED" ] && return 0 + export TST_PASS=0 export TST_FAIL=0 export TST_BROK=0
@@ -29,6 +31,7 @@ export TST_CONF=0 export TST_COUNT=1 export TST_ITERATIONS=1 export TST_TMPDIR_RHOST=0 +export TST_LIB_LOADED=1 . tst_ansi_color.sh
Signature · 1 line
2.17.1
PATCH v2 2/8 tst_test.sh: Introduce TST_LIB_LOADED
Hi!
Quoted 5 lines
This allows to detect whether library was loaded more than once. This is used by
tst_net.sh(which is loaded more than once itself by tests macsec0{1,2}.sh).+ We don't waste time with multiple loading the library.
Looks good to me, acked.
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH v2 3/8 tst_net.sh: Harden against multiple loading
In reply to Petr VorelSome tests (macsec0{1,2}.sh) load tst_net.sh twice via loading from ipsec_lib.sh and virt_lib.sh.
That brings duplicity in some variables (TST_OPTS) and create infinite loop, as tst_net_setup calls itself.
--- testcases/lib/tst_net.sh | 42 +++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 16 deletions(-)
testcases/lib/tst_net.sh +26 -16
@@ -19,14 +19,6 @@ # Author: Alexey Kodanev <[email protected]> # -TST_OPTS="6$TST_OPTS" -TST_PARSE_ARGS_CALLER="$TST_PARSE_ARGS" -TST_PARSE_ARGS="tst_net_parse_args" -TST_USAGE_CALLER="$TST_USAGE" -TST_USAGE="tst_net_usage" -TST_SETUP_CALLER="$TST_SETUP" -TST_SETUP="tst_net_setup" - # Blank for an IPV4 test; 6 for an IPV6 test. TST_IPV6=${TST_IPV6:-} TST_IPVER=${TST_IPV6:-4}
@@ -73,14 +65,6 @@ tst_net_setup() [ -n "$TST_SETUP_CALLER" ] && $TST_SETUP_CALLER } -if [ -z "$TST_LIB_LOADED" ]; then - [ -n "$TST_USE_LEGACY_API" ] && . test.sh || . tst_test.sh -fi - -if [ -n "$TST_USE_LEGACY_API" ]; then - tst_net_read_opts "$@" -fi - # old vs. new API compatibility layer tst_res_() {
@@ -659,6 +643,32 @@ tst_cleanup_rhost() tst_rhost_run -c "rm -rf $TST_TMPDIR" } +if [ -z "$TST_LIB_LOADED" ]; then + TST_OPTS="6$TST_OPTS" + TST_PARSE_ARGS_CALLER="$TST_PARSE_ARGS" + TST_PARSE_ARGS="tst_net_parse_args" + TST_USAGE_CALLER="$TST_USAGE" + TST_USAGE="tst_net_usage" + TST_SETUP_CALLER="$TST_SETUP" + TST_SETUP="tst_net_setup" + + if [ "$TST_PARSE_ARGS_CALLER" = "$TST_PARSE_ARGS" ]; then + unset TST_PARSE_ARGS_CALLER + fi + if [ "$TST_USAGE_CALLER" = "$TST_USAGE" ]; then + unset TST_USAGE_CALLER + fi + if [ "$TST_PARSE_ARGS_CALLER" = "$TST_PARSE_ARGS" ]; then + unset TST_PARSE_ARGS_CALLER + fi + + [ -n "$TST_USE_LEGACY_API" ] && . test.sh || . tst_test.sh +fi + +if [ -n "$TST_USE_LEGACY_API" ]; then + tst_net_read_opts "$@" +fi + # Management Link [ -z "$RHOST" ] && TST_USE_NETNS="yes" export RHOST="$RHOST"
Signature · 1 line
2.17.1
PATCH v2 3/8 tst_net.sh: Harden against multiple loading
Quoted 60 lines · Petr Vorel
Some tests (macsec0{1,2}.sh) load
tst_net.shtwice via loading fromipsec_lib.shandvirt_lib.sh.
That brings duplicity in some variables (TST_OPTS) and create infinite loop, astst_net_setupcalls itself.Signed-off-by Petr Vorel <[email protected]>--- testcases/lib/tst_net.sh | 42 +++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 16 deletions(-)testcases/lib/tst_net.sh +12
-16@@ -19,14 +19,6 @@ # Author: Alexey Kodanev <[email protected]> # -TST_OPTS="6$TST_OPTS" -TST_PARSE_ARGS_CALLER="$TST_PARSE_ARGS" -TST_PARSE_ARGS="tst_net_parse_args" -TST_USAGE_CALLER="$TST_USAGE" -TST_USAGE="tst_net_usage" -TST_SETUP_CALLER="$TST_SETUP" -TST_SETUP="tst_net_setup" - # Blank for an IPV4 test; 6 for an IPV6 test. TST_IPV6=${TST_IPV6:-} TST_IPVER=${TST_IPV6:-4}@@ -73,14 +65,6 @@ tst_net_setup() [ -n "$TST_SETUP_CALLER" ] && $TST_SETUP_CALLER } -if [ -z "$TST_LIB_LOADED" ]; then - [ -n "$TST_USE_LEGACY_API" ] && . test.sh || . tst_test.sh -fi - -if [ -n "$TST_USE_LEGACY_API" ]; then - tst_net_read_opts "$@" -fi - # old vs. new API compatibility layer tst_res_() {@@ -659,6 +643,32 @@ tst_cleanup_rhost() tst_rhost_run -c "rm -rf $TST_TMPDIR" } +if [ -z "$TST_LIB_LOADED" ]; then + TST_OPTS="6$TST_OPTS" + TST_PARSE_ARGS_CALLER="$TST_PARSE_ARGS" + TST_PARSE_ARGS="tst_net_parse_args" + TST_USAGE_CALLER="$TST_USAGE" + TST_USAGE="tst_net_usage" + TST_SETUP_CALLER="$TST_SETUP" + TST_SETUP="tst_net_setup" + + if [ "$TST_PARSE_ARGS_CALLER" = "$TST_PARSE_ARGS" ]; then + unset TST_PARSE_ARGS_CALLER + fi
testcases/lib/tst_net.sh tst_cleanup_rhost() · line 667
Quoted 10 lines
testcases/lib/tst_net.sh +10
-0+ if [ "$TST_USAGE_CALLER" = "$TST_USAGE" ]; then + unset TST_USAGE_CALLER + fi + if [ "$TST_PARSE_ARGS_CALLER" = "$TST_PARSE_ARGS" ]; then + unset TST_PARSE_ARGS_CALLER + fi + + [ -n "$TST_USE_LEGACY_API" ] && . test.sh || . tst_test.sh +fi +
Hi Petr,
Shouldn't we need a similar check as in the patch for tst_test.sh, instead of this? For example, with TST_LIB_NET_LOADED...
Thanks,
Alexey
Quoted 8 lines
testcases/lib/tst_net.sh +4
-0+if [ -n "$TST_USE_LEGACY_API" ]; then + tst_net_read_opts "$@" +fi + # Management Link [ -z "$RHOST" ] && TST_USE_NETNS="yes" export RHOST="$RHOST"
PATCH v2 4/8 net/ipsec: Use ':' as array separator for -s parameter
In reply to Petr VorelThis is a preparation for new API, which is not able to handle quoted parameters (problematic is TST_ARGS="$@").
-s parameter, used for $IPSEC_SIZE_ARRAY use space as array separator. Use ':' instead, so parameter doesn't have to be quoted.
TST_OPTS and TST_PARSE_ARGS")
--- runtest/net_stress.ipsec_dccp | 212 ++++++++++---------- runtest/net_stress.ipsec_icmp | 168 ++++++++-------- runtest/net_stress.ipsec_sctp | 212 ++++++++++---------- runtest/net_stress.ipsec_tcp | 212 ++++++++++---------- runtest/net_stress.ipsec_udp | 208 +++++++++---------- testcases/network/stress/ipsec/ipsec_lib.sh | 12 +- 6 files changed, 516 insertions(+), 508 deletions(-)
runtest/net_stress.ipsec_dccp +106 -106
@@ -1,109 +1,109 @@ -dccp4_ipsec01 dccp_ipsec.sh -s "100 500 1000" -dccp4_ipsec02 dccp_ipsec.sh -p ah -m transport -s "100 500 1000" -dccp4_ipsec03 dccp_ipsec.sh -p ah -m tunnel -s "100 500 1000" -dccp4_ipsec04 dccp_ipsec.sh -p esp -m transport -s "100 500 1000" -dccp4_ipsec05 dccp_ipsec.sh -p esp -m tunnel -s "100 500 1000" -dccp4_ipsec06 dccp_ipsec.sh -p comp -m transport -s "100 500 1000" -dccp4_ipsec07 dccp_ipsec.sh -p comp -m tunnel -s "100 500 1000" -dccp4_ipsec08 dccp_ipsec.sh -A rfc4106_128 -p esp_aead -m transport -s "100 500 1000" -dccp4_ipsec09 dccp_ipsec.sh -A rfc4106_128 -p esp_aead -m tunnel -s "100 500 1000" -dccp4_ipsec10 dccp_ipsec.sh -A rfc4106_192 -p esp_aead -m transport -s "100 500 1000" -dccp4_ipsec11 dccp_ipsec.sh -A rfc4106_192 -p esp_aead -m tunnel -s "100 500 1000" -dccp4_ipsec12 dccp_ipsec.sh -A rfc4106_256 -p esp_aead -m transport -s "100 500 1000" -dccp4_ipsec13 dccp_ipsec.sh -A rfc4106_256 -p esp_aead -m tunnel -s "100 500 1000" -dccp4_ipsec14 dccp_ipsec.sh -A rfc4309_128 -p esp_aead -m transport -s "100 500 1000" -dccp4_ipsec15 dccp_ipsec.sh -A rfc4309_128 -p esp_aead -m tunnel -s "100 500 1000" -dccp4_ipsec16 dccp_ipsec.sh -A rfc4309_192 -p esp_aead -m transport -s "100 500 1000" -dccp4_ipsec17 dccp_ipsec.sh -A rfc4309_192 -p esp_aead -m tunnel -s "100 500 1000" -dccp4_ipsec18 dccp_ipsec.sh -A rfc4309_256 -p esp_aead -m transport -s "100 500 1000" -dccp4_ipsec19 dccp_ipsec.sh -A rfc4309_256 -p esp_aead -m tunnel -s "100 500 1000" -dccp4_ipsec20 dccp_ipsec.sh -A rfc4543_128 -p esp_aead -m transport -s "100 500 1000" -dccp4_ipsec21 dccp_ipsec.sh -A rfc4543_128 -p esp_aead -m tunnel -s "100 500 1000" -dccp4_ipsec22 dccp_ipsec.sh -A rfc4543_192 -p esp_aead -m transport -s "100 500 1000" -dccp4_ipsec23 dccp_ipsec.sh -A rfc4543_192 -p esp_aead -m tunnel -s "100 500 1000" -dccp4_ipsec24 dccp_ipsec.sh -A rfc4543_256 -p esp_aead -m transport -s "100 500 1000" -dccp4_ipsec25 dccp_ipsec.sh -A rfc4543_256 -p esp_aead -m tunnel -s "100 500 1000" -dccp4_ipsec26 dccp_ipsec.sh -p esp -a sha1 -e cast5 -m transport -s "100 500 1000" -dccp4_ipsec27 dccp_ipsec.sh -p esp -a sha1 -e cast5 -m tunnel -s "100 500 1000" -dccp4_ipsec28 dccp_ipsec.sh -p esp -a sha256 -e blowfish -m transport -s "100 500 1000" -dccp4_ipsec29 dccp_ipsec.sh -p esp -a sha256 -e blowfish -m tunnel -s "100 500 1000" -dccp4_ipsec30 dccp_ipsec.sh -p esp -a sha384 -e twofish -m transport -s "100 500 1000" -dccp4_ipsec31 dccp_ipsec.sh -p esp -a sha384 -e twofish -m tunnel -s "100 500 1000" -dccp4_ipsec32 dccp_ipsec.sh -p esp -a sha512 -e camellia -m transport -s "100 500 1000" -dccp4_ipsec33 dccp_ipsec.sh -p esp -a sha512 -e camellia -m tunnel -s "100 500 1000" -dccp4_ipsec34 dccp_ipsec.sh -p esp -a rmd160 -e serpent -m transport -s "100 500 1000" -dccp4_ipsec35 dccp_ipsec.sh -p esp -a rmd160 -e serpent -m tunnel -s "100 500 1000" -dccp4_ipsec36 dccp_ipsec.sh -p esp -m beet -s "100 500 1000" +dccp4_ipsec01 dccp_ipsec.sh -s 100:500:1000 +dccp4_ipsec02 dccp_ipsec.sh -p ah -m transport -s 100:500:1000 +dccp4_ipsec03 dccp_ipsec.sh -p ah -m tunnel -s 100:500:1000 +dccp4_ipsec04 dccp_ipsec.sh -p esp -m transport -s 100:500:1000 +dccp4_ipsec05 dccp_ipsec.sh -p esp -m tunnel -s 100:500:1000 +dccp4_ipsec06 dccp_ipsec.sh -p comp -m transport -s 100:500:1000 +dccp4_ipsec07 dccp_ipsec.sh -p comp -m tunnel -s 100:500:1000 +dccp4_ipsec08 dccp_ipsec.sh -A rfc4106_128 -p esp_aead -m transport -s 100:500:1000 +dccp4_ipsec09 dccp_ipsec.sh -A rfc4106_128 -p esp_aead -m tunnel -s 100:500:1000 +dccp4_ipsec10 dccp_ipsec.sh -A rfc4106_192 -p esp_aead -m transport -s 100:500:1000 +dccp4_ipsec11 dccp_ipsec.sh -A rfc4106_192 -p esp_aead -m tunnel -s 100:500:1000 +dccp4_ipsec12 dccp_ipsec.sh -A rfc4106_256 -p esp_aead -m transport -s 100:500:1000 +dccp4_ipsec13 dccp_ipsec.sh -A rfc4106_256 -p esp_aead -m tunnel -s 100:500:1000 +dccp4_ipsec14 dccp_ipsec.sh -A rfc4309_128 -p esp_aead -m transport -s 100:500:1000 +dccp4_ipsec15 dccp_ipsec.sh -A rfc4309_128 -p esp_aead -m tunnel -s 100:500:1000 +dccp4_ipsec16 dccp_ipsec.sh -A rfc4309_192 -p esp_aead -m transport -s 100:500:1000 +dccp4_ipsec17 dccp_ipsec.sh -A rfc4309_192 -p esp_aead -m tunnel -s 100:500:1000 +dccp4_ipsec18 dccp_ipsec.sh -A rfc4309_256 -p esp_aead -m transport -s 100:500:1000 +dccp4_ipsec19 dccp_ipsec.sh -A rfc4309_256 -p esp_aead -m tunnel -s 100:500:1000 +dccp4_ipsec20 dccp_ipsec.sh -A rfc4543_128 -p esp_aead -m transport -s 100:500:1000 +dccp4_ipsec21 dccp_ipsec.sh -A rfc4543_128 -p esp_aead -m tunnel -s 100:500:1000 +dccp4_ipsec22 dccp_ipsec.sh -A rfc4543_192 -p esp_aead -m transport -s 100:500:1000 +dccp4_ipsec23 dccp_ipsec.sh -A rfc4543_192 -p esp_aead -m tunnel -s 100:500:1000 +dccp4_ipsec24 dccp_ipsec.sh -A rfc4543_256 -p esp_aead -m transport -s 100:500:1000 +dccp4_ipsec25 dccp_ipsec.sh -A rfc4543_256 -p esp_aead -m tunnel -s 100:500:1000 +dccp4_ipsec26 dccp_ipsec.sh -p esp -a sha1 -e cast5 -m transport -s 100:500:1000 +dccp4_ipsec27 dccp_ipsec.sh -p esp -a sha1 -e cast5 -m tunnel -s 100:500:1000 +dccp4_ipsec28 dccp_ipsec.sh -p esp -a sha256 -e blowfish -m transport -s 100:500:1000 +dccp4_ipsec29 dccp_ipsec.sh -p esp -a sha256 -e blowfish -m tunnel -s 100:500:1000 +dccp4_ipsec30 dccp_ipsec.sh -p esp -a sha384 -e twofish -m transport -s 100:500:1000 +dccp4_ipsec31 dccp_ipsec.sh -p esp -a sha384 -e twofish -m tunnel -s 100:500:1000 +dccp4_ipsec32 dccp_ipsec.sh -p esp -a sha512 -e camellia -m transport -s 100:500:1000 +dccp4_ipsec33 dccp_ipsec.sh -p esp -a sha512 -e camellia -m tunnel -s 100:500:1000 +dccp4_ipsec34 dccp_ipsec.sh -p esp -a rmd160 -e serpent -m transport -s 100:500:1000 +dccp4_ipsec35 dccp_ipsec.sh -p esp -a rmd160 -e serpent -m tunnel -s 100:500:1000 +dccp4_ipsec36 dccp_ipsec.sh -p esp -m beet -s 100:500:1000 -dccp6_ipsec01 dccp_ipsec.sh -6 -s "100 500 1000" -dccp6_ipsec02 dccp_ipsec.sh -6 -p ah -m transport -s "100 500 1000" -dccp6_ipsec03 dccp_ipsec.sh -6 -p ah -m tunnel -s "100 500 1000" -dccp6_ipsec04 dccp_ipsec.sh -6 -p esp -m transport -s "100 500 1000" -dccp6_ipsec05 dccp_ipsec.sh -6 -p esp -m tunnel -s "100 500 1000" -dccp6_ipsec06 dccp_ipsec.sh -6 -p comp -m transport -s "100 500 1000" -dccp6_ipsec07 dccp_ipsec.sh -6 -p comp -m tunnel -s "100 500 1000" -dccp6_ipsec08 dccp_ipsec.sh -6 -A rfc4106_128 -p esp_aead -m transport -s "100 500 1000" -dccp6_ipsec09 dccp_ipsec.sh -6 -A rfc4106_128 -p esp_aead -m tunnel -s "100 500 1000" -dccp6_ipsec10 dccp_ipsec.sh -6 -A rfc4106_192 -p esp_aead -m transport -s "100 500 1000" -dccp6_ipsec11 dccp_ipsec.sh -6 -A rfc4106_192 -p esp_aead -m tunnel -s "100 500 1000" -dccp6_ipsec12 dccp_ipsec.sh -6 -A rfc4106_256 -p esp_aead -m transport -s "100 500 1000" -dccp6_ipsec13 dccp_ipsec.sh -6 -A rfc4106_256 -p esp_aead -m tunnel -s "100 500 1000" -dccp6_ipsec14 dccp_ipsec.sh -6 -A rfc4309_128 -p esp_aead -m transport -s "100 500 1000" -dccp6_ipsec15 dccp_ipsec.sh -6 -A rfc4309_128 -p esp_aead -m tunnel -s "100 500 1000" -dccp6_ipsec16 dccp_ipsec.sh -6 -A rfc4309_192 -p esp_aead -m transport -s "100 500 1000" -dccp6_ipsec17 dccp_ipsec.sh -6 -A rfc4309_192 -p esp_aead -m tunnel -s "100 500 1000" -dccp6_ipsec18 dccp_ipsec.sh -6 -A rfc4309_256 -p esp_aead -m transport -s "100 500 1000" -dccp6_ipsec19 dccp_ipsec.sh -6 -A rfc4309_256 -p esp_aead -m tunnel -s "100 500 1000" -dccp6_ipsec20 dccp_ipsec.sh -6 -A rfc4543_128 -p esp_aead -m transport -s "100 500 1000" -dccp6_ipsec21 dccp_ipsec.sh -6 -A rfc4543_128 -p esp_aead -m tunnel -s "100 500 1000" -dccp6_ipsec22 dccp_ipsec.sh -6 -A rfc4543_192 -p esp_aead -m transport -s "100 500 1000" -dccp6_ipsec23 dccp_ipsec.sh -6 -A rfc4543_192 -p esp_aead -m tunnel -s "100 500 1000" -dccp6_ipsec24 dccp_ipsec.sh -6 -A rfc4543_256 -p esp_aead -m transport -s "100 500 1000" -dccp6_ipsec25 dccp_ipsec.sh -6 -A rfc4543_256 -p esp_aead -m tunnel -s "100 500 1000" -dccp6_ipsec26 dccp_ipsec.sh -6 -p esp -a sha1 -e cast5 -m transport -s "100 500 1000" -dccp6_ipsec27 dccp_ipsec.sh -6 -p esp -a sha1 -e cast5 -m tunnel -s "100 500 1000" -dccp6_ipsec28 dccp_ipsec.sh -6 -p esp -a sha256 -e blowfish -m transport -s "100 500 1000" -dccp6_ipsec29 dccp_ipsec.sh -6 -p esp -a sha256 -e blowfish -m tunnel -s "100 500 1000" -dccp6_ipsec30 dccp_ipsec.sh -6 -p esp -a sha384 -e twofish -m transport -s "100 500 1000" -dccp6_ipsec31 dccp_ipsec.sh -6 -p esp -a sha384 -e twofish -m tunnel -s "100 500 1000" -dccp6_ipsec32 dccp_ipsec.sh -6 -p esp -a sha512 -e camellia -m transport -s "100 500 1000" -dccp6_ipsec33 dccp_ipsec.sh -6 -p esp -a sha512 -e camellia -m tunnel -s "100 500 1000" -dccp6_ipsec34 dccp_ipsec.sh -6 -p esp -a rmd160 -e serpent -m transport -s "100 500 1000" -dccp6_ipsec35 dccp_ipsec.sh -6 -p esp -a rmd160 -e serpent -m tunnel -s "100 500 1000" -dccp6_ipsec36 dccp_ipsec.sh -6 -p esp -m beet -s "100 500 1000" +dccp6_ipsec01 dccp_ipsec.sh -6 -s 100:500:1000 +dccp6_ipsec02 dccp_ipsec.sh -6 -p ah -m transport -s 100:500:1000 +dccp6_ipsec03 dccp_ipsec.sh -6 -p ah -m tunnel -s 100:500:1000 +dccp6_ipsec04 dccp_ipsec.sh -6 -p esp -m transport -s 100:500:1000 +dccp6_ipsec05 dccp_ipsec.sh -6 -p esp -m tunnel -s 100:500:1000 +dccp6_ipsec06 dccp_ipsec.sh -6 -p comp -m transport -s 100:500:1000 +dccp6_ipsec07 dccp_ipsec.sh -6 -p comp -m tunnel -s 100:500:1000 +dccp6_ipsec08 dccp_ipsec.sh -6 -A rfc4106_128 -p esp_aead -m transport -s 100:500:1000 +dccp6_ipsec09 dccp_ipsec.sh -6 -A rfc4106_128 -p esp_aead -m tunnel -s 100:500:1000 +dccp6_ipsec10 dccp_ipsec.sh -6 -A rfc4106_192 -p esp_aead -m transport -s 100:500:1000 +dccp6_ipsec11 dccp_ipsec.sh -6 -A rfc4106_192 -p esp_aead -m tunnel -s 100:500:1000 +dccp6_ipsec12 dccp_ipsec.sh -6 -A rfc4106_256 -p esp_aead -m transport -s 100:500:1000 +dccp6_ipsec13 dccp_ipsec.sh -6 -A rfc4106_256 -p esp_aead -m tunnel -s 100:500:1000 +dccp6_ipsec14 dccp_ipsec.sh -6 -A rfc4309_128 -p esp_aead -m transport -s 100:500:1000 +dccp6_ipsec15 dccp_ipsec.sh -6 -A rfc4309_128 -p esp_aead -m tunnel -s 100:500:1000 +dccp6_ipsec16 dccp_ipsec.sh -6 -A rfc4309_192 -p esp_aead -m transport -s 100:500:1000 +dccp6_ipsec17 dccp_ipsec.sh -6 -A rfc4309_192 -p esp_aead -m tunnel -s 100:500:1000 +dccp6_ipsec18 dccp_ipsec.sh -6 -A rfc4309_256 -p esp_aead -m transport -s 100:500:1000 +dccp6_ipsec19 dccp_ipsec.sh -6 -A rfc4309_256 -p esp_aead -m tunnel -s 100:500:1000 +dccp6_ipsec20 dccp_ipsec.sh -6 -A rfc4543_128 -p esp_aead -m transport -s 100:500:1000 +dccp6_ipsec21 dccp_ipsec.sh -6 -A rfc4543_128 -p esp_aead -m tunnel -s 100:500:1000 +dccp6_ipsec22 dccp_ipsec.sh -6 -A rfc4543_192 -p esp_aead -m transport -s 100:500:1000 +dccp6_ipsec23 dccp_ipsec.sh -6 -A rfc4543_192 -p esp_aead -m tunnel -s 100:500:1000 +dccp6_ipsec24 dccp_ipsec.sh -6 -A rfc4543_256 -p esp_aead -m transport -s 100:500:1000 +dccp6_ipsec25 dccp_ipsec.sh -6 -A rfc4543_256 -p esp_aead -m tunnel -s 100:500:1000 +dccp6_ipsec26 dccp_ipsec.sh -6 -p esp -a sha1 -e cast5 -m transport -s 100:500:1000 +dccp6_ipsec27 dccp_ipsec.sh -6 -p esp -a sha1 -e cast5 -m tunnel -s 100:500:1000 +dccp6_ipsec28 dccp_ipsec.sh -6 -p esp -a sha256 -e blowfish -m transport -s 100:500:1000 +dccp6_ipsec29 dccp_ipsec.sh -6 -p esp -a sha256 -e blowfish -m tunnel -s 100:500:1000 +dccp6_ipsec30 dccp_ipsec.sh -6 -p esp -a sha384 -e twofish -m transport -s 100:500:1000 +dccp6_ipsec31 dccp_ipsec.sh -6 -p esp -a sha384 -e twofish -m tunnel -s 100:500:1000 +dccp6_ipsec32 dccp_ipsec.sh -6 -p esp -a sha512 -e camellia -m transport -s 100:500:1000 +dccp6_ipsec33 dccp_ipsec.sh -6 -p esp -a sha512 -e camellia -m tunnel -s 100:500:1000 +dccp6_ipsec34 dccp_ipsec.sh -6 -p esp -a rmd160 -e serpent -m transport -s 100:500:1000 +dccp6_ipsec35 dccp_ipsec.sh -6 -p esp -a rmd160 -e serpent -m tunnel -s 100:500:1000 +dccp6_ipsec36 dccp_ipsec.sh -6 -p esp -m beet -s 100:500:1000 -dccp4_ipsec_vti01 dccp_ipsec_vti.sh -p ah -m tunnel -s "100 500 1000" -dccp4_ipsec_vti02 dccp_ipsec_vti.sh -p esp -m tunnel -s "100 500 1000" -# dccp4_ipsec_vti03 dccp_ipsec_vti.sh -p comp -m tunnel -s "100 500 1000" -dccp4_ipsec_vti04 dccp_ipsec_vti.sh -A rfc4106_128 -p esp_aead -m tunnel -s "100 500 1000" -dccp4_ipsec_vti05 dccp_ipsec_vti.sh -A rfc4106_192 -p esp_aead -m tunnel -s "100 500 1000" -dccp4_ipsec_vti06 dccp_ipsec_vti.sh -A rfc4106_256 -p esp_aead -m tunnel -s "100 500 1000" -dccp4_ipsec_vti07 dccp_ipsec_vti.sh -A rfc4309_128 -p esp_aead -m tunnel -s "100 500 1000" -dccp4_ipsec_vti08 dccp_ipsec_vti.sh -A rfc4309_192 -p esp_aead -m tunnel -s "100 500 1000" -dccp4_ipsec_vti09 dccp_ipsec_vti.sh -A rfc4309_256 -p esp_aead -m tunnel -s "100 500 1000" -dccp4_ipsec_vti10 dccp_ipsec_vti.sh -A rfc4543_128 -p esp_aead -m tunnel -s "100 500 1000" -dccp4_ipsec_vti11 dccp_ipsec_vti.sh -A rfc4543_192 -p esp_aead -m tunnel -s "100 500 1000" -dccp4_ipsec_vti12 dccp_ipsec_vti.sh -A rfc4543_256 -p esp_aead -m tunnel -s "100 500 1000" -dccp4_ipsec_vti13 dccp_ipsec_vti.sh -p esp -a sha1 -e cast5 -m tunnel -s "100 500 1000" -dccp4_ipsec_vti14 dccp_ipsec_vti.sh -p esp -a sha256 -e blowfish -m tunnel -s "100 500 1000" -dccp4_ipsec_vti15 dccp_ipsec_vti.sh -p esp -a sha384 -e twofish -m tunnel -s "100 500 1000" -dccp4_ipsec_vti16 dccp_ipsec_vti.sh -p esp -a sha512 -e camellia -m tunnel -s "100 500 1000" -dccp4_ipsec_vti17 dccp_ipsec_vti.sh -p esp -a rmd160 -e serpent -m tunnel -s "100 500 1000" +dccp4_ipsec_vti01 dccp_ipsec_vti.sh -p ah -m tunnel -s 100:500:1000 +dccp4_ipsec_vti02 dccp_ipsec_vti.sh -p esp -m tunnel -s 100:500:1000 +# dccp4_ipsec_vti03 dccp_ipsec_vti.sh -p comp -m tunnel -s 100:500:1000 +dccp4_ipsec_vti04 dccp_ipsec_vti.sh -A rfc4106_128 -p esp_aead -m tunnel -s 100:500:1000 +dccp4_ipsec_vti05 dccp_ipsec_vti.sh -A rfc4106_192 -p esp_aead -m tunnel -s 100:500:1000 +dccp4_ipsec_vti06 dccp_ipsec_vti.sh -A rfc4106_256 -p esp_aead -m tunnel -s 100:500:1000 +dccp4_ipsec_vti07 dccp_ipsec_vti.sh -A rfc4309_128 -p esp_aead -m tunnel -s 100:500:1000 +dccp4_ipsec_vti08 dccp_ipsec_vti.sh -A rfc4309_192 -p esp_aead -m tunnel -s 100:500:1000 +dccp4_ipsec_vti09 dccp_ipsec_vti.sh -A rfc4309_256 -p esp_aead -m tunnel -s 100:500:1000 +dccp4_ipsec_vti10 dccp_ipsec_vti.sh -A rfc4543_128 -p esp_aead -m tunnel -s 100:500:1000 +dccp4_ipsec_vti11 dccp_ipsec_vti.sh -A rfc4543_192 -p esp_aead -m tunnel -s 100:500:1000 +dccp4_ipsec_vti12 dccp_ipsec_vti.sh -A rfc4543_256 -p esp_aead -m tunnel -s 100:500:1000 +dccp4_ipsec_vti13 dccp_ipsec_vti.sh -p esp -a sha1 -e cast5 -m tunnel -s 100:500:1000 +dccp4_ipsec_vti14 dccp_ipsec_vti.sh -p esp -a sha256 -e blowfish -m tunnel -s 100:500:1000 +dccp4_ipsec_vti15 dccp_ipsec_vti.sh -p esp -a sha384 -e twofish -m tunnel -s 100:500:1000 +dccp4_ipsec_vti16 dccp_ipsec_vti.sh -p esp -a sha512 -e camellia -m tunnel -s 100:500:1000 +dccp4_ipsec_vti17 dccp_ipsec_vti.sh -p esp -a rmd160 -e serpent -m tunnel -s 100:500:1000 -dccp6_ipsec_vti01 dccp_ipsec_vti.sh -6 -p ah -m tunnel -s "100 500 1000" -dccp6_ipsec_vti02 dccp_ipsec_vti.sh -6 -p esp -m tunnel -s "100 500 1000" -# dccp6_ipsec_vti03 dccp_ipsec_vti.sh -6 -p comp -m tunnel -s "100 500 1000" -dccp6_ipsec_vti04 dccp_ipsec_vti.sh -6 -A rfc4106_128 -p esp_aead -m tunnel -s "100 500 1000" -dccp6_ipsec_vti05 dccp_ipsec_vti.sh -6 -A rfc4106_192 -p esp_aead -m tunnel -s "100 500 1000" -dccp6_ipsec_vti06 dccp_ipsec_vti.sh -6 -A rfc4106_256 -p esp_aead -m tunnel -s "100 500 1000" -dccp6_ipsec_vti07 dccp_ipsec_vti.sh -6 -A rfc4309_128 -p esp_aead -m tunnel -s "100 500 1000" -dccp6_ipsec_vti08 dccp_ipsec_vti.sh -6 -A rfc4309_192 -p esp_aead -m tunnel -s "100 500 1000" -dccp6_ipsec_vti09 dccp_ipsec_vti.sh -6 -A rfc4309_256 -p esp_aead -m tunnel -s "100 500 1000" -dccp6_ipsec_vti10 dccp_ipsec_vti.sh -6 -A rfc4543_128 -p esp_aead -m tunnel -s "100 500 1000" -dccp6_ipsec_vti11 dccp_ipsec_vti.sh -6 -A rfc4543_192 -p esp_aead -m tunnel -s "100 500 1000" -dccp6_ipsec_vti12 dccp_ipsec_vti.sh -6 -A rfc4543_256 -p esp_aead -m tunnel -s "100 500 1000" -dccp6_ipsec_vti13 dccp_ipsec_vti.sh -6 -p esp -a sha1 -e cast5 -m tunnel -s "100 500 1000" -dccp6_ipsec_vti14 dccp_ipsec_vti.sh -6 -p esp -a sha256 -e blowfish -m tunnel -s "100 500 1000" -dccp6_ipsec_vti15 dccp_ipsec_vti.sh -6 -p esp -a sha384 -e twofish -m tunnel -s "100 500 1000" -dccp6_ipsec_vti16 dccp_ipsec_vti.sh -6 -p esp -a sha512 -e camellia -m tunnel -s "100 500 1000" -dccp6_ipsec_vti17 dccp_ipsec_vti.sh -6 -p esp -a rmd160 -e serpent -m tunnel -s "100 500 1000" +dccp6_ipsec_vti01 dccp_ipsec_vti.sh -6 -p ah -m tunnel -s 100:500:1000 +dccp6_ipsec_vti02 dccp_ipsec_vti.sh -6 -p esp -m tunnel -s 100:500:1000 +# dccp6_ipsec_vti03 dccp_ipsec_vti.sh -6 -p comp -m tunnel -s 100:500:1000 +dccp6_ipsec_vti04 dccp_ipsec_vti.sh -6 -A rfc4106_128 -p esp_aead -m tunnel -s 100:500:1000 +dccp6_ipsec_vti05 dccp_ipsec_vti.sh -6 -A rfc4106_192 -p esp_aead -m tunnel -s 100:500:1000 +dccp6_ipsec_vti06 dccp_ipsec_vti.sh -6 -A rfc4106_256 -p esp_aead -m tunnel -s 100:500:1000 +dccp6_ipsec_vti07 dccp_ipsec_vti.sh -6 -A rfc4309_128 -p esp_aead -m tunnel -s 100:500:1000 +dccp6_ipsec_vti08 dccp_ipsec_vti.sh -6 -A rfc4309_192 -p esp_aead -m tunnel -s 100:500:1000 +dccp6_ipsec_vti09 dccp_ipsec_vti.sh -6 -A rfc4309_256 -p esp_aead -m tunnel -s 100:500:1000 +dccp6_ipsec_vti10 dccp_ipsec_vti.sh -6 -A rfc4543_128 -p esp_aead -m tunnel -s 100:500:1000 +dccp6_ipsec_vti11 dccp_ipsec_vti.sh -6 -A rfc4543_192 -p esp_aead -m tunnel -s 100:500:1000 +dccp6_ipsec_vti12 dccp_ipsec_vti.sh -6 -A rfc4543_256 -p esp_aead -m tunnel -s 100:500:1000 +dccp6_ipsec_vti13 dccp_ipsec_vti.sh -6 -p esp -a sha1 -e cast5 -m tunnel -s 100:500:1000 +dccp6_ipsec_vti14 dccp_ipsec_vti.sh -6 -p esp -a sha256 -e blowfish -m tunnel -s 100:500:1000 +dccp6_ipsec_vti15 dccp_ipsec_vti.sh -6 -p esp -a sha384 -e twofish -m tunnel -s 100:500:1000 +dccp6_ipsec_vti16 dccp_ipsec_vti.sh -6 -p esp -a sha512 -e camellia -m tunnel -s 100:500:1000 +dccp6_ipsec_vti17 dccp_ipsec_vti.sh -6 -p esp -a rmd160 -e serpent -m tunnel -s 100:500:1000
runtest/net_stress.ipsec_icmp +84 -84
177 lines not on this page · raw message
runtest/net_stress.ipsec_sctp +106 -106
215 lines not on this page · raw message
runtest/net_stress.ipsec_tcp +106 -106
215 lines not on this page · raw message
runtest/net_stress.ipsec_udp +104 -104
213 lines not on this page · raw message
testcases/network/stress/ipsec/ipsec_lib.sh +10 -2
@@ -30,7 +30,7 @@ AALGO="sha1" CALGO="deflate" IPSEC_REQUESTS="500" -IPSEC_SIZE_ARRAY="${IPSEC_SIZE_ARRAY:-10 100 1000 2000 10000 65000}" +IPSEC_SIZE_ARRAY="${IPSEC_SIZE_ARRAY:-10:100:1000:2000:10000:65000}" ipsec_lib_parse_args() {
@@ -41,7 +41,7 @@ ipsec_lib_parse_args() echo "l n n is the number of test link when tests run" echo "m x x is ipsec mode, could be transport / tunnel" echo "p x x is ipsec protocol, could be ah / esp / comp" - echo "s x x is icmp message size array" + echo "s x x is icmp message size array (items separated by ':')" echo "S n n is IPsec SPI value" echo "k x key for vti interface" echo "A x Authenticated encryption with associated data algorithm"
@@ -65,6 +65,14 @@ ipsec_lib_parse_args() r) IPSEC_REQUESTS="$2" ;; *) tst_brkm TBROK "unknown option: $1" ;; esac + + local IFS=":" + local tmp="$IPSEC_SIZE_ARRAY" + local p + for p in $IPSEC_SIZE_ARRAY; do + tmp="$p " + done + IPSEC_SIZE_ARRAY="$tmp" } TST_OPTS="hl:m:p:s:S:k:A:e:a:c:r:"
Signature · 1 line
2.17.1
PATCH v2 5/8 net/{stress, virt}: Use SPDX-License-Identifier GPL-2.0-or-later
In reply to Petr Vorelto save space
+ add author in few cases.
--- testcases/lib/tst_net.sh | 17 +---------------- testcases/network/stress/dccp/dccp_ipsec.sh | 15 +-------------- .../network/stress/dccp/dccp_ipsec_vti.sh | 15 +-------------- .../network/stress/icmp/icmp-uni-basic.sh | 18 ++---------------- testcases/network/stress/icmp/icmp-uni-vti.sh | 15 +-------------- testcases/network/stress/ipsec/ipsec_lib.sh | 19 ++----------------- testcases/network/stress/sctp/sctp_ipsec.sh | 15 +-------------- .../network/stress/sctp/sctp_ipsec_vti.sh | 15 +-------------- testcases/network/stress/tcp/tcp_ipsec.sh | 15 +-------------- testcases/network/stress/tcp/tcp_ipsec_vti.sh | 15 +-------------- testcases/network/stress/udp/udp_ipsec.sh | 15 +-------------- testcases/network/stress/udp/udp_ipsec_vti.sh | 15 +-------------- testcases/network/virt/geneve01.sh | 15 +-------------- testcases/network/virt/gre01.sh | 15 +-------------- testcases/network/virt/ipvlan01.sh | 15 +-------------- testcases/network/virt/macsec01.sh | 15 ++------------- testcases/network/virt/macsec02.sh | 15 ++------------- testcases/network/virt/macvlan01.sh | 15 +-------------- testcases/network/virt/macvtap01.sh | 15 +-------------- testcases/network/virt/virt_lib.sh | 16 +--------------- testcases/network/virt/vlan01.sh | 16 +--------------- testcases/network/virt/vlan02.sh | 16 +--------------- testcases/network/virt/vlan03.sh | 15 +-------------- testcases/network/virt/vxlan01.sh | 16 +--------------- testcases/network/virt/vxlan02.sh | 16 +--------------- testcases/network/virt/vxlan03.sh | 15 +-------------- 26 files changed, 30 insertions(+), 374 deletions(-)
testcases/lib/tst_net.sh +1 -16
@@ -1,23 +1,8 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (c) 2014-2017 Oracle and/or its affiliates. All Rights Reserved. # Copyright (c) 2016-2018 Petr Vorel <[email protected]> -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# # Author: Alexey Kodanev <[email protected]> -# # Blank for an IPV4 test; 6 for an IPV6 test. TST_IPV6=${TST_IPV6:-}
testcases/network/stress/dccp/dccp_ipsec.sh +1 -14
@@ -1,19 +1,6 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see <http://www.gnu.org/licenses/>. -# # Author: Alexey Kodanev <[email protected]> TCID=dccp_ipsec
testcases/network/stress/dccp/dccp_ipsec_vti.sh +1 -14
@@ -1,19 +1,6 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see <http://www.gnu.org/licenses/>. -# # Author: Alexey Kodanev <[email protected]> TCID=dccp_ipsec_vti
testcases/network/stress/icmp/icmp-uni-basic.sh +2 -16
@@ -1,23 +1,9 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (c) 2016 Red Hat Inc., All Rights Reserved. # Copyright (c) International Business Machines Corp., 2005 -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see <http://www.gnu.org/licenses/>. -# # Author: Hangbin Liu <[email protected]> -# -################################################################################ + TCID=${TCID:-icmp-uni-basic} TST_TOTAL=1 TST_COUNT=1
testcases/network/stress/icmp/icmp-uni-vti.sh +1 -14
@@ -1,19 +1,6 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (c) 2016 Oracle and/or its affiliates. All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see <http://www.gnu.org/licenses/>. -# # Author: Alexey Kodanev <[email protected]> TCID=icmp-uni-vti
testcases/network/stress/ipsec/ipsec_lib.sh +2 -17
@@ -1,24 +1,9 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Petr Vorel <[email protected]> # Copyright (c) 2016 Red Hat Inc., All Rights Reserved. # Copyright (c) 2016 Oracle and/or its affiliates. All Rights Reserved. -# Copyright (c) 2018 Petr Vorel <[email protected]> -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see <http://www.gnu.org/licenses/>. -# # Author: Hangbin Liu <[email protected]> -# -####################################################################### # Authenticated encryption with associated data AEALGO="rfc4106_128"
testcases/network/stress/sctp/sctp_ipsec.sh +1 -14
@@ -1,19 +1,6 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see <http://www.gnu.org/licenses/>. -# # Author: Alexey Kodanev <[email protected]> TCID=sctp_ipsec
testcases/network/stress/sctp/sctp_ipsec_vti.sh +1 -14
@@ -1,19 +1,6 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see <http://www.gnu.org/licenses/>. -# # Author: Alexey Kodanev <[email protected]> TCID=sctp_ipsec_vti
testcases/network/stress/tcp/tcp_ipsec.sh +1 -14
@@ -1,19 +1,6 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see <http://www.gnu.org/licenses/>. -# # Author: Alexey Kodanev <[email protected]> TCID=tcp_ipsec
testcases/network/stress/tcp/tcp_ipsec_vti.sh +1 -14
@@ -1,19 +1,6 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see <http://www.gnu.org/licenses/>. -# # Author: Alexey Kodanev <[email protected]> TCID=tcp_ipsec_vti
testcases/network/stress/udp/udp_ipsec.sh +1 -14
@@ -1,19 +1,6 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see <http://www.gnu.org/licenses/>. -# # Author: Alexey Kodanev <[email protected]> TCID=udp_ipsec
testcases/network/stress/udp/udp_ipsec_vti.sh +1 -14
@@ -1,19 +1,6 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see <http://www.gnu.org/licenses/>. -# # Author: Alexey Kodanev <[email protected]> TCID=udp_ipsec_vti
testcases/network/virt/geneve01.sh +1 -14
@@ -1,19 +1,6 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (c) 2016-2017 Oracle and/or its affiliates. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# # Author: Alexey Kodanev <[email protected]> TCID=geneve01
testcases/network/virt/gre01.sh +1 -14
@@ -1,19 +1,6 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (c) 2015-2017 Oracle and/or its affiliates. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# # Author: Alexey Kodanev <[email protected]> # # It requires remote host. Test will setup IPv4 and IPv6 virtual
testcases/network/virt/ipvlan01.sh +1 -14
@@ -1,19 +1,6 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# # Author: Alexey Kodanev <[email protected]> # # Local test, check if we can create and then delete ipvlan
testcases/network/virt/macsec01.sh +2 -13
@@ -1,18 +1,7 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# Author: Alexey Kodanev <[email protected]> # # Test-case: setup two MACsec drivers and run TCP traffic over them # with default MACsec configuration, compare performance with similar
testcases/network/virt/macsec02.sh +2 -13
@@ -1,18 +1,7 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# Author: Alexey Kodanev <[email protected]> # # Test-case: setup two MACsec drivers and run TCP traffic over them # with enabled frame encryption and replay protection, compare
testcases/network/virt/macvlan01.sh +1 -14
@@ -1,19 +1,6 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# # Author: Alexey Kodanev <[email protected]> # # Local test, check if we can create and then delete macvlan
testcases/network/virt/macvtap01.sh +1 -14
@@ -1,19 +1,6 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# # Author: Alexey Kodanev <[email protected]> # # Local test, check if we can create and then delete macvtap
testcases/network/virt/virt_lib.sh +1 -15
@@ -1,20 +1,6 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (c) 2014-2017 Oracle and/or its affiliates. All Rights Reserved. -# Copyright (c) 2018 Petr Vorel <[email protected]> -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# # Author: Alexey Kodanev <[email protected]> # # VxLAN
testcases/network/virt/vlan01.sh +1 -15
@@ -1,23 +1,9 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# # Author: Alexey Kodanev <[email protected]> # # Local test, check if we can create multiple VLAN interfaces. -# TCID=vlan01 TST_TOTAL=9
testcases/network/virt/vlan02.sh +1 -15
@@ -1,24 +1,10 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# # Author: Alexey Kodanev <[email protected]> # # Local test, check if we can create and then delete VLAN # interface 4095 times. -# TCID=vlan02 TST_TOTAL=1
testcases/network/virt/vlan03.sh +1 -14
@@ -1,19 +1,6 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (c) 2015-2017 Oracle and/or its affiliates. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# # Author: Alexey Kodanev <[email protected]> # # Test-case 1: It requires remote host. Test will setup IPv4 and IPv6 virtual
testcases/network/virt/vxlan01.sh +1 -15
@@ -1,23 +1,9 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (c) 2014-2015 Oracle and/or its affiliates. All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# # Author: Alexey Kodanev <[email protected]> # # Local test, check if we can create multiple VXLAN interfaces. -# TCID=vxlan01 TST_TOTAL=5
testcases/network/virt/vxlan02.sh +1 -15
@@ -1,24 +1,10 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (c) 2014-2015 Oracle and/or its affiliates. All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# # Author: Alexey Kodanev <[email protected]> # # Local test, check if we can create and then delete VXLAN # interface 5000 times. -# TCID=vxlan02 TST_TOTAL=1
testcases/network/virt/vxlan03.sh +1 -14
@@ -1,19 +1,6 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (c) 2014-2017 Oracle and/or its affiliates. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it would be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# # Author: Alexey Kodanev <[email protected]> # # Test-case 1: It requires remote host. Test will setup IPv4 and IPv6 virtual
Signature · 1 line
2.17.1
PATCH v2 6/8 net/virt_lib.sh: Remove possibility to pass custom sizes
In reply to Petr Vorelto virt_netperf_msg_sizes(). Custom sizes haven't been used yet.
This is a preparation for next commit, which (while rewriting tests into new shell API) start using virt_netperf_msg_sizes() as test functions directly (as in new API it gets $1 for test number since 4bcc0addf.
TST_TESTFUNC="virt_netperf_msg_sizes"
instead of wrapping it into function:
TST_TESTFUNC="do_test"
do_test()
{
virt_netperf_msg_sizes
}Actually the best would be to replace sizes array in function with TST_TEST_DATA, but that would require split tests cases, which use virt_netperf_msg_sizes() with other functions, which are without arrays (e.g. virt_compare_netperf() and virt_minimize_timeout() in vlan03.sh, geneve01.sh abd vxlan03.sh)
---
If you don't like it, I'll just use version with TST_TESTFUNC="do_test" in next commit. Using TST_TEST_DATA is TODO (if you're interested, I'd do it after having done this patch).
--- testcases/network/virt/virt_lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/network/virt/virt_lib.sh +1 -1
@@ -328,7 +328,7 @@ virt_macsec_setup() virt_netperf_msg_sizes() { - local sizes="${@:-100 1000 2000 10000}" + local sizes="100 1000 2000 10000" client_requests=20000 for s in $sizes; do
Signature · 1 line
2.17.1
PATCH v2 6/8 net/virt_lib.sh: Remove possibility to pass custom sizes
Quoted 16 lines · Petr Vorel
to
virt_netperf_msg_sizes(). Custom sizes haven't been used yet.This is a preparation for next commit, which (while rewriting tests into new shell API) start using
virt_netperf_msg_sizes()as test functions directly (as in new API it gets $1 for test number since4bcc0addf.TST_TESTFUNC="virt_netperf_msg_sizes"
instead of wrapping it into function:
TST_TESTFUNC="do_test" do_test() { virt_netperf_msg_sizes }
Quoted 6 lines
Actually the best would be to replace sizes array in function with
TST_TEST_DATA, but that would require split tests cases, which usevirt_netperf_msg_sizes()with other functions, which are without arrays (e.g.virt_compare_netperf()andvirt_minimize_timeout()invlan03.sh,geneve01.shabdvxlan03.sh)
Do you mean using TST_CNT for different options (e.g. in vxlan03.sh " ,gbp"), and TST_TEST_DATA for sizes?
Quoted 14 lines
Signed-off-by Petr Vorel <[email protected]>---
If you don't like it, I'll just use version with TST_TESTFUNC="do_test" in next commit. UsingTST_TEST_DATAis TODO (if you're interested, I'd do it after having done this patch).--- testcases/network/virt/virt_lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)testcases/network/virt/virt_lib.sh +0
-0
testcases/network/virt/virt_lib.sh virt_macsec_setup() · line 333
Quoted 7 lines
testcases/network/virt/virt_lib.sh +1
-1@@ -328,7 +328,7 @@ virt_macsec_setup() virt_netperf_msg_sizes() { - local sizes="${@:-100 1000 2000 10000}" + local sizes="100 1000 2000 10000" client_requests=20000
Just noted, we don't need "client_requests" variable anymore...
Quoted 2 lines
testcases/network/virt/virt_lib.sh +0
-0for s in $sizes; do
PATCH v2 7/8 net/{stress, virt}: Migrate virt_lib.sh, ipsec_lib.sh + tests using them
In reply to Petr VorelIt was needed to migrate it all in once, as macsec0{1,2}.sh tests are using both libraries.
This includes:
* Create setup, getopts and helper function for both libraries.
* Using TST_TEST_DATA and TST_TEST_DATA_IFS in many test cases (simplify tests and allow to have more TST_CNT to keep readability of output + required by udp_ipsec.sh and udp_ipsec_vti.sh otherwise it'd need to use getopts to determine type of udp, as passing parameter to tst_run is not not recommended to new API).
* Put code into TST_TESTFUNC functions.
* Move anything based on TST_IPV6 to TST_SETUP setup functions (as TST_IPV6 is not set until setup)
Other changes:
* udp_ipsec{,_vti}.sh: were calling do_test() twice, with parameter. Now they use correctly TST_CNT and no params.
Order of running tests changed. Before first were run udp tests for all items in $IPSEC_SIZE_ARRAY, then all udp_lite tests. Now for each item in $IPSEC_SIZE_ARRAY both udp and udp_lite tests are run.
* gre01.sh: Move back device type setting (changed in 57738337a "network/gre01: fix device type setting").
--- testcases/network/stress/dccp/dccp_ipsec.sh | 19 +- .../network/stress/dccp/dccp_ipsec_vti.sh | 19 +- .../network/stress/icmp/icmp-uni-basic.sh | 26 +-- testcases/network/stress/icmp/icmp-uni-vti.sh | 24 +-- testcases/network/stress/ipsec/ipsec_lib.sh | 159 ++++++++--------- testcases/network/stress/sctp/sctp_ipsec.sh | 20 +-- .../network/stress/sctp/sctp_ipsec_vti.sh | 20 +-- testcases/network/stress/tcp/tcp_ipsec.sh | 22 +-- testcases/network/stress/tcp/tcp_ipsec_vti.sh | 21 +-- testcases/network/stress/udp/udp_ipsec.sh | 24 ++- testcases/network/stress/udp/udp_ipsec_vti.sh | 24 ++- testcases/network/virt/geneve01.sh | 42 ++--- testcases/network/virt/gre01.sh | 31 ++-- testcases/network/virt/ipvlan01.sh | 14 +- testcases/network/virt/macsec01.sh | 36 ++-- testcases/network/virt/macsec02.sh | 38 ++-- testcases/network/virt/macvlan01.sh | 14 +- testcases/network/virt/macvtap01.sh | 14 +- testcases/network/virt/virt_lib.sh | 167 +++++++----------- testcases/network/virt/vlan01.sh | 19 +- testcases/network/virt/vlan02.sh | 12 +- testcases/network/virt/vlan03.sh | 50 +++--- testcases/network/virt/vxlan01.sh | 15 +- testcases/network/virt/vxlan02.sh | 16 +- testcases/network/virt/vxlan03.sh | 38 ++-- 25 files changed, 404 insertions(+), 480 deletions(-)
testcases/network/stress/dccp/dccp_ipsec.sh +6 -13
@@ -1,25 +1,18 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Petr Vorel <[email protected]> # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved. # Author: Alexey Kodanev <[email protected]> -TCID=dccp_ipsec -TST_TOTAL=3 TST_NEEDS_TMPDIR=1 -TST_CLEANUP="tst_ipsec_cleanup" - +TST_TESTFUNC=do_test +TST_SETUP=tst_ipsec_setup +TST_CLEANUP=tst_ipsec_cleanup . ipsec_lib.sh do_test() { - for p in $IPSEC_SIZE_ARRAY; do - tst_netload -H $(tst_ipaddr rhost) -T dccp -n $p -N $p \ - -r $IPSEC_REQUESTS - done + tst_netload -H $(tst_ipaddr rhost) -T dccp -n $2 -N $2 -r $IPSEC_REQUESTS } -tst_ipsec_setup - -do_test - -tst_exit +tst_run
testcases/network/stress/dccp/dccp_ipsec_vti.sh +6 -13
@@ -1,25 +1,18 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Petr Vorel <[email protected]> # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved. # Author: Alexey Kodanev <[email protected]> -TCID=dccp_ipsec_vti -TST_TOTAL=3 TST_NEEDS_TMPDIR=1 -TST_CLEANUP="tst_ipsec_cleanup" - +TST_TESTFUNC=do_test +TST_SETUP=tst_ipsec_setup_vti +TST_CLEANUP=tst_ipsec_cleanup . ipsec_lib.sh do_test() { - for p in $IPSEC_SIZE_ARRAY; do - tst_netload -H $ip_rmt_tun -T dccp -n $p -N $p \ - -r $IPSEC_REQUESTS - done + tst_netload -H $ip_rmt_tun -T dccp -n $2 -N $2 -r $IPSEC_REQUESTS } -tst_ipsec_setup_vti - -do_test - -tst_exit +tst_run
testcases/network/stress/icmp/icmp-uni-basic.sh +15 -11
@@ -1,21 +1,25 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Petr Vorel <[email protected]> # Copyright (c) 2016 Red Hat Inc., All Rights Reserved. # Copyright (c) International Business Machines Corp., 2005 # Author: Hangbin Liu <[email protected]> -TCID=${TCID:-icmp-uni-basic} -TST_TOTAL=1 -TST_COUNT=1 -TST_CLEANUP="tst_ipsec_cleanup" - +TST_TESTFUNC=do_test +TST_SETUP=do_setup +TST_CLEANUP=tst_ipsec_cleanup . ipsec_lib.sh -tst_ipsec_setup - -PING_MAX="$IPSEC_REQUESTS" +do_setup() +{ + tst_ipsec_setup + PING_MAX="$IPSEC_REQUESTS" + tst_res TINFO "Sending ICMP messages" +} -tst_resm TINFO "Sending ICMP messages" -tst_ping $(tst_iface) $(tst_ipaddr rhost) $IPSEC_SIZE_ARRAY +do_test() +{ + tst_ping $(tst_iface) $(tst_ipaddr rhost) $2 +} -tst_exit +tst_run
testcases/network/stress/icmp/icmp-uni-vti.sh +12 -12
@@ -1,24 +1,24 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Petr Vorel <[email protected]> # Copyright (c) 2016 Oracle and/or its affiliates. All Rights Reserved. # Author: Alexey Kodanev <[email protected]> -TCID=icmp-uni-vti -TST_TOTAL=1 -TST_CLEANUP="tst_ipsec_cleanup" - +TST_TESTFUNC=do_test +TST_SETUP=do_setup +TST_CLEANUP=tst_ipsec_cleanup . ipsec_lib.sh -do_test() +do_setup() { + tst_ipsec_setup_vti PING_MAX="$IPSEC_REQUESTS" - - tst_resm TINFO "Sending ICMP messages" - tst_ping $tst_vti $ip_rmt_tun $IPSEC_SIZE_ARRAY + tst_res TINFO "Sending ICMP messages" } -tst_ipsec_setup_vti - -do_test +do_test() +{ + tst_ping $tst_vti $ip_rmt_tun $2 +} -tst_exit +tst_run
testcases/network/stress/ipsec/ipsec_lib.sh +76 -83
240 lines not on this page · raw message
testcases/network/stress/sctp/sctp_ipsec.sh +7 -13
@@ -1,25 +1,19 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Petr Vorel <[email protected]> # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved. # Author: Alexey Kodanev <[email protected]> -TCID=sctp_ipsec -TST_TOTAL=3 TST_NEEDS_TMPDIR=1 -TST_CLEANUP="tst_ipsec_cleanup" - +TST_TESTFUNC=do_test +TST_SETUP=tst_ipsec_setup +TST_CLEANUP=tst_ipsec_cleanup . ipsec_lib.sh do_test() { - for p in $IPSEC_SIZE_ARRAY; do - tst_netload -H $(tst_ipaddr rhost) -T sctp -n $p -N $p \ - -r $IPSEC_REQUESTS -S $(tst_ipaddr) - done + tst_netload -H $(tst_ipaddr rhost) -T sctp -n $2 -N $2 \ + -r $IPSEC_REQUESTS -S $(tst_ipaddr) } -tst_ipsec_setup - -do_test - -tst_exit +tst_run
testcases/network/stress/sctp/sctp_ipsec_vti.sh +7 -13
@@ -1,25 +1,19 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Petr Vorel <[email protected]> # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved. # Author: Alexey Kodanev <[email protected]> -TCID=sctp_ipsec_vti -TST_TOTAL=3 TST_NEEDS_TMPDIR=1 -TST_CLEANUP="tst_ipsec_cleanup" - +TST_SETUP=tst_ipsec_setup_vti +TST_CLEANUP=tst_ipsec_cleanup +TST_TESTFUNC=do_test . ipsec_lib.sh do_test() { - for p in $IPSEC_SIZE_ARRAY; do - tst_netload -H $ip_rmt_tun -T sctp -n $p -N $p \ - -r $IPSEC_REQUESTS -S $ip_loc_tun - done + tst_netload -H $ip_rmt_tun -T sctp -n $2 -N $2 -r $IPSEC_REQUESTS \ + -S $ip_loc_tun } -tst_ipsec_setup_vti - -do_test - -tst_exit +tst_run
testcases/network/stress/tcp/tcp_ipsec.sh +8 -14
@@ -1,27 +1,21 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Petr Vorel <[email protected]> # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved. # Author: Alexey Kodanev <[email protected]> -TCID=tcp_ipsec -TST_TOTAL=3 TST_NEEDS_TMPDIR=1 -TST_CLEANUP="tst_ipsec_cleanup" +TST_TESTFUNC=do_test +TST_SETUP=tst_ipsec_setup +TST_CLEANUP=tst_ipsec_cleanup +. ipsec_lib.sh max_requests=10 -. ipsec_lib.sh - do_test() { - for p in $IPSEC_SIZE_ARRAY; do - tst_netload -H $(tst_ipaddr rhost) -n $p -N $p \ - -r $IPSEC_REQUESTS -R $max_requests - done + tst_netload -H $(tst_ipaddr rhost) -n $2 -N $2 -r $IPSEC_REQUESTS \ + -R $max_requests } -tst_ipsec_setup - -do_test - -tst_exit +tst_run
testcases/network/stress/tcp/tcp_ipsec_vti.sh +7 -14
@@ -1,27 +1,20 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Petr Vorel <[email protected]> # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved. # Author: Alexey Kodanev <[email protected]> -TCID=tcp_ipsec_vti -TST_TOTAL=3 TST_NEEDS_TMPDIR=1 -TST_CLEANUP="tst_ipsec_cleanup" +TST_TESTFUNC=do_test +TST_SETUP=tst_ipsec_setup_vti +TST_CLEANUP=tst_ipsec_cleanup +. ipsec_lib.sh max_requests=10 -. ipsec_lib.sh - do_test() { - for p in $IPSEC_SIZE_ARRAY; do - tst_netload -H $ip_rmt_tun -n $p -N $p \ - -r $IPSEC_REQUESTS -R $max_requests - done + tst_netload -H $ip_rmt_tun -n $2 -N $2 -r $IPSEC_REQUESTS -R $max_requests } -tst_ipsec_setup_vti - -do_test - -tst_exit +tst_run
testcases/network/stress/udp/udp_ipsec.sh +10 -14
@@ -1,26 +1,22 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Petr Vorel <[email protected]> # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved. # Author: Alexey Kodanev <[email protected]> -TCID=udp_ipsec -TST_TOTAL=6 TST_NEEDS_TMPDIR=1 -TST_CLEANUP="tst_ipsec_cleanup" - +TST_TESTFUNC=do_test +TST_SETUP=tst_ipsec_setup +TST_CNT=2 +TST_CLEANUP=tst_ipsec_cleanup . ipsec_lib.sh do_test() { - for p in $IPSEC_SIZE_ARRAY; do - tst_netload -H $(tst_ipaddr rhost) -T $1 -n $p -N $p \ - -r $IPSEC_REQUESTS - done -} + local type="udp" + [ $1 -eq 2 ] && type="udp_lite" -tst_ipsec_setup - -do_test udp -do_test udp_lite + tst_netload -H $(tst_ipaddr rhost) -T $type -n $2 -N $2 -r $IPSEC_REQUESTS +} -tst_exit +tst_run
testcases/network/stress/udp/udp_ipsec_vti.sh +10 -14
@@ -1,26 +1,22 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Petr Vorel <[email protected]> # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved. # Author: Alexey Kodanev <[email protected]> -TCID=udp_ipsec_vti -TST_TOTAL=6 TST_NEEDS_TMPDIR=1 -TST_CLEANUP="tst_ipsec_cleanup" - +TST_TESTFUNC=do_test +TST_CNT=2 +TST_SETUP=tst_ipsec_setup_vti +TST_CLEANUP=tst_ipsec_cleanup . ipsec_lib.sh do_test() { - for p in $IPSEC_SIZE_ARRAY; do - tst_netload -H $ip_rmt_tun -T $1 -n $p -N $p \ - -r $IPSEC_REQUESTS - done -} + local type="udp" + [ $1 -eq 2 ] && type="udp_lite" -tst_ipsec_setup_vti - -do_test udp -do_test udp_lite + tst_netload -H $ip_rmt_tun -T $type -n $2 -N $2 -r $IPSEC_REQUESTS +} -tst_exit +tst_run
testcases/network/virt/geneve01.sh +22 -20
58 lines not on this page · raw message
testcases/network/virt/gre01.sh +17 -14
@@ -1,5 +1,6 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Petr Vorel <[email protected]> # Copyright (c) 2015-2017 Oracle and/or its affiliates. # Author: Alexey Kodanev <[email protected]> #
@@ -7,23 +8,25 @@ # tunnel between two hosts, then will compare TCP performance # with and without GRE using ping or netstress test. -TCID=gre01 -TST_TOTAL=1 TST_NEEDS_TMPDIR=1 - -virt_type="gre" +TST_TESTFUNC=virt_netperf_msg_sizes +TST_SETUP=do_setup +TST_CLEANUP=virt_cleanup . virt_lib.sh -TST_CLEANUP="virt_cleanup" - -if [ -z $ip_local -o -z $ip_remote ]; then - tst_brkm TBROK "you must specify IP address" -fi +do_setup() +{ + virt_type="gre" + [ "$TST_IPV6" ] && virt_type="ip6gre" + virt_lib_setup -tst_resm TINFO "test $virt_type" -virt_setup "local $(tst_ipaddr) remote $(tst_ipaddr rhost) dev $(tst_iface)" \ -"local $(tst_ipaddr rhost) remote $(tst_ipaddr) dev $(tst_iface rhost)" + if [ -z $ip_local -o -z $ip_remote ]; then + tst_brk TBROK "you must specify IP address" + fi -virt_netperf_msg_sizes + tst_res TINFO "test $virt_type" + virt_setup "local $(tst_ipaddr) remote $(tst_ipaddr rhost) dev $(tst_iface)" \ + "local $(tst_ipaddr rhost) remote $(tst_ipaddr) dev $(tst_iface rhost)" +} -tst_exit +tst_run
testcases/network/virt/ipvlan01.sh +5 -9
@@ -1,20 +1,16 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Petr Vorel <[email protected]> # Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved. # Author: Alexey Kodanev <[email protected]> # # Local test, check if we can create and then delete ipvlan # interface multiple times. -TCID=ipvlan01 -TST_TOTAL=2 - virt_type="ipvlan" - +TST_TEST_DATA="mode l2,mode l3" +TST_TEST_DATA_IFS="," +TST_TESTFUNC=virt_test_02 . virt_lib.sh -options="mode l2,mode l3" - -virt_test_02 "$options" - -tst_exit +tst_run
testcases/network/virt/macsec01.sh +20 -16
@@ -1,5 +1,6 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Petr Vorel <[email protected]> # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved. # Author: Alexey Kodanev <[email protected]> #
@@ -7,30 +8,33 @@ # with default MACsec configuration, compare performance with similar # IPsec configuration on master interface. -TCID=macsec01 -TST_TOTAL=16 -TST_NEEDS_TMPDIR=1 - virt_type="macsec" VIRT_PERF_THRESHOLD=${VIRT_PERF_THRESHOLD:-100} +IPSEC_MODE="transport" +IPSEC_PROTO="ah" +TST_NEEDS_TMPDIR=1 +TST_TESTFUNC=virt_netperf_msg_sizes +TST_SETUP=do_setup +TST_CLEANUP=do_cleanup . ipsec_lib.sh . virt_lib.sh -cleanup() +do_setup() +{ + ipsec_lib_setup + + tst_res TINFO "setup IPsec $IPSEC_MODE/$IPSEC_PROTO $EALGO" + tst_ipsec lhost $(tst_ipaddr) $(tst_ipaddr rhost) + tst_ipsec rhost $(tst_ipaddr rhost) $(tst_ipaddr) + + virt_macsec_setup +} + +do_cleanup() { virt_cleanup tst_ipsec_cleanup } -TST_CLEANUP="cleanup" - -IPSEC_MODE=transport -IPSEC_PROTO=ah -tst_resm TINFO "setup IPsec $IPSEC_MODE/$IPSEC_PROTO $EALGO" -tst_ipsec lhost $(tst_ipaddr) $(tst_ipaddr rhost) -tst_ipsec rhost $(tst_ipaddr rhost) $(tst_ipaddr) - -virt_macsec_setup -virt_netperf_msg_sizes -tst_exit +tst_run
testcases/network/virt/macsec02.sh +21 -17
@@ -1,5 +1,6 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Petr Vorel <[email protected]> # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved. # Author: Alexey Kodanev <[email protected]> #
@@ -7,31 +8,34 @@ # with enabled frame encryption and replay protection, compare # performance with similar IPsec configuration on master interface. -TCID=macsec02 -TST_TOTAL=16 -TST_NEEDS_TMPDIR=1 - virt_type="macsec" VIRT_PERF_THRESHOLD=${VIRT_PERF_THRESHOLD:-100} +IPSEC_MODE="transport" +IPSEC_PROTO="esp_aead" +EALGO="aes" +TST_NEEDS_TMPDIR=1 +TST_TESTFUNC=virt_netperf_msg_sizes +TST_SETUP=do_setup +TST_CLEANUP=do_cleanup . ipsec_lib.sh . virt_lib.sh -cleanup() +do_setup() +{ + ipsec_lib_setup + + tst_res TINFO "setup IPsec $IPSEC_MODE/$IPSEC_PROTO $EALGO" + tst_ipsec lhost $(tst_ipaddr) $(tst_ipaddr rhost) + tst_ipsec rhost $(tst_ipaddr rhost) $(tst_ipaddr) + + virt_macsec_setup "replay on window 300 encrypt on protect on" +} + +do_cleanup() { virt_cleanup tst_ipsec_cleanup } -TST_CLEANUP="cleanup" - -IPSEC_MODE=transport -IPSEC_PROTO=esp_aead -EALGO=aes -tst_resm TINFO "setup IPsec $IPSEC_MODE/$IPSEC_PROTO $EALGO" -tst_ipsec lhost $(tst_ipaddr) $(tst_ipaddr rhost) -tst_ipsec rhost $(tst_ipaddr rhost) $(tst_ipaddr) - -virt_macsec_setup "replay on window 300 encrypt on protect on" -virt_netperf_msg_sizes -tst_exit +tst_run
testcases/network/virt/macvlan01.sh +5 -9
@@ -1,20 +1,16 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Petr Vorel <[email protected]> # Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved. # Author: Alexey Kodanev <[email protected]> # # Local test, check if we can create and then delete macvlan # interface multiple times. -TCID=macvlan01 -TST_TOTAL=4 - virt_type="macvlan" - +TST_TEST_DATA="mode private,mode vepa,mode bridge,mode passthru" +TST_TEST_DATA_IFS="," +TST_TESTFUNC=virt_test_02 . virt_lib.sh -options="mode private,mode vepa,mode bridge,mode passthru" - -virt_test_02 "$options" - -tst_exit +tst_run
testcases/network/virt/macvtap01.sh +5 -9
@@ -1,20 +1,16 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Petr Vorel <[email protected]> # Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved. # Author: Alexey Kodanev <[email protected]> # # Local test, check if we can create and then delete macvtap # interface multiple times. -TCID=macvtap01 -TST_TOTAL=4 - virt_type="macvtap" - +TST_TEST_DATA="mode private,mode vepa,mode bridge,mode passthru" +TST_TEST_DATA_IFS="," +TST_TESTFUNC=virt_test_02 . virt_lib.sh -options="mode private,mode vepa,mode bridge,mode passthru" - -virt_test_02 "$options" - -tst_exit +tst_run
testcases/network/virt/virt_lib.sh +68 -99
294 lines not on this page · raw message
testcases/network/virt/vlan01.sh +8 -11
@@ -1,17 +1,11 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Petr Vorel <[email protected]> # Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved. # Author: Alexey Kodanev <[email protected]> # # Local test, check if we can create multiple VLAN interfaces. -TCID=vlan01 -TST_TOTAL=9 - -virt_type="vlan" - -. virt_lib.sh - p0="protocol 802.1Q" p1="protocol 802.1ad" lb0="loose_binding off"
@@ -19,9 +13,12 @@ lb1="loose_binding on" rh0="reorder_hdr off" rh1="reorder_hdr on" -options=" ,$p0 $lb0 $rh0,$p0 $lb0 $rh1,$p0 $lb1 $rh0,$p0 $lb1 $rh1,\ -$p1 $lb0 $rh0,$p1 $lb0 $rh1,$p1 $lb1 $rh0,$p1 $lb1 $rh1," +virt_type="vlan" -virt_test_01 "$options" +TST_TEST_DATA=",$p0 $lb0 $rh0,$p0 $lb0 $rh1,$p0 $lb1 $rh0,$p0 $lb1 $rh1,\ +$p1 $lb0 $rh0,$p1 $lb0 $rh1,$p1 $lb1 $rh0,$p1 $lb1 $rh1" +TST_TEST_DATA_IFS="," +TST_TESTFUNC=virt_test_01 +. virt_lib.sh -tst_exit +tst_run
testcases/network/virt/vlan02.sh +7 -5
@@ -1,18 +1,20 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Petr Vorel <[email protected]> # Copyright (c) 2015 Oracle and/or its affiliates. All Rights Reserved. # Author: Alexey Kodanev <[email protected]> # # Local test, check if we can create and then delete VLAN # interface 4095 times. -TCID=vlan02 -TST_TOTAL=1 - virt_type="vlan" +TST_TESTFUNC=do_test . virt_lib.sh -virt_add_delete_test "id 4094" +do_test() +{ + virt_add_delete_test "id 4094" +} -tst_exit +tst_run
testcases/network/virt/vlan03.sh +26 -24
74 lines not on this page · raw message
testcases/network/virt/vxlan01.sh +7 -8
@@ -1,23 +1,22 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Petr Vorel <[email protected]> # Copyright (c) 2014-2015 Oracle and/or its affiliates. All Rights Reserved. # Author: Alexey Kodanev <[email protected]> # # Local test, check if we can create multiple VXLAN interfaces. -TCID=vxlan01 -TST_TOTAL=5 TST_OPTS="hi:d:" TST_PARSE_ARGS=virt_lib_parse_args +TST_USAGE=virt_lib_usage virt_type="vxlan" start_id=16700000 -. virt_lib.sh - -options="l2miss l3miss,norsc nolearning noproxy,\ +TST_TEST_DATA="l2miss l3miss,norsc nolearning noproxy,\ ttl 0x01 tos 0x01,ttl 0xff tos 0xff,gbp" +TST_TEST_DATA_IFS="," +TST_TESTFUNC=virt_test_01 +. virt_lib.sh -virt_test_01 "$options" - -tst_exit +tst_run
testcases/network/virt/vxlan02.sh +10 -6
@@ -1,24 +1,28 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Petr Vorel <[email protected]> # Copyright (c) 2014-2015 Oracle and/or its affiliates. All Rights Reserved. # Author: Alexey Kodanev <[email protected]> # # Local test, check if we can create and then delete VXLAN # interface 5000 times. -TCID=vxlan02 -TST_TOTAL=1 TST_OPTS="hi:d:" TST_PARSE_ARGS=virt_lib_parse_args +TST_USAGE=virt_lib_usage virt_type="vxlan" start_id=16700000 +TST_TESTFUNC=do_test . virt_lib.sh -[ "$TST_IPV6" ] && mult_addr="ff02::abc" || mult_addr="239.1.1.1" -opt="group $mult_addr" +do_test() +{ + local mult_addr="239.1.1.1" + [ "$TST_IPV6" ] && mult_addr="ff02::abc" -virt_add_delete_test "id $start_id $opt" + virt_add_delete_test "id $start_id group $mult_addr" +} -tst_exit +tst_run
testcases/network/virt/vxlan03.sh +19 -19
@@ -1,5 +1,6 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Petr Vorel <[email protected]> # Copyright (c) 2014-2017 Oracle and/or its affiliates. # Author: Alexey Kodanev <[email protected]> #
@@ -10,11 +11,10 @@ # Test-case 2: The same as above but must fail, because VXLAN allows # to communicate only within the same VXLAN segment. -TCID=vxlan03 -TST_TOTAL=4 TST_NEEDS_TMPDIR=1 TST_OPTS="hi:d:" TST_PARSE_ARGS=virt_lib_parse_args +TST_USAGE=virt_lib_usage virt_type="vxlan" start_id=16700000
@@ -22,6 +22,11 @@ start_id=16700000 # Destination address, can be unicast or multicast address vxlan_dst_addr="uni" +TST_TEST_DATA=",gbp" +TST_TEST_DATA_IFS="," +TST_NEEDS_TMPDIR=1 +TST_TESTFUNC=do_test +TST_CLEANUP=virt_cleanup . virt_lib.sh # In average cases (with small packets less then 150 bytes) VxLAN slower
@@ -31,30 +36,25 @@ vxlan_dst_addr="uni" VIRT_PERF_THRESHOLD=${VIRT_PERF_THRESHOLD:-160} [ "$VIRT_PERF_THRESHOLD" -lt 160 ] && VIRT_PERF_THRESHOLD=160 -TST_CLEANUP="virt_cleanup" - -if [ -z $ip_local -o -z $ip_remote ]; then - tst_brkm TBROK "you must specify IP address" -fi - -opts=" ,gbp" - -for n in $(seq 1 2); do - p="$(echo $opts | cut -d',' -f$n)" +do_test() +{ + if [ -z $ip_local -o -z $ip_remote ]; then + tst_brk TBROK "you must specify IP address" + fi - virt_check_cmd virt_add ltp_v0 id 0 $p || continue + virt_check_cmd virt_add ltp_v0 id 0 $2 || continue - tst_resm TINFO "the same VNI must work" + tst_res TINFO "the same VNI must work" # VNI is 24 bits long, so max value, which is not reserved, is 0xFFFFFE - vxlan_setup_subnet_$vxlan_dst_addr "id 0xFFFFFE $p" "id 0xFFFFFE $p" + vxlan_setup_subnet_$vxlan_dst_addr "id 0xFFFFFE $2" "id 0xFFFFFE $2" virt_netperf_msg_sizes virt_cleanup_rmt - tst_resm TINFO "different VNI shall not work together" - vxlan_setup_subnet_$vxlan_dst_addr "id 0xFFFFFE $p" "id 0xFFFFFD $p" + tst_res TINFO "different VNI shall not work together" + vxlan_setup_subnet_$vxlan_dst_addr "id 0xFFFFFE $2" "id 0xFFFFFD $2" virt_minimize_timeout virt_compare_netperf "fail" virt_cleanup_rmt -done +} -tst_exit +tst_run
Signature · 1 line
2.17.1
PATCH v2 8/8 net/virt: Introduce macsec_lib.sh to reduce duplicity
In reply to Petr Vorel--- testcases/network/virt/macsec01.sh | 27 +------------ testcases/network/virt/macsec02.sh | 28 +------------ testcases/network/virt/macsec_lib.sh | 60 ++++++++++++++++++++++++++++ testcases/network/virt/virt_lib.sh | 27 ------------- 4 files changed, 63 insertions(+), 79 deletions(-) create mode 100755 testcases/network/virt/macsec_lib.sh
testcases/network/virt/macsec01.sh +1 -26
@@ -8,33 +8,8 @@ # with default MACsec configuration, compare performance with similar # IPsec configuration on master interface. -virt_type="macsec" -VIRT_PERF_THRESHOLD=${VIRT_PERF_THRESHOLD:-100} -IPSEC_MODE="transport" IPSEC_PROTO="ah" -TST_NEEDS_TMPDIR=1 -TST_TESTFUNC=virt_netperf_msg_sizes -TST_SETUP=do_setup -TST_CLEANUP=do_cleanup -. ipsec_lib.sh -. virt_lib.sh - -do_setup() -{ - ipsec_lib_setup - - tst_res TINFO "setup IPsec $IPSEC_MODE/$IPSEC_PROTO $EALGO" - tst_ipsec lhost $(tst_ipaddr) $(tst_ipaddr rhost) - tst_ipsec rhost $(tst_ipaddr rhost) $(tst_ipaddr) - - virt_macsec_setup -} - -do_cleanup() -{ - virt_cleanup - tst_ipsec_cleanup -} +. macsec_lib.sh tst_run
testcases/network/virt/macsec02.sh +2 -26
@@ -8,34 +8,10 @@ # with enabled frame encryption and replay protection, compare # performance with similar IPsec configuration on master interface. -virt_type="macsec" -VIRT_PERF_THRESHOLD=${VIRT_PERF_THRESHOLD:-100} -IPSEC_MODE="transport" IPSEC_PROTO="esp_aead" EALGO="aes" +MACSEC_LIB_SETUP="replay on window 300 encrypt on protect on" -TST_NEEDS_TMPDIR=1 -TST_TESTFUNC=virt_netperf_msg_sizes -TST_SETUP=do_setup -TST_CLEANUP=do_cleanup -. ipsec_lib.sh -. virt_lib.sh - -do_setup() -{ - ipsec_lib_setup - - tst_res TINFO "setup IPsec $IPSEC_MODE/$IPSEC_PROTO $EALGO" - tst_ipsec lhost $(tst_ipaddr) $(tst_ipaddr rhost) - tst_ipsec rhost $(tst_ipaddr rhost) $(tst_ipaddr) - - virt_macsec_setup "replay on window 300 encrypt on protect on" -} - -do_cleanup() -{ - virt_cleanup - tst_ipsec_cleanup -} +. macsec_lib.sh tst_run
testcases/network/virt/macsec_lib.sh new file +60 -0
60 lines not on this page · raw message
testcases/network/virt/virt_lib.sh +0 -27
@@ -320,33 +320,6 @@ virt_check_cmd() return 0 } -# virt_macsec_setup [OPTIONS] -# OPTIONS - [ cipher { default | gcm-aes-128 } ] [ encrypt { on | off } ] -# [ protect { on | off } ] [ replay { on | off } ] [ window WINDOW ] -# [ validate { strict | check | disabled } ] -virt_macsec_setup() -{ - local keyid0=01 - local keyid1=02 - local sa=0 - local h0=$(tst_hwaddr) - local h1=$(tst_hwaddr rhost) - local cmd="ip macsec add ltp_v0" - local key0="01234567890123456789012345678901" - local key1="98765432109876543210987612343434" - - virt_setup "icvlen 16 encodingsa $sa $@" - - ROD $cmd tx sa $sa pn 100 on key $keyid0 $key0 - ROD $cmd rx address $h1 port 1 - ROD $cmd rx address $h1 port 1 sa $sa pn 100 on key $keyid1 $key1 - - tst_rhost_run -s -c "$cmd tx sa $sa pn 100 on key $keyid1 $key1" - tst_rhost_run -s -c "$cmd rx address $h0 port 1" - tst_rhost_run -s -c \ - "$cmd rx address $h0 port 1 sa $sa pn 100 on key $keyid0 $key0" -} - virt_netperf_msg_sizes() { local sizes="100 1000 2000 10000"
Signature · 1 line
2.17.1
PATCH v2 8/8 net/virt: Introduce macsec_lib.sh to reduce duplicity
Quoted 124 lines · Petr Vorel
Signed-off-by Petr Vorel <[email protected]>--- testcases/network/virt/macsec01.sh | 27 +------------ testcases/network/virt/macsec02.sh | 28 +------------ testcases/network/virt/macsec_lib.sh | 60 ++++++++++++++++++++++++++++ testcases/network/virt/virt_lib.sh | 27 ------------- 4 files changed, 63 insertions(+), 79 deletions(-) create mode 100755 testcases/network/virt/macsec_lib.shtestcases/network/virt/macsec01.sh +1
-26@@ -8,33 +8,8 @@ # with default MACsec configuration, compare performance with similar # IPsec configuration on master interface. -virt_type="macsec" -VIRT_PERF_THRESHOLD=${VIRT_PERF_THRESHOLD:-100} -IPSEC_MODE="transport" IPSEC_PROTO="ah" -TST_NEEDS_TMPDIR=1 -TST_TESTFUNC=virt_netperf_msg_sizes -TST_SETUP=do_setup -TST_CLEANUP=do_cleanup -. ipsec_lib.sh -. virt_lib.sh - -do_setup() -{ - ipsec_lib_setup - - tst_res TINFO "setup IPsec $IPSEC_MODE/$IPSEC_PROTO $EALGO" - tst_ipsec lhost $(tst_ipaddr) $(tst_ipaddr rhost) - tst_ipsec rhost $(tst_ipaddr rhost) $(tst_ipaddr) - - virt_macsec_setup -} - -do_cleanup() -{ - virt_cleanup - tst_ipsec_cleanup -} +. macsec_lib.sh tst_runtestcases/network/virt/macsec02.sh +2
-26@@ -8,34 +8,10 @@ # with enabled frame encryption and replay protection, compare # performance with similar IPsec configuration on master interface. -virt_type="macsec" -VIRT_PERF_THRESHOLD=${VIRT_PERF_THRESHOLD:-100} -IPSEC_MODE="transport" IPSEC_PROTO="esp_aead" EALGO="aes" +MACSEC_LIB_SETUP="replay on window 300 encrypt on protect on" -TST_NEEDS_TMPDIR=1 -TST_TESTFUNC=virt_netperf_msg_sizes -TST_SETUP=do_setup -TST_CLEANUP=do_cleanup -. ipsec_lib.sh -. virt_lib.sh - -do_setup() -{ - ipsec_lib_setup - - tst_res TINFO "setup IPsec $IPSEC_MODE/$IPSEC_PROTO $EALGO" - tst_ipsec lhost $(tst_ipaddr) $(tst_ipaddr rhost) - tst_ipsec rhost $(tst_ipaddr rhost) $(tst_ipaddr) - - virt_macsec_setup "replay on window 300 encrypt on protect on" -} - -do_cleanup() -{ - virt_cleanup - tst_ipsec_cleanup -} +. macsec_lib.sh tst_runtestcases/network/virt/macsec_lib.sh new file +29
-0@@ -0,0 +1,60 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2018 Petr Vorel <[email protected]> +# Copyright (c) 2014-2017 Oracle and/or its affiliates. All Rights Reserved. +# Author: Alexey Kodanev <[email protected]> + +virt_type="macsec" +VIRT_PERF_THRESHOLD=${VIRT_PERF_THRESHOLD:-100} +IPSEC_MODE="transport" + +TST_NEEDS_TMPDIR=1 +TST_TESTFUNC=virt_netperf_msg_sizes +TST_SETUP=macsec_lib_setup +TST_CLEANUP=macsec_lib_cleanup +. ipsec_lib.sh +. virt_lib.sh + +macsec_lib_setup() +{ + ipsec_lib_setup + + tst_res TINFO "setup IPsec $IPSEC_MODE/$IPSEC_PROTO $EALGO" + tst_ipsec lhost $(tst_ipaddr) $(tst_ipaddr rhost) + tst_ipsec rhost $(tst_ipaddr rhost) $(tst_ipaddr) + + virt_macsec_setup +} + +macsec_lib_cleanup()
testcases/network/virt/macsec_lib.sh line 39
Quoted 10 lines
testcases/network/virt/macsec_lib.sh new file +10
-0+{ + virt_cleanup + tst_ipsec_cleanup +} + +# virt_macsec_setup [OPTIONS] +# OPTIONS - [ cipher { default | gcm-aes-128 } ] [ encrypt { on | off } ] +# [ protect { on | off } ] [ replay { on | off } ] [ window WINDOW ] +# [ validate { strict | check | disabled } ] +virt_macsec_setup()
macsec_lib_setup()?
The rest looks good to me.
Thanks,
Alexey
Quoted 60 lines
testcases/network/virt/macsec_lib.sh new file +21
-0+{ + local keyid0=01 + local keyid1=02 + local sa=0 + local h0=$(tst_hwaddr) + local h1=$(tst_hwaddr rhost) + local cmd="ip macsec add ltp_v0" + local key0="01234567890123456789012345678901" + local key1="98765432109876543210987612343434" + + virt_setup "icvlen 16 encodingsa $sa $MACSEC_LIB_SETUP" + + ROD $cmd tx sa $sa pn 100 on key $keyid0 $key0 + ROD $cmd rx address $h1 port 1 + ROD $cmd rx address $h1 port 1 sa $sa pn 100 on key $keyid1 $key1 + + tst_rhost_run -s -c "$cmd tx sa $sa pn 100 on key $keyid1 $key1" + tst_rhost_run -s -c "$cmd rx address $h0 port 1" + tst_rhost_run -s -c \ + "$cmd rx address $h0 port 1 sa $sa pn 100 on key $keyid0 $key0" +}testcases/network/virt/virt_lib.sh +0
-27@@ -320,33 +320,6 @@ virt_check_cmd() return 0 } -# virt_macsec_setup [OPTIONS] -# OPTIONS - [ cipher { default | gcm-aes-128 } ] [ encrypt { on | off } ] -# [ protect { on | off } ] [ replay { on | off } ] [ window WINDOW ] -# [ validate { strict | check | disabled } ] -virt_macsec_setup() -{ - local keyid0=01 - local keyid1=02 - local sa=0 - local h0=$(tst_hwaddr) - local h1=$(tst_hwaddr rhost) - local cmd="ip macsec add ltp_v0" - local key0="01234567890123456789012345678901" - local key1="98765432109876543210987612343434" - - virt_setup "icvlen 16 encodingsa $sa $@" - - ROD $cmd tx sa $sa pn 100 on key $keyid0 $key0 - ROD $cmd rx address $h1 port 1 - ROD $cmd rx address $h1 port 1 sa $sa pn 100 on key $keyid1 $key1 - - tst_rhost_run -s -c "$cmd tx sa $sa pn 100 on key $keyid1 $key1" - tst_rhost_run -s -c "$cmd rx address $h0 port 1" - tst_rhost_run -s -c \ - "$cmd rx address $h0 port 1 sa $sa pn 100 on key $keyid0 $key0" -} - virt_netperf_msg_sizes() { local sizes="100 1000 2000 10000"