aboutsummaryrefslogtreecommitdiff
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
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>
-rwxr-xr-xexample/ipsec_api/odp_ipsec_api_run_live.sh4
-rwxr-xr-xexample/ipsec_api/odp_ipsec_api_run_router.sh4
-rwxr-xr-xexample/ipsec_crypto/odp_ipsec_crypto_run_live.sh4
-rwxr-xr-xexample/ipsec_crypto/odp_ipsec_crypto_run_router.sh4
4 files changed, 8 insertions, 8 deletions
diff --git a/example/ipsec_api/odp_ipsec_api_run_live.sh b/example/ipsec_api/odp_ipsec_api_run_live.sh
index da8523485..9febf2868 100755
--- a/example/ipsec_api/odp_ipsec_api_run_live.sh
+++ b/example/ipsec_api/odp_ipsec_api_run_live.sh
@@ -33,8 +33,6 @@ PID=app_pid
-e 192.168.222.2,192.168.111.2,3des,301,c966199f24d095f3990a320d749056401e82b26570320292 \
-c 2 "$@" & echo $! > $PID) | tee $LOG &
-APP_PID=`cat $PID`
-
# Wait till application thread starts.
APP_READY="Pktio thread \[..\] starts"
@@ -48,6 +46,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
diff --git a/example/ipsec_api/odp_ipsec_api_run_router.sh b/example/ipsec_api/odp_ipsec_api_run_router.sh
index 79a0ef5c6..198721ea0 100755
--- a/example/ipsec_api/odp_ipsec_api_run_router.sh
+++ b/example/ipsec_api/odp_ipsec_api_run_router.sh
@@ -29,8 +29,6 @@ PID=app_pid
-r 192.168.222.2/32,$IF1,$NEXT_HOP_MAC1 \
-c 1 "$@" & echo $! > $PID) | tee -a $LOG &
-APP_PID=`cat $PID`
-
# Wait till application thread starts.
APP_READY="Pktio thread \[..\] starts"
@@ -44,6 +42,8 @@ tail -f $LOG | grep -qm 1 "$APP_READY"
validate_result
ret=$?
+APP_PID=`cat $PID`
+
kill -2 ${APP_PID}
# Wait till the application stops
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
diff --git a/example/ipsec_crypto/odp_ipsec_crypto_run_router.sh b/example/ipsec_crypto/odp_ipsec_crypto_run_router.sh
index 675027b59..40c353ee0 100755
--- a/example/ipsec_crypto/odp_ipsec_crypto_run_router.sh
+++ b/example/ipsec_crypto/odp_ipsec_crypto_run_router.sh
@@ -29,8 +29,6 @@ PID=app_pid
-r 192.168.222.2/32,$IF1,$NEXT_HOP_MAC1 \
-c 1 "$@" & echo $! > $PID) | tee -a $LOG &
-APP_PID=`cat $PID`
-
# Wait till application thread starts.
APP_READY="Pktio thread \[..\] starts"
@@ -44,6 +42,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