summaryrefslogtreecommitdiff
path: root/test/TEST-16-EXTEND-TIMEOUT/extend_timeout_test_service.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/TEST-16-EXTEND-TIMEOUT/extend_timeout_test_service.sh')
-rwxr-xr-xtest/TEST-16-EXTEND-TIMEOUT/extend_timeout_test_service.sh70
1 files changed, 0 insertions, 70 deletions
diff --git a/test/TEST-16-EXTEND-TIMEOUT/extend_timeout_test_service.sh b/test/TEST-16-EXTEND-TIMEOUT/extend_timeout_test_service.sh
deleted file mode 100755
index 39847ec3e..000000000
--- a/test/TEST-16-EXTEND-TIMEOUT/extend_timeout_test_service.sh
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/bin/bash
-set -x
-set -e
-set -o pipefail
-
-# sleep interval (seconds)
-sleep_interval=1
-# extend_timeout_interval second(s)
-extend_timeout_interval=1
-# number of sleep_intervals before READY=1
-start_intervals=10
-# number of sleep_intervals before exiting
-stop_intervals=10
-# run intervals, number of sleep_intervals to run
-run_intervals=7
-# service name
-SERVICE=unknown
-
-while [ $# -gt 0 ];
-do
- eval ${1%=*}=${1#*=}
- shift
-done
-
-# We convert to usec
-extend_timeout_interval=$(( $extend_timeout_interval * 1000000 ))
-
-trap "{ touch /${SERVICE}.terminated; exit 1; }" SIGTERM SIGABRT
-
-rm -f /${SERVICE}.*
-touch /${SERVICE}.startfail
-
-elogind-notify EXTEND_TIMEOUT_USEC=$extend_timeout_interval
-while [ $start_intervals -gt 0 ]
-do
- sleep $sleep_interval
- start_intervals=$(( $start_intervals - 1 ))
- elogind-notify EXTEND_TIMEOUT_USEC=$extend_timeout_interval
-done
-
-elogind-notify --ready --status="Waiting for your request"
-
-touch /${SERVICE}.runtimefail
-rm /${SERVICE}.startfail
-
-elogind-notify EXTEND_TIMEOUT_USEC=$extend_timeout_interval
-while [ $run_intervals -gt 0 ]
-do
- sleep $sleep_interval
- run_intervals=$(( $run_intervals - 1 ))
- elogind-notify EXTEND_TIMEOUT_USEC=$extend_timeout_interval
-done
-
-elogind-notify STOPPING=1
-
-touch /${SERVICE}.stopfail
-rm /${SERVICE}.runtimefail
-
-elogind-notify EXTEND_TIMEOUT_USEC=$extend_timeout_interval
-while [ $stop_intervals -gt 0 ]
-do
- sleep $sleep_interval
- stop_intervals=$(( $stop_intervals - 1 ))
- elogind-notify EXTEND_TIMEOUT_USEC=$extend_timeout_interval
-done
-
-touch /${SERVICE}.success
-rm /${SERVICE}.stopfail
-
-exit 0