Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation This suite is for Verifying BMC device tree. |
| 3 | |
George Keishing | d8004f8 | 2022-03-29 08:56:11 -0500 | [diff] [blame] | 4 | Resource ../lib/utils.robot |
| 5 | Resource ../lib/openbmc_ffdc.robot |
| 6 | Resource ../lib/ipmi_client.robot |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 7 | Library String |
| 8 | |
George Keishing | 06a8ee8 | 2023-10-17 15:54:15 +0530 | [diff] [blame] | 9 | Test Setup Open Connection And Log In |
| 10 | Test Teardown Run Keywords Close All Connections AND FFDC On Test Case Fail |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 11 | |
Sridevi Ramesh | 8966617 | 2025-09-28 04:15:29 -0500 | [diff] [blame] | 12 | Test Tags Test_BMC_Devicetree |
| 13 | |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 14 | *** Variables *** |
| 15 | ${devicetree_base} /sys/firmware/devicetree/base/ |
| 16 | |
| 17 | *** Test Cases *** |
| 18 | Check BMC Model Property Is Set |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 19 | [Documentation] Verify if the BMC Model is populated in the device tree. |
| 20 | [Tags] Check_BMC_Model_Property_Is_Set |
| 21 | [Template] Template Check Property |
| 22 | |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 23 | #Property |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 24 | model |
| 25 | |
| 26 | |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 27 | Check BMC Compatible Property Is Set |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 28 | [Documentation] Verify if the BMC compatible property is populated. |
| 29 | [Tags] Check_BMC_Compatible_Property_Is_Set |
| 30 | [Template] Template Check Property |
| 31 | |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 32 | #Property |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 33 | compatible |
| 34 | |
| 35 | |
| 36 | Check BMC CPU Name Property Is Set |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 37 | [Documentation] Verify if the BMC CPU name property is populated. |
| 38 | [Tags] Check_BMC_CPU_Name_Property_Is_Set |
| 39 | [Template] Template Check Property |
| 40 | |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 41 | #Property |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 42 | cpus/name |
| 43 | |
| 44 | |
| 45 | Check BMC CPU Compatible Property Is Set |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 46 | [Documentation] Verify if the BMC CPU compatible property is populated. |
| 47 | [Tags] Check_BMC_CPU_Compatible_Property_Is_Set |
| 48 | [Template] Template Check Property |
| 49 | |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 50 | #Property |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 51 | cpus/cpu@0/compatible |
| 52 | |
| 53 | |
| 54 | Check BMC Memory Name Property Is Set |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 55 | [Documentation] Verify if the BMC Memory name property is populated. |
| 56 | [Tags] Check_BMC_Memory_Name_Property_Is_Set |
| 57 | [Template] Template Check Property |
| 58 | |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 59 | #Property |
Sivas SRR | d3b515b | 2019-01-15 23:31:35 -0600 | [diff] [blame] | 60 | memory@80000000/name |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 61 | |
| 62 | |
| 63 | Check BMC Memory Device Type Property Is Set |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 64 | [Documentation] Verify if the BMC Memory Device Type property is |
| 65 | ... populated. |
| 66 | [Tags] Check_BMC_Memory_Device_Type_Property_Is_Set |
| 67 | [Template] Template Check Property |
| 68 | |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 69 | #Property |
Sivas SRR | d3b515b | 2019-01-15 23:31:35 -0600 | [diff] [blame] | 70 | memory@80000000/device_type |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 71 | |
| 72 | |
| 73 | Check BMC FSI Name Property Is Set |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 74 | [Documentation] Verify if the BMC FSI name property is populated. |
| 75 | [Tags] Check_BMC_FSI_Name_Property_Is_Set |
| 76 | [Template] Template Check Property |
| 77 | |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 78 | #Property |
Sivas SRR | 37f9311 | 2019-06-19 03:18:07 -0500 | [diff] [blame] | 79 | gpio-fsi/name |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 80 | |
| 81 | |
| 82 | Check BMC FSI Compatible Property Is Set |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 83 | [Documentation] Verify if the BMC FSI compatible property is populated. |
| 84 | [Tags] Check_BMC_FSI_Compatible_Property_Is_Set |
| 85 | [Template] Template Check Property |
| 86 | |
Sivas SRR | 01c7dc3 | 2017-06-24 02:24:23 -0500 | [diff] [blame] | 87 | #Property |
Sivas SRR | 37f9311 | 2019-06-19 03:18:07 -0500 | [diff] [blame] | 88 | gpio-fsi/compatible |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 89 | |
| 90 | |
George Keishing | 5236ec5 | 2022-01-31 12:07:58 -0600 | [diff] [blame] | 91 | Check BMC GPIO FSI Name Property Is Set |
Sivas SRR | 01c7dc3 | 2017-06-24 02:24:23 -0500 | [diff] [blame] | 92 | [Documentation] Verify if the BMC GPIO-FSI name property is populated. |
| 93 | [Tags] Check_BMC_GPIO_FSI_Name_Property_Is_Set |
| 94 | [Template] Template Check Property |
| 95 | |
Sivas SRR | 01c7dc3 | 2017-06-24 02:24:23 -0500 | [diff] [blame] | 96 | #Property |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 97 | gpio-fsi/name |
| 98 | |
| 99 | |
George Keishing | 5236ec5 | 2022-01-31 12:07:58 -0600 | [diff] [blame] | 100 | Check BMC GPIO FSI Compatible Property Is Set |
Sivas SRR | 01c7dc3 | 2017-06-24 02:24:23 -0500 | [diff] [blame] | 101 | [Documentation] Verify if the BMC GPIO-FSI compatible property is populated. |
| 102 | [Tags] Check_BMC_GPIO_FSI_Compatible_Property_Is_Set |
| 103 | [Template] Template Check Property |
| 104 | |
Sivas SRR | fbe34dd | 2017-06-29 11:03:12 -0500 | [diff] [blame] | 105 | #Property |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 106 | gpio-fsi/compatible |
| 107 | |
| 108 | |
George Keishing | 5236ec5 | 2022-01-31 12:07:58 -0600 | [diff] [blame] | 109 | Check BMC GPIO Keys Name Property Is Set |
Sivas SRR | fbe34dd | 2017-06-29 11:03:12 -0500 | [diff] [blame] | 110 | [Documentation] Verify if the BMC GPIO-keys name property is |
| 111 | ... populated. |
George Keishing | 5236ec5 | 2022-01-31 12:07:58 -0600 | [diff] [blame] | 112 | [Tags] Check_BMC_GPIO_Keys_Name_Property_Is_Set |
Sivas SRR | fbe34dd | 2017-06-29 11:03:12 -0500 | [diff] [blame] | 113 | [Template] Template Check Property |
| 114 | |
Sivas SRR | fbe34dd | 2017-06-29 11:03:12 -0500 | [diff] [blame] | 115 | #Property |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 116 | gpio-keys/name |
| 117 | |
| 118 | |
George Keishing | 5236ec5 | 2022-01-31 12:07:58 -0600 | [diff] [blame] | 119 | Check BMC GPIO Keys Compatible Property Is Set |
Sivas SRR | fbe34dd | 2017-06-29 11:03:12 -0500 | [diff] [blame] | 120 | [Documentation] Verify if the BMC GPIO-keys compatible property is |
| 121 | ... populated. |
George Keishing | 5236ec5 | 2022-01-31 12:07:58 -0600 | [diff] [blame] | 122 | [Tags] Check_BMC_GPIO_Keys_Compatible_Property_Is_Set |
Sivas SRR | fbe34dd | 2017-06-29 11:03:12 -0500 | [diff] [blame] | 123 | [Template] Template Check Property |
| 124 | |
Sivas SRR | fbe34dd | 2017-06-29 11:03:12 -0500 | [diff] [blame] | 125 | #Property |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 126 | gpio-keys/compatible |
| 127 | |
| 128 | |
| 129 | Check BMC IIO-HWMON Name Property Is Set |
Sivas SRR | f4f533b | 2017-07-30 11:42:12 -0500 | [diff] [blame] | 130 | [Documentation] Verify if the BMC IIO-HWMON-DPS310 name property is |
Sivas SRR | fbe34dd | 2017-06-29 11:03:12 -0500 | [diff] [blame] | 131 | ... populated. |
| 132 | [Tags] Check_BMC_IIO-HWMON_Name_Property_Is_Set |
| 133 | [Template] Template Check Property |
| 134 | |
Sivas SRR | fbe34dd | 2017-06-29 11:03:12 -0500 | [diff] [blame] | 135 | #Property |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 136 | iio-hwmon-dps310/name |
| 137 | |
| 138 | |
| 139 | Check BMC IIO-HWMON Compatible Property Is Set |
Sivas SRR | f4f533b | 2017-07-30 11:42:12 -0500 | [diff] [blame] | 140 | [Documentation] Verify if the BMC IIO-HWMON-DPS310 compatible property is |
Sivas SRR | fbe34dd | 2017-06-29 11:03:12 -0500 | [diff] [blame] | 141 | ... populated. |
| 142 | [Tags] Check_BMC_IIO-HWMON_Compatible_Property_Is_Set |
| 143 | [Template] Template Check Property |
| 144 | |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 145 | #Property |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 146 | iio-hwmon-dps310/compatible |
| 147 | |
| 148 | |
| 149 | Check BMC LED Name Property Is Set |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 150 | [Documentation] Verify if the BMC LED name property is populated. |
| 151 | [Tags] Check_BMC_LED_Name_Property_Is_Set |
| 152 | [Template] Template Check Property |
| 153 | |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 154 | #Property |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 155 | leds/name |
| 156 | |
| 157 | |
| 158 | Check BMC LED Compatible Property Is Set |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 159 | [Documentation] Verify if the BMC LED compatible property is populated. |
| 160 | [Tags] Check_BMC_LED_Compatible_Property_Is_Set |
| 161 | [Template] Template Check Property |
| 162 | |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 163 | #Property |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 164 | leds/compatible |
| 165 | |
| 166 | |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 167 | *** Keywords *** |
| 168 | |
| 169 | Template Check Property |
| 170 | [Documentation] Check for the existence of a property in the device tree. |
| 171 | [Arguments] ${property} |
| 172 | #property: Value of Property |
| 173 | |
| 174 | ${devicetree_path}= Catenate SEPARATOR= |
| 175 | ... ${devicetree_base} ${property} |
| 176 | ${output} ${stderr}= Execute Command cat ${devicetree_path} |
| 177 | ... return_stderr=True |
| 178 | Should Be Empty ${stderr} |
| 179 | ${length}= Get Length ${output} |
| 180 | Should Be True ${length} > 1 |
Rahul Maheshwari | 06174f2 | 2017-03-06 03:17:09 -0600 | [diff] [blame] | 181 | |