Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix iperf tests #191

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Robot-Framework/test-suites/performance-tests/fileio_test
Original file line number Diff line number Diff line change
Expand Up @@ -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##*/}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
33 changes: 18 additions & 15 deletions Robot-Framework/test-suites/performance-tests/performance.robot
Original file line number Diff line number Diff line change
Expand Up @@ -167,25 +167,25 @@ 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
${test_info} Execute Command /tmp/cat sysbench_results/test_info
IF "Insufficient disk space" in $test_info
FAIL Insufficient disk space for fileio test.
END

${fileio_rd_output} Execute Command cat sysbench_results/fileio_rd_report
${fileio_rd_output} Execute Command cat /tmp/sysbench_results/fileio_rd_report
Log ${fileio_rd_output}
&{fileio_rd_data} Parse FileIO Read Results ${fileio_rd_output}
&{statistics_rd} Save FileIO Data ${TEST NAME}_read ${fileio_rd_data}

${fileio_wr_output} Execute Command cat sysbench_results/fileio_wr_report
${fileio_wr_output} Execute Command cat /tmp/sysbench_results/fileio_wr_report
Log ${fileio_wr_output}
&{fileio_wr_data} Parse FileIO Write Results ${fileio_wr_output}
&{statistics_wr} Save FileIO Data ${TEST NAME}_write ${fileio_wr_data}
Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -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}
Expand All @@ -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
Expand Down
Loading