aboutsummaryrefslogtreecommitdiff
path: root/example/ipsec_crypto/odp_ipsec_crypto_run_live.sh
diff options
context:
space:
mode:
authorAakash Sasidharan <asasidharan@marvell.com>2021-06-08 17:24:28 +0530
committerPetri Savolainen <petri.savolainen@nokia.com>2021-06-17 09:45:53 +0300
commit600728769ceafaac4e39ae89b31c338f3ce225e5 (patch)
tree15a47b470851eb799868a898fdd482004e80fc93 /example/ipsec_crypto/odp_ipsec_crypto_run_live.sh
parent50603a01e9847fb7483835ed9d5b8fa3a5e75d95 (diff)
example: ipsec: allow PID file to be created before reading
For IPsec live and router mode tests, the application needs to be killed explicitly once the ping tests are done. The pid of the app is buffered in app_pid file which is later read into the env variable APP_PID. Allow the PID file to be created before reading the file by moving the cat command just before the kill command is invoked. Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
Diffstat (limited to 'example/ipsec_crypto/odp_ipsec_crypto_run_live.sh')
-rwxr-xr-xexample/ipsec_crypto/odp_ipsec_crypto_run_live.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/example/ipsec_crypto/odp_ipsec_crypto_run_live.sh b/example/ipsec_crypto/odp_ipsec_crypto_run_live.sh
index 90dda11ec..1393c7af3 100755
--- a/example/ipsec_crypto/odp_ipsec_crypto_run_live.sh
+++ b/example/ipsec_crypto/odp_ipsec_crypto_run_live.sh
@@ -37,8 +37,6 @@ PID=app_pid
-a 192.168.222.2,192.168.111.2,md5,300,27f6d123d7077b361662fc6e451f65d8 \
-c 2 "$@" & echo $! > $PID) | tee -a $LOG &
-APP_PID=`cat $PID`
-
# Wait till application thread starts.
APP_READY="Pktio thread \[..\] starts"
@@ -52,6 +50,8 @@ tail -f $LOG | grep -qm 1 "$APP_READY"
validate_result
ret=$?
+APP_PID=`cat $PID`
+
kill -2 ${APP_PID}
# Wait till the application exits