diff options
author | Daniel Wagner <wagi@monom.org> | 2019-07-31 17:03:48 +0200 |
---|---|---|
committer | Daniel Wagner <dwagner@suse.de> | 2020-08-27 21:13:39 +0200 |
commit | bd1cd22a6d5eea8b6ddd0903143bb72fa0931e84 (patch) | |
tree | 24d867a28d6fbf7c20291e394d6bc84d74319b3a /automated | |
parent | 78d27251bad6faf754af811e8696b474a3880b9e (diff) |
pmqtest: 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-x | automated/linux/pmqtest/pmqtest.sh | 12 | ||||
-rw-r--r-- | automated/linux/pmqtest/pmqtest.yaml | 4 |
2 files changed, 12 insertions, 4 deletions
diff --git a/automated/linux/pmqtest/pmqtest.sh b/automated/linux/pmqtest/pmqtest.sh index c196fd9..9df2161 100755 --- a/automated/linux/pmqtest/pmqtest.sh +++ b/automated/linux/pmqtest/pmqtest.sh @@ -10,16 +10,18 @@ LOGFILE="${OUTPUT}/pmqtest.log" RESULT_FILE="${OUTPUT}/result.txt" DURATION="5m" MAX_LATENCY="100" +BACKGROUND_CMD="" usage() { - echo "Usage: $0 [-D duration] [-m latency]" 1>&2 + echo "Usage: $0 [-D duration] [-m latency] [-w background_cmd]" 1>&2 exit 1 } -while getopts ":D:m:" opt; do +while getopts ":D:m:w:" opt; do case "${opt}" in D) DURATION="${OPTARG}" ;; m) MAX_LATENCY="${OPTARG}" ;; + w) BACKGROUND_CMD="${OPTARG}" ;; *) usage ;; esac done @@ -30,14 +32,18 @@ done create_out_dir "${OUTPUT}" # Run pmqtest. -if ! binary=$(which pmqtest); then +if ! binary=$(command -v pmqtest); then detect_abi # shellcheck disable=SC2154 binary="./bin/${abi}/pmqtest" fi +background_process_start bgcmd --cmd "${BACKGROUND_CMD}" + "${binary}" -S -p 98 -D "${DURATION}" | tee "${LOGFILE}" +background_process_stop bgcmd + # Parse test log. ../../lib/parse_rt_tests_results.py pmqtest "${LOGFILE}" "${MAX_LATENCY}" \ | tee -a "${RESULT_FILE}" diff --git a/automated/linux/pmqtest/pmqtest.yaml b/automated/linux/pmqtest/pmqtest.yaml index d75cf13..07b59c5 100644 --- a/automated/linux/pmqtest/pmqtest.yaml +++ b/automated/linux/pmqtest/pmqtest.yaml @@ -30,9 +30,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/pmqtest/ - - ./pmqtest.sh -D "${DURATION}" -m "${MAX_LATENCY}" + - ./pmqtest.sh -D "${DURATION}" -m "${MAX_LATENCY}" -w "${BACKGROUND_CMD}" - ../../utils/send-to-lava.sh ./output/result.txt |