112e33526SPatrick Williams## Tools used in OpenBMC Test Automation 28fc3ba03SGeorge Keishing 312e33526SPatrick Williams## IPMItool considerations: 48fc3ba03SGeorge Keishing 58fc3ba03SGeorge KeishingIPMItool version 1.8.18 or later. 612e33526SPatrick Williams 78fc3ba03SGeorge Keishing``` 88fc3ba03SGeorge Keishing $ ipmitool -V 98fc3ba03SGeorge Keishing ipmitool version 1.8.18 108fc3ba03SGeorge Keishing``` 118fc3ba03SGeorge Keishing 1212e33526SPatrick Williams## Hardware Test Executive (HTX): 138fc3ba03SGeorge Keishing 1412e33526SPatrick WilliamsHTX is a suite of test tools for stressing system hardware. It is routinely used 1512e33526SPatrick Williamsby the test suites under `systest/`. Refer to 1612e33526SPatrick Williams[README](https://github.com/open-power/HTX) 178fc3ba03SGeorge Keishing 1812e33526SPatrick Williams## Remote Logging via Rsyslog 198fc3ba03SGeorge Keishing 2012e33526SPatrick WilliamsRefer to 2112e33526SPatrick Williams[README](https://github.com/openbmc/phosphor-logging/blob/master/README.md#remote-logging-via-rsyslog) 228fc3ba03SGeorge Keishing 2312e33526SPatrick Williams## Converting SELs to readable format: 248fc3ba03SGeorge Keishing 258fc3ba03SGeorge KeishingPre-requisite: A Power Linux system is required. 268fc3ba03SGeorge Keishing 2712e33526SPatrick Williams- Obtain the SEL (System Error Log) parser tools: 2812e33526SPatrick Williams 29995d60c9SGeorge Keishing - Go to https://openpower.xyz/job/openpower/job/openpower-op-build/ 308fc3ba03SGeorge Keishing - Click the link for the BMC system of interest (e.g. witherspoon) 318fc3ba03SGeorge Keishing - Click the "host_fw_debug.tar" link in order to download the tar file. 328fc3ba03SGeorge Keishing - On your Power Linux system, untar the file with the following command: 3312e33526SPatrick Williams 348fc3ba03SGeorge Keishing ``` 358fc3ba03SGeorge Keishing $ tar -xvf host_fw_debug.tar 368fc3ba03SGeorge Keishing ``` 378fc3ba03SGeorge Keishing 388fc3ba03SGeorge Keishing - Rename the untarred files with: 3912e33526SPatrick Williams 408fc3ba03SGeorge Keishing ``` 418fc3ba03SGeorge Keishing $ for file_name in host_fw_debug* ; do mv $file_name ${file_name#host_fw_debug} ; done 428fc3ba03SGeorge Keishing ``` 438fc3ba03SGeorge Keishing 4412e33526SPatrick Williams The files of interest are: eSEL.pl hbotStringFile hbicore.syms 458fc3ba03SGeorge Keishing 4612e33526SPatrick Williams- The error log binary parser is also required: 4712e33526SPatrick Williams 488fc3ba03SGeorge Keishing - Go to https://sourceforge.net/projects/linux-diag/files/ppc64-diag/ 498fc3ba03SGeorge Keishing - Download the latest release version of the source tar zipped. 508fc3ba03SGeorge Keishing - Extract the tarball and compile. Refer to README in the source. 518fc3ba03SGeorge Keishing - On successful compilation, get `opal-elog-parse` binary. 528fc3ba03SGeorge Keishing 5312e33526SPatrick Williams- To generate a readable error log from binary SEL data: 548fc3ba03SGeorge Keishing 558fc3ba03SGeorge Keishing Create a directory and copy the binary files there. Next, 568fc3ba03SGeorge Keishing 578fc3ba03SGeorge Keishing ``` 588fc3ba03SGeorge Keishing $ export PATH=$PATH:<path to directory> 598fc3ba03SGeorge Keishing ``` 6012e33526SPatrick Williams 618fc3ba03SGeorge Keishing And run 6212e33526SPatrick Williams 638fc3ba03SGeorge Keishing ``` 648fc3ba03SGeorge Keishing $ eSEL.pl -l SEL_data -p decode_obmc_data --op 658fc3ba03SGeorge Keishing ``` 6612e33526SPatrick Williams 6712e33526SPatrick Williams where `SEL_data` is the file containing SEL binary data and option "--op" will 6812e33526SPatrick Williams refer "opal-elog-parse" instead or errl. 698fc3ba03SGeorge Keishing 708fc3ba03SGeorge Keishing The output file `SEL_data.txt` contains the readable error log (SEL) data. 718fc3ba03SGeorge Keishing 7212e33526SPatrick Williams## The opal-prd Tool: 738fc3ba03SGeorge Keishing 748fc3ba03SGeorge Keishingopal-prd is a tool used by the Energy Scale and RAS tests. It should be 758fc3ba03SGeorge Keishinginstalled on the OS of the system under test before running those tests. 768fc3ba03SGeorge Keishing 7712e33526SPatrick Williamsopal-prd may be installed on Ubuntu with: `apt install opal-prd` and on RedHat 7812e33526SPatrick Williamswith: `yum install opal-prd` 798fc3ba03SGeorge Keishing 8012e33526SPatrick Williams## Obtain a copy of GitHub issues in CSV format: 818fc3ba03SGeorge Keishing 828fc3ba03SGeorge KeishingNote: You will be prompted to enter your GitHub password. 838fc3ba03SGeorge Keishing 848fc3ba03SGeorge KeishingUsage: 8512e33526SPatrick Williams 868fc3ba03SGeorge Keishing``` 878fc3ba03SGeorge Keishing$ cd tools/ 888fc3ba03SGeorge Keishing$ python github_issues_to_csv <github user> <github repo> 898fc3ba03SGeorge Keishing``` 9012e33526SPatrick Williams 918fc3ba03SGeorge KeishingExample for getting openbmc issues: 9212e33526SPatrick Williams 938fc3ba03SGeorge Keishing``` 948fc3ba03SGeorge Keishing$ python github_issues_to_csv <github user> openbmc/openbmc 958fc3ba03SGeorge Keishing``` 9612e33526SPatrick Williams 978fc3ba03SGeorge KeishingExample for getting openbmc-test-automation issues: 9812e33526SPatrick Williams 998fc3ba03SGeorge Keishing``` 1008fc3ba03SGeorge Keishing$ python github_issues_to_csv <github user> openbmc/openbmc-test-automation 1018fc3ba03SGeorge Keishing``` 1028fc3ba03SGeorge Keishing 10312e33526SPatrick Williams## Generate Documentation for Robot Test Cases: 1048fc3ba03SGeorge Keishing 1058fc3ba03SGeorge KeishingUsage: 10612e33526SPatrick Williams 1078fc3ba03SGeorge Keishing``` 1088fc3ba03SGeorge Keishing$ ./tools/generate_test_document <Robot test directory path> <test case document file path> 1098fc3ba03SGeorge Keishing``` 1108fc3ba03SGeorge Keishing 1118fc3ba03SGeorge KeishingExample for generating tests cases documentation for tests directory: 11212e33526SPatrick Williams 1138fc3ba03SGeorge Keishing``` 1148fc3ba03SGeorge Keishing$ ./tools/generate_test_document tests testsdirectoryTCdocs.html 1158fc3ba03SGeorge Keishing``` 1168fc3ba03SGeorge Keishing 11712e33526SPatrick WilliamsExample for generating tests cases documentation: Note: Invoke the tool without 11812e33526SPatrick Williamsarguments: 11912e33526SPatrick Williams 1208fc3ba03SGeorge Keishing``` 1218fc3ba03SGeorge Keishing$ ./tools/generate_test_document 1228fc3ba03SGeorge Keishing``` 1238fc3ba03SGeorge Keishing 12412e33526SPatrick Williams## Non-Volatile Memory Express Command Line Interface (nvme-cli): 1258fc3ba03SGeorge Keishing 12612e33526SPatrick Williamsnvme-cli is a linux command line tool for accessing Non-Volatile Storage (NVM) 12712e33526SPatrick Williamsmedia attached via PCIe bus. 1288fc3ba03SGeorge Keishing 1298fc3ba03SGeorge KeishingSource: https://github.com/linux-nvme/nvme-cli 1308fc3ba03SGeorge Keishing 1318fc3ba03SGeorge KeishingTo install nvme-cli on RedHat: 13212e33526SPatrick Williams 1338fc3ba03SGeorge Keishing``` 1348fc3ba03SGeorge Keishingyum install name-cli 1358fc3ba03SGeorge Keishing``` 13612e33526SPatrick Williams 1378fc3ba03SGeorge KeishingTo install nvme-cli on Ubuntu: 13812e33526SPatrick Williams 1398fc3ba03SGeorge Keishing``` 1408fc3ba03SGeorge Keishingsudo apt-get install nvme-cli 1418fc3ba03SGeorge Keishing``` 1428fc3ba03SGeorge Keishing 14312e33526SPatrick Williams- Obtaining the PPA for Ubuntu 14412e33526SPatrick Williams - Add the sbates PPA to your sources: 14512e33526SPatrick Williams https://launchpad.net/~sbates/+archive/ubuntu/ppa 1468fc3ba03SGeorge Keishing 14712e33526SPatrick Williams## The Hdparm tool: 1488fc3ba03SGeorge Keishing 14912e33526SPatrick Williamshdparm is a command line utility for setting and viewing hardware parameters of 15012e33526SPatrick Williamshard disk drives. 1518fc3ba03SGeorge Keishing 1528fc3ba03SGeorge KeishingTo install hdparm on RedHat: 15312e33526SPatrick Williams 1548fc3ba03SGeorge Keishing``` 1558fc3ba03SGeorge Keishingyum install hdparm 1568fc3ba03SGeorge Keishing``` 15712e33526SPatrick Williams 1588fc3ba03SGeorge KeishingTo install hdparm on Ubuntu: 15912e33526SPatrick Williams 1608fc3ba03SGeorge Keishing``` 1618fc3ba03SGeorge Keishingsudo apt-get update 1628fc3ba03SGeorge Keishingsudo apt-get install hdparm 1638fc3ba03SGeorge Keishing``` 1648fc3ba03SGeorge Keishing 1658fc3ba03SGeorge Keishing## OpenSSL tool: 16612e33526SPatrick Williams 16712e33526SPatrick WilliamsOpenSSL is an open-source command line tool that is commonly used to generate 16812e33526SPatrick Williamscertificates and private keys, create CSRs and identify certificate information. 1698fc3ba03SGeorge Keishing 1708fc3ba03SGeorge KeishingTo generate a self-signed certificate with a private key: 1718fc3ba03SGeorge Keishing 1728fc3ba03SGeorge Keishing``` 1738fc3ba03SGeorge Keishingopenssl req -x509 -sha256 -newkey rsa:2048 -nodes -days <number of days a certificate is valid for> -keyout <certificate filename> -out <certificate filename> -subj "/O=<Organization Name>/CN=<Common Name>" 1748fc3ba03SGeorge Keishing``` 1758fc3ba03SGeorge Keishing 1768fc3ba03SGeorge Keishing_Example:_ 17712e33526SPatrick Williams 1788fc3ba03SGeorge Keishing``` 1798fc3ba03SGeorge Keishingopenssl req -x509 -sha256 -newkey rsa:2048 -nodes -days 365 -keyout certificate.pem -out certificate.pem -subj "/O=XYZ Corporation /CN=www.xyz.com" 1808fc3ba03SGeorge Keishing``` 1818fc3ba03SGeorge Keishing 1828fc3ba03SGeorge KeishingTo view installed certificates on a OpenBMC system: 18312e33526SPatrick Williams 1848fc3ba03SGeorge Keishing``` 1858fc3ba03SGeorge Keishingopenssl s_client -connect <BMC_IP>:443 -showcerts 1868fc3ba03SGeorge Keishing``` 1878fc3ba03SGeorge Keishing 18812e33526SPatrick WilliamsRefer to the 18912e33526SPatrick Williams[OpenSSL manual](https://www.openssl.org/docs/manmaster/man1/req.html) for more 19012e33526SPatrick Williamsdetails. 1913e2a42e0SSridevi Ramesh 19212e33526SPatrick Williams## peltool: 19312e33526SPatrick Williams 19412e33526SPatrick Williamspeltool is an open-source platform event log(PEL) tool generally used to view 19512e33526SPatrick Williamsand delete pel logs that are generated on the BMC system. Also, provides various 19612e33526SPatrick Williamspel related operations as mentioned in the 'peltool --help'. 1973e2a42e0SSridevi Ramesh 1983e2a42e0SSridevi Ramesh``` 1993e2a42e0SSridevi Ramesh peltool -h 2003e2a42e0SSridevi RameshOpenBMC PEL Tool 2013e2a42e0SSridevi RameshUsage: peltool [OPTIONS] 2023e2a42e0SSridevi Ramesh 2033e2a42e0SSridevi RameshOptions: 2043e2a42e0SSridevi Ramesh --help Print this help message and exit 2053e2a42e0SSridevi Ramesh --file TEXT Display a PEL using its Raw PEL file 2063e2a42e0SSridevi Ramesh -i,--id TEXT Display a PEL based on its ID 2073e2a42e0SSridevi Ramesh --bmc-id TEXT Display a PEL based on its BMC Event ID 2083e2a42e0SSridevi Ramesh -a Display all PELs 2093e2a42e0SSridevi Ramesh -l List PELs 2103e2a42e0SSridevi Ramesh -n Show number of PELs 2113e2a42e0SSridevi Ramesh -r Reverse order of output 2123e2a42e0SSridevi Ramesh -h Include hidden PELs 2133e2a42e0SSridevi Ramesh -f,--info Include informational PELs 2143e2a42e0SSridevi Ramesh -t,--termination List only critical system terminating PELs 2153e2a42e0SSridevi Ramesh -d,--delete TEXT Delete a PEL based on its ID 2163e2a42e0SSridevi Ramesh -D,--delete-all Delete all PELs 2173e2a42e0SSridevi Ramesh -s,--scrub TEXT File containing SRC regular expressions to ignore 2183e2a42e0SSridevi Ramesh -x Display PEL(s) in hexdump instead of JSON 2193e2a42e0SSridevi Ramesh --archive List or display archived PELs 2203e2a42e0SSridevi Ramesh``` 2213e2a42e0SSridevi Ramesh 22212e33526SPatrick Williams## guard tool: 2233e2a42e0SSridevi Ramesh 22412e33526SPatrick Williamsguard tool on BMC provides an option to create, view and delete the faulty 22512e33526SPatrick Williamsunits. Refer to [README](https://github.com/open-power/guard#readme) 22612e33526SPatrick Williams 22712e33526SPatrick Williams## pldmtool: 22812e33526SPatrick Williams 22912e33526SPatrick Williamspldmtool is an open-source client tool that acts as a PLDM requester which runs 23012e33526SPatrick Williamson the BMC. pldmtool supports the subcommands for PLDM types such as base, 23112e33526SPatrick Williamsplatform, bios, fru, and oem-ibm as mentioned in the 'pldmtool --help'. Refer to 23212e33526SPatrick Williams[README](https://github.com/openbmc/pldm/tree/master/pldmtool#README.md) 233*063805feSSridevi Ramesh 234*063805feSSridevi Ramesh## VPD tool: 235*063805feSSridevi Ramesh 236*063805feSSridevi RameshVPD tool is designed for managing BMC system FRU's Vital Product Data(VPD). It 237*063805feSSridevi Rameshprovides command line interface to read and write FRU's VPD. Refer 238*063805feSSridevi Ramesh[VPD TOOL README](https://github.com/openbmc/openpower-vpd-parser/blob/master/vpd-tool/README.md) 239