aboutsummaryrefslogtreecommitdiff
path: root/automated
diff options
context:
space:
mode:
authorDaniel Wagner <wagi@monom.org>2019-07-31 17:09:08 +0200
committerDaniel Wagner <dwagner@suse.de>2020-08-27 21:13:39 +0200
commit35f0054e8373074d530a4a45c4beeaf9abdf6d96 (patch)
tree013d9c21a335310babedf8267b554d5c92d2008e /automated
parentbf46143b653885898ae882f6f7e386aaf0237ce9 (diff)
signaltest: Add background command
Start a background process to create load on the system while running the test. Signed-off-by: Daniel Wagner <wagi@monom.org>
Diffstat (limited to 'automated')
-rwxr-xr-xautomated/linux/signaltest/signaltest.sh12
-rw-r--r--automated/linux/signaltest/signaltest.yaml4
2 files changed, 12 insertions, 4 deletions
diff --git a/automated/linux/signaltest/signaltest.sh b/automated/linux/signaltest/signaltest.sh
index 41b6181..1ac2e0c 100755
--- a/automated/linux/signaltest/signaltest.sh
+++ b/automated/linux/signaltest/signaltest.sh
@@ -12,18 +12,20 @@ PRIORITY="98"
THREADS="2"
MAX_LATENCY="100"
DURATION="1m"
+BACKGROUND_CMD=""
usage() {
- echo "Usage: $0 [-r runtime] [-p priority] [-t threads] [-m latency]" 1>&2
+ echo "Usage: $0 [-r runtime] [-p priority] [-t threads] [-m latency] [-w background_cmd]" 1>&2
exit 1
}
-while getopts ":p:t:D:m:" opt; do
+while getopts ":p:t:D:m:w:" opt; do
case "${opt}" in
p) PRIORITY="${OPTARG}" ;;
t) THREADS="${OPTARG}" ;;
D) DURATION="${OPTARG}" ;;
m) MAX_LATENCY="${OPTARG}" ;;
+ w) BACKGROUND_CMD="${OPTARG}" ;;
*) usage ;;
esac
done
@@ -32,15 +34,19 @@ done
create_out_dir "${OUTPUT}"
# Run signaltest.
-if ! binary=$(which signaltest); then
+if ! binary=$(command -v signaltest); then
detect_abi
# shellcheck disable=SC2154
binary="./bin/${abi}/signaltest"
fi
+background_process_start bgcmd --cmd "${BACKGROUND_CMD}"
+
"${binary}" -D "${DURATION}" -m -p "${PRIORITY}" -t "${THREADS}" \
| tee "${LOGFILE}"
+background_process_stop bgcmd
+
# Parse test log.
../../lib/parse_rt_tests_results.py signaltest "${LOGFILE}" "${MAX_LATENCY}" \
| tee -a "${RESULT_FILE}"
diff --git a/automated/linux/signaltest/signaltest.yaml b/automated/linux/signaltest/signaltest.yaml
index 06b1205..f93bc1a 100644
--- a/automated/linux/signaltest/signaltest.yaml
+++ b/automated/linux/signaltest/signaltest.yaml
@@ -34,9 +34,11 @@ params:
# Maximal accepted latency in us
# This value is device/kernel specific and needs to be set in the job!
MAX_LATENCY: "100"
+ # Background workload to be run during the meassurement
+ BACKGROUND_CMD: ""
run:
steps:
- cd ./automated/linux/signaltest
- - ./signaltest.sh -D "${DURATION}" -p "${PRIORITY}" -t "${THREADS}" -m "${MAX_LATENCY}"
+ - ./signaltest.sh -D "${DURATION}" -p "${PRIORITY}" -t "${THREADS}" -m "${MAX_LATENCY}" -w "${BACKGROUND_CMD}"
- ../../utils/send-to-lava.sh ./output/result.txt