3 # usage: /bin/bash run_test.sh [-46]
4 # Run all defined linux_test[4,6].sh test-cases one by one
5 # user has to setup properly the following environment variables:
6 # SGW_PATH - path to the ipsec-secgw binary to test
7 # REMOTE_HOST - ip/hostname of the DUT
8 # REMOTE_IFACE - iface name for the test-port on DUT
9 # ETH_DEV - ethernet device to be used on SUT by DPDK ('-w <pci-id>')
10 # Also user can optonally setup:
11 # SGW_LCORE - lcore to run ipsec-secgw on (default value is 0)
12 # CRYPTO_DEV - crypto device to be used ('-w <pci-id>')
13 # if none specified appropriate vdevs will be created by the scrit
14 # refer to linux_test1.sh for more information
16 # All supported modes to test.
18 # 'old' means that ipsec-secgw will run in legacy (non-librte_ipsec mode)
19 # 'tun/trs' refer to tunnel/transport mode respectively
20 LINUX_TEST="tun_aescbc_sha1 \
22 tun_aescbc_sha1_esn_atom \
28 trs_aescbc_sha1_esn_atom \
39 tun_aesctr_sha1_esn_atom \
43 trs_aesctr_sha1_esn_atom \
45 tun_3descbc_sha1_old \
46 tun_3descbc_sha1_esn \
47 tun_3descbc_sha1_esn_atom \
49 trs_3descbc_sha1_old \
50 trs_3descbc_sha1_esn \
51 trs_3descbc_sha1_esn_atom"
59 while [[ ${st} -eq 0 ]]; do
62 if [[ "${opt}" == "4" ]]; then
64 elif [[ "${opt}" == "6" ]]; then
69 if [[ ${run4} -eq 0 && ${run6} -eq 0 ]]; then
73 for i in ${LINUX_TEST}; do
75 echo "starting test ${i}"
78 if [[ ${run4} -ne 0 ]]; then
79 /bin/bash ${DIR}/linux_test4.sh ${i}
81 echo "test4 ${i} finished with status ${st4}"
85 if [[ ${run6} -ne 0 ]]; then
86 /bin/bash ${DIR}/linux_test6.sh ${i}
88 echo "test6 ${i} finished with status ${st6}"
92 if [[ $st -ne 0 ]]; then
93 echo "ERROR test ${i} FAILED"