Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Execute Post Fail Action if VPD parsing fails (ibm-openbmc#425)
This commit adds changes to execute Post Fail Action for a FRU if Pre Action for the FRU has passed and VPD parsing has failed. Test: 1. Create a malformed VPD file by modifying copy of 7-0051/eeprom, name the copy as 7-0051_eeprom_noVTOC.dat 2. Create a copy of 50001001.json, name the copy as 50001001_custom.json. Replace "/sys/bus/i2c/drivers/at24/7-0051/eeprom" string in the custom JSON with "7-0051_eeprom_noVTOC.dat". 3. Run ./vpd-parser -f /tmp/7-0051_eeprom_noVTOC.dat -c ./50001001_custom.json. 4. Observe the logs to see "preAction" is successful, VPD parsing fails and "postFailAction" is executed as specified in the custom JSON. 5. Now run /vpd-parser -f /sys/bus/i2c/drivers/at24/7-0051/eeprom -c ./50001001.json. 6. Observe the logs to see "preAction" is successful, VPD parsing is successful and "postFailAction" is not executed. Signed-off-by: Souvik Roy <[email protected]>
- Loading branch information