From: Juha Kosonen Date: Mon, 18 Nov 2019 12:37:34 +0000 (+0200) Subject: Fix LTP test case failures X-Git-Tag: 2.0.1~4 X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F97%2F1997%2F1;p=validation.git Fix LTP test case failures - untar ltp to / with sudo - output 'y' when test case expects user intervention - set read access to output/results JIRA: VAL-89 Change-Id: Ia2268fcfb6a9720d051de88a1561456539ec5b03 Signed-off-by: Juha Kosonen --- diff --git a/tests/os/ltp/ltp.robot b/tests/os/ltp/ltp.robot index 4ec8b45..547fd18 100644 --- a/tests/os/ltp/ltp.robot +++ b/tests/os/ltp/ltp.robot @@ -37,21 +37,21 @@ ${FULL_SUITE} ${SUITE_NAME.replace(' ','_')} RunLTP syscalls madvise only [Documentation] Wait ~1m for madvise01-10 to complete ${log} = Set Variable ${OUTPUT DIR}${/}${FULL_SUITE}.${TEST NAME.replace(' ','_')}.log - ${result}= Execute Command /opt/ltp/runltp -f syscalls -s madvise sudo=True + ${result}= Execute Command yes | sudo /opt/ltp/runltp -f syscalls -s madvise Append To File ${log} ${result}${\n} Should Contain ${result} INFO: ltp-pan reported all tests PASS RunLTP syscalls only [Documentation] Wait ~45m for syscalls to complete ${log} = Set Variable ${OUTPUT DIR}${/}${FULL_SUITE}.${TEST NAME.replace(' ','_').log - ${result}= Execute Command /opt/ltp/runltp -f syscalls sudo=True + ${result}= Execute Command yes | sudo /opt/ltp/runltp -f syscalls Append To File ${log} ${result}${\n} Should Contain ${result} INFO: ltp-pan reported all tests PASS RunLTP all tests [Documentation] Wait ~5hrs to complete 2536 tests ${log} = Set Variable ${OUTPUT DIR}${/}${FULL_SUITE}.${TEST NAME.replace(' ','_').log - ${result}= Execute Command /opt/ltp/runltp sudo=True + ${result}= Execute Command yes | sudo /opt/ltp/runltp Append To File ${log} ${result}${\n} Should Contain ${result} INFO: ltp-pan reported all tests PASS @@ -62,14 +62,16 @@ Open Connection And Log In Install LTP Put File /opt/akraino/ltp.tar.gz /tmp/ltp.tar.gz - Execute Command tar -xf /tmp/ltp.tar.gz -C / + Execute Command tar -xf /tmp/ltp.tar.gz -C / sudo=true Uninstall LTP Execute Command rm -rf /opt/ltp sudo=True Execute Command rm /tmp/ltp.tar.gz Download Logs + Execute Command chmod -R a+r /opt/ltp/output sudo=True SSHLibrary.Get File /opt/ltp/output/* ${OUTPUT DIR}/output/ Execute Command rm -rf /opt/ltp/output/* sudo=True + Execute Command chmod -R a+r /opt/ltp/results sudo=True SSHLibrary.Get File /opt/ltp/results/* ${OUTPUT DIR}/results/ Execute Command rm -rf /opt/ltp/results/* sudo=True \ No newline at end of file