From: Evan Hunt Date: Wed, 20 Jan 2021 21:37:52 +0000 (-0800) Subject: check whether taskset works before running cpu test X-Git-Tag: v9.17.10~29^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a8a49bb783764821e062233fa87dc2ff41bce8aa;p=thirdparty%2Fbind9.git check whether taskset works before running cpu test the taskset command used for the cpu system test seems to be failing under vmware, causing a test failure. we can try the taskset command and skip the test if it doesn't work. --- diff --git a/bin/tests/system/cpu/prereq.sh b/bin/tests/system/cpu/prereq.sh index 8b0cd6e8049..e9cae418d98 100644 --- a/bin/tests/system/cpu/prereq.sh +++ b/bin/tests/system/cpu/prereq.sh @@ -18,7 +18,7 @@ case $(uname) in Linux*) ;; *) - echo_i "cpu test only runs on Linux, skipping test" + echo_i "cpu test only runs on Linux" exit 255 ;; esac @@ -28,3 +28,8 @@ TASKSET=$(command -v "taskset" || true) if ! test -x "$TASKSET" ; then exit 255 fi + +if ! $TASKSET fff0 true > /dev/null 2>&1; then + echo_i "taskset failed" + exit 255 +fi