Skip to content

Commit

Permalink
signaltest: add support to run a thread per cpu
Browse files Browse the repository at this point in the history
Add the feature to run a thread per CPU automatically.

This simplifies setups with many different boards where the test should
run a thread per available CPU.

Signed-off-by: Daniel Wagner <wagi@monom.org>
  • Loading branch information
igaw authored and roxell committed Mar 25, 2024
1 parent 69eabfb commit eb22b4c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions automated/linux/signaltest/signaltest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ done
! check_root && error_msg "Please run this script as root."
create_out_dir "${OUTPUT}"

if [ "${THREADS}" -eq "0" ]; then
THREADS=$(nproc)
fi

# Run signaltest.
if ! binary=$(command -v signaltest); then
detect_abi
Expand Down
2 changes: 2 additions & 0 deletions automated/linux/signaltest/signaltest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ params:
# Priority of highest prio thread.
PRIORITY: "98"
# Number of threads.
# A value of "0" will run a thread per available CPU.
THREADS: "2"
# Execute cyclictest for given time
DURATION: "1m"
# Background workload to be run during the meassurement
BACKGROUND_CMD: ""
Expand Down

0 comments on commit eb22b4c

Please sign in to comment.