aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Harkin <ryan.harkin@linaro.org>2021-01-18 19:14:54 +0000
committerRyan Harkin <ryan.harkin@linaro.org>2021-01-18 19:52:00 +0000
commitbcf6aa3faeaced161dcf965a7f2aafc9094a1f5f (patch)
tree4df37dd8218c254c5207b11ee38a4d9770c748c6
parentfef4c6159afc354daa66803230a484c1ec37c29d (diff)
network-test: replace AFFINITY with tasksetlinaro-rel-2020.09-dunfell.1-rc1
taskset should lead to more consistent results. Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
-rwxr-xr-xautomated/linux/network-test/network-test.sh9
1 files changed, 3 insertions, 6 deletions
diff --git a/automated/linux/network-test/network-test.sh b/automated/linux/network-test/network-test.sh
index 75946ec..86e9c5c 100755
--- a/automated/linux/network-test/network-test.sh
+++ b/automated/linux/network-test/network-test.sh
@@ -15,8 +15,6 @@ VERSION="3.1.4"
# Setting REVERSE="-R" means the server sends to the client
REVERSE=""
# CPU affinity is blank by default, meaning no affinity.
-# CPU numbers are zero based, eg AFFINITY="-A 0" for the first CPU
-AFFINITY=""
ETH="eth0"
EXPECTED_RESULT="pass"
IPERF3_SERVER_RUNNING="no"
@@ -570,9 +568,8 @@ test_link_settings(){
################################################################################
################################################################################
-while getopts "A:a:c:d:e:l:m:t:p:v:s:r:w:Rh" o; do
+while getopts "a:c:d:e:l:m:t:p:v:s:r:w:Rh" o; do
case "$o" in
- A) AFFINITY="-A ${OPTARG}" ;;
a) AUTONEG="${OPTARG}" ;;
c) CMD="${OPTARG}" ;;
d) DUPLEX="${OPTARG}" ;;
@@ -770,7 +767,7 @@ case "$CMD" in
################################################################################
echo "Client has asked us to start the iperf3 server"
cmd="iperf3 -s -D"
- ${cmd}
+ taskset 0x02 ${cmd}
if pgrep -f "${cmd}" > /dev/null; then
IPERF3_SERVER_RUNNING="pass"
else
@@ -921,7 +918,7 @@ case "$CMD" in
# We are running in client mode
# Run iperf3 test with unbuffered output mode.
- stdbuf -o0 iperf3 -c "${SERVER}" -t "${TIME}" -P "${THREADS}" "${REVERSE}" "${AFFINITY}" 2>&1 \
+ stdbuf -o0 taskset 0x02 iperf3 -c "${SERVER}" -t "${TIME}" -P "${THREADS}" "${REVERSE}" 2>&1 \
| tee "${LOGFILE}"
# Parse logfile.