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