Error injection through OS related automation [stage 4]
Enable following scenarios
1. Keyword to disable cpu states through HOST.
2. CoreFIR - RECV 1, RECV 5, RECV 32 error injections.
3. EQFIR - RECV32 error injection.
4. NCU - UE error injection.
Resolves openbmc/openbmc-test-automation#1135
Change-Id: Ifbd54f2b858a2fccf75d430c558a671248f99067
Signed-off-by: Sridevi Ramesh <sridevra@in.ibm.com>
diff --git a/lib/ras/host_utils.robot b/lib/ras/host_utils.robot
index 4e4efdd..9ab425e 100644
--- a/lib/ras/host_utils.robot
+++ b/lib/ras/host_utils.robot
@@ -5,6 +5,8 @@
Variables ../../lib/ras/variables.py
Library ../../lib/bmc_ssh_utils.py
Library OperatingSystem
+Library ../../lib/gen_print.py
+Library ../../lib/gen_robot_print.py
*** Keywords ***
@@ -17,7 +19,6 @@
# -c|--chip <chip-id> <addr>
${output} ${stderr} ${rc}= OS Execute Command getscom ${input_cmd}
- Should Be Empty ${stderr}
[Return] ${output}
Gard Operations On OS
@@ -28,7 +29,6 @@
# input_cmd list/clear all/show <gard_record_id>
${output} ${stderr} ${rc}= OS Execute Command opal-gard ${input_cmd}
- Should Be Empty ${stderr}
[Return] ${output}
Putscom Operations On OS
@@ -75,7 +75,6 @@
${cmd}= Catenate set -o pipefail ; ${probe_cpu_file_path}
... | grep -i 'CHIP ID: ${proc_chip_id}' | cut -c21-22
${output} ${stderr} ${rc}= OS Execute Command ${cmd}
- Should Be Empty ${stderr}
${core_ids}= Split String ${output}
# Example output:
# ['2', '3', '4', '5', '6']
@@ -93,7 +92,6 @@
${cmd}= Catenate set -o pipefail ; ${addr_translation_file_path} ${fir}
... ${core_id} | grep -i ${target_type}
${output} ${stderr} ${rc}= OS Execute Command ${cmd}
- Should Be Empty ${stderr}
${translated_addr}= Split String ${output} :${SPACE}0x
# Example output:
# 0x10010c00
@@ -134,3 +132,10 @@
... host during PNOR code update.
Inject Error Through HOST 05010800 4000000000000000 1
+
+Disable CPU States Through HOST
+ [Documentation] Disable CPU states through host.
+
+ ${cmd}= Catenate SEPARATOR= for file_path in /sys/devices/system/cpu/
+ ... cpu*/cpuidle/state*/disable; do echo 0 > $file_path; done
+ ${output} ${stderr} ${rc}= OS Execute Command ${cmd}