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