From d4c7b4bc699f4c2b4f4a83d5dc63acbe322624f9 Mon Sep 17 00:00:00 2001 From: Mariia Azbeleva Date: Fri, 13 Dec 2024 13:42:20 +0200 Subject: [PATCH] Fix iperf tests Signed-off-by: Mariia Azbeleva --- .../test-suites/performance-tests/fileio_test | 2 +- .../performance-tests/network.robot | 2 +- .../performance-tests/performance.robot | 27 ++++++++++--------- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/Robot-Framework/test-suites/performance-tests/fileio_test b/Robot-Framework/test-suites/performance-tests/fileio_test index 325b72ab..a61ad4bb 100755 --- a/Robot-Framework/test-suites/performance-tests/fileio_test +++ b/Robot-Framework/test-suites/performance-tests/fileio_test @@ -5,7 +5,7 @@ THREADS="$1" DISK_CHECK_DIRECTORY="${2:-/}" # Create a directory for the results and copy this script into it -RESULT_DIR="/home/ghaf/sysbench_results" +RESULT_DIR="/tmp/sysbench_results" echo -e "\nCreating directory for test results:\n$RESULT_DIR" mkdir -p $RESULT_DIR FileName=${0##*/} diff --git a/Robot-Framework/test-suites/performance-tests/network.robot b/Robot-Framework/test-suites/performance-tests/network.robot index 297f5145..6c2854b8 100644 --- a/Robot-Framework/test-suites/performance-tests/network.robot +++ b/Robot-Framework/test-suites/performance-tests/network.robot @@ -163,7 +163,7 @@ Run iperf server on DUT [Documentation] Run iperf on DUT in server mode Clear iptables rules ${command} Set Variable iperf -s - Execute Command nohup ${command} > output.log 2>&1 & + Execute Command nohup ${command} > /tmp/output.log 2>&1 & Check iperf was started Clear iptables rules diff --git a/Robot-Framework/test-suites/performance-tests/performance.robot b/Robot-Framework/test-suites/performance-tests/performance.robot index 2b906a2a..87b6cf55 100644 --- a/Robot-Framework/test-suites/performance-tests/performance.robot +++ b/Robot-Framework/test-suites/performance-tests/performance.robot @@ -167,12 +167,12 @@ FileIO test # In case of Lenovo-X1 run the test in /gp_storage which has more disk space than /home/ghaf # Results are still saved to /home/ghaf IF "Lenovo" in "${DEVICE}" - Execute Command cp ./fileio_test /gp_storage sudo=True sudo_password=${PASSWORD} - Execute Command cd /gp_storage sudo=True sudo_password=${PASSWORD} - Execute Command ./fileio_test ${threads_number} /gp_storage sudo=True sudo_password=${PASSWORD} - Execute Command cd /home/ghaf sudo=True sudo_password=${PASSWORD} + Execute Command cp /tmp/fileio_test /gp_storage sudo=True sudo_password=${PASSWORD} + Execute Command /gp_storage/fileio_test ${threads_number} /gp_storage sudo=True sudo_password=${PASSWORD} + Execute Command cd /tmp ELSE - Execute Command ./fileio_test ${threads_number} sudo=True sudo_password=${PASSWORD} + Execute Command /tmp/fileio_test ${threads_number} sudo=True sudo_password=${PASSWORD} + Execute Command cd /tmp sudo=True sudo_password=${PASSWORD} END ${test_info} Execute Command cat sysbench_results/test_info @@ -293,7 +293,7 @@ Sysbench test in VMs on LenovoX1 IF '${vm_fail}' == 'FAIL' Log to Console Skipping tests for ${vm} because couldn't connect to it ELSE - ${output} Execute Command ./sysbench_test ${threads_n} sudo=True sudo_password=${PASSWORD} + ${output} Execute Command /tmp/sysbench_test ${threads_n} sudo=True sudo_password=${PASSWORD} Run Keyword If ${threads_n} > 1 Save sysbench results ${vm} Save sysbench results ${vm} _1thread Switch Connection ${netvm_ssh} @@ -364,13 +364,15 @@ LenovoX1 Setup ${output} Execute Command ssh-keygen -R ${NETVM_IP} Transfer FileIO Test Script To DUT - Put File performance-tests/fileio_test /home/ghaf - Execute Command chmod 777 fileio_test + Put File performance-tests/fileio_test /tmp + Execute Command chmod 777 /tmp/fileio_test + Execute Command cd /tmp Transfer Sysbench Test Script To NetVM Connect to netvm - Put File performance-tests/sysbench_test /home/ghaf - Execute Command chmod 777 sysbench_test + Put File performance-tests/sysbench_test /tmp + Execute Command chmod 777 /tmp/sysbench_test + Execute Command cd /tmp Transfer Sysbench Test Script To VM [Arguments] ${vm} @@ -380,8 +382,9 @@ Transfer Sysbench Test Script To VM Run Keyword If '${vm_fail}' == 'FAIL' Return From Keyword ${vm_fail} Log to console Successfully connected to ${vm} END - Put File performance-tests/sysbench_test /home/ghaf - Execute Command chmod 777 sysbench_test + Put File performance-tests/sysbench_test /tmp + Execute Command chmod 777 /tmp/sysbench_test + Execute Command cd /tmp Save cpu results [Arguments] ${test}=cpu ${host}=ghaf_host