2 # SPDX-License-Identifier: BSD-3-Clause
10 fallback_val="lookaside-none"
13 while getopts ":iflsrc" opt
26 multi_seg_val="SGW_MULTI_SEG=128"
32 crypto_prim="CRYPTO_PRIM_TYPE=cpu-crypto"
33 fallback_val="cpu-crypto"
42 # test scenarios to set up for regular test
43 TEST_MODES_REGULAR="legacy \
48 # test scenarios to set up for inline test
49 TEST_MODES_INLINE="legacy_inline \
52 # test scenarios to set up for fallback test
53 TEST_MODES_FALLBACK="library_fallback"
55 # env variables to export for specific test scenarios
56 default="SGW_MODE=legacy SGW_ESN=esn-off SGW_ATOM=atom-off SGW_CRYPTO=regular \
57 SGW_CRYPTO_FLBK= ${multi_seg_val}"
58 legacy="${default} CRYPTO_PRIM_TYPE="
59 library="${default} SGW_MODE=library ${crypto_prim}"
60 library_esn="${default} SGW_MODE=library SGW_ESN=esn-on ${crypto_prim}"
61 library_esn_atom="${default} SGW_MODE=library SGW_ESN=esn-on SGW_ATOM=atom-on \
63 legacy_inline="${default} SGW_CRYPTO=inline CRYPTO_PRIM_TYPE="
64 library_inline="${default} SGW_MODE=library SGW_CRYPTO=inline CRYPTO_PRIM_TYPE="
65 library_fallback="${default} SGW_MODE=library SGW_CRYPTO=inline \
66 SGW_CRYPTO_FLBK=${fallback_val} SGW_MULTI_SEG=128 CRYPTO_PRIM_TYPE="
68 # export needed env variables and run tests
69 if [[ ${regular} -eq 1 ]]; then
70 for i in ${TEST_MODES_REGULAR}; do
71 if [[ ${legacy_only} -eq 1 && "${i}" != *legacy* ]]; then
73 elif [[ ${legacy_only} -eq 0 && "${i}" == *legacy* ]]; then
80 /bin/bash ${DIR}/linux_test.sh ${PROTO} ${MODE}
82 if [[ ${st} -ne 0 ]]; then
86 elif [[ ${inline_on} -eq 1 || ${fallback_on} -eq 1 ]]; then
87 if [[ ${inline_on} -eq 1 ]]; then
88 for i in ${TEST_MODES_INLINE}; do
89 if [[ ${legacy_only} -eq 1 && "${i}" != *legacy* ]]
92 elif [[ ${legacy_only} -eq 0 && "${i}" == *legacy* ]]
100 /bin/bash ${DIR}/linux_test.sh ${PROTO} ${MODE}
102 if [[ ${st} -ne 0 ]]; then
107 if [[ ${fallback_on} -eq 1 ]]; then
108 for i in ${TEST_MODES_FALLBACK}; do
113 /bin/bash ${DIR}/linux_test.sh ${PROTO} ${MODE}
115 if [[ ${st} -ne 0 ]]; then