1## Tools used in OpenBMC Test Automation 2 3## IPMItool considerations: 4 5IPMItool version 1.8.18 or later. 6 7``` 8 $ ipmitool -V 9 ipmitool version 1.8.18 10``` 11 12## Hardware Test Executive (HTX): 13 14HTX is a suite of test tools for stressing system hardware. It is routinely used 15by the test suites under `systest/`. Refer to 16[README](https://github.com/open-power/HTX) 17 18## Remote Logging via Rsyslog 19 20Refer to 21[README](https://github.com/openbmc/phosphor-logging/blob/master/README.md#remote-logging-via-rsyslog) 22 23## Converting SELs to readable format: 24 25Pre-requisite: A Power Linux system is required. 26 27- Obtain the SEL (System Error Log) parser tools: 28 - Go to https://openpower.xyz/job/openpower/job/openpower-op-build/ 29 - Click the link for the BMC system of interest (e.g. witherspoon) 30 - Click the "host_fw_debug.tar" link in order to download the tar file. 31 - On your Power Linux system, untar the file with the following command: 32 33 ``` 34 $ tar -xvf host_fw_debug.tar 35 ``` 36 - Rename the untarred files with: 37 38 ``` 39 $ for file_name in host_fw_debug* ; do mv $file_name ${file_name#host_fw_debug} ; done 40 ``` 41 42 The files of interest are: eSEL.pl hbotStringFile hbicore.syms 43 44- The error log binary parser is also required: 45 - Go to https://sourceforge.net/projects/linux-diag/files/ppc64-diag/ 46 - Download the latest release version of the source tar zipped. 47 - Extract the tarball and compile. Refer to README in the source. 48 - On successful compilation, get `opal-elog-parse` binary. 49 50- To generate a readable error log from binary SEL data: 51 52 Create a directory and copy the binary files there. Next, 53 54 ``` 55 $ export PATH=$PATH:<path to directory> 56 ``` 57 58 And run 59 60 ``` 61 $ eSEL.pl -l SEL_data -p decode_obmc_data --op 62 ``` 63 64 where `SEL_data` is the file containing SEL binary data and option "--op" will 65 refer "opal-elog-parse" instead or errl. 66 67 The output file `SEL_data.txt` contains the readable error log (SEL) data. 68 69## The opal-prd Tool: 70 71opal-prd is a tool used by the Energy Scale and RAS tests. It should be 72installed on the OS of the system under test before running those tests. 73 74opal-prd may be installed on Ubuntu with: `apt install opal-prd` and on RedHat 75with: `yum install opal-prd` 76 77## Obtain a copy of GitHub issues in CSV format: 78 79Note: You will be prompted to enter your GitHub password. 80 81Usage: 82 83``` 84$ cd tools/ 85$ python github_issues_to_csv <github user> <github repo> 86``` 87 88Example for getting openbmc issues: 89 90``` 91$ python github_issues_to_csv <github user> openbmc/openbmc 92``` 93 94Example for getting openbmc-test-automation issues: 95 96``` 97$ python github_issues_to_csv <github user> openbmc/openbmc-test-automation 98``` 99 100## Generate Documentation for Robot Test Cases: 101 102Usage: 103 104``` 105$ ./tools/generate_test_document <Robot test directory path> <test case document file path> 106``` 107 108Example for generating tests cases documentation for tests directory: 109 110``` 111$ ./tools/generate_test_document tests testsdirectoryTCdocs.html 112``` 113 114Example for generating tests cases documentation: Note: Invoke the tool without 115arguments: 116 117``` 118$ ./tools/generate_test_document 119``` 120 121## Non-Volatile Memory Express Command Line Interface (nvme-cli): 122 123nvme-cli is a linux command line tool for accessing Non-Volatile Storage (NVM) 124media attached via PCIe bus. 125 126Source: https://github.com/linux-nvme/nvme-cli 127 128To install nvme-cli on RedHat: 129 130``` 131yum install name-cli 132``` 133 134To install nvme-cli on Ubuntu: 135 136``` 137sudo apt-get install nvme-cli 138``` 139 140- Obtaining the PPA for Ubuntu 141 - Add the sbates PPA to your sources: 142 https://launchpad.net/~sbates/+archive/ubuntu/ppa 143 144## The Hdparm tool: 145 146hdparm is a command line utility for setting and viewing hardware parameters of 147hard disk drives. 148 149To install hdparm on RedHat: 150 151``` 152yum install hdparm 153``` 154 155To install hdparm on Ubuntu: 156 157``` 158sudo apt-get update 159sudo apt-get install hdparm 160``` 161 162## OpenSSL tool: 163 164OpenSSL is an open-source command line tool that is commonly used to generate 165certificates and private keys, create CSRs and identify certificate information. 166 167To generate a self-signed certificate with a private key: 168 169``` 170openssl 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>" 171``` 172 173_Example:_ 174 175``` 176openssl req -x509 -sha256 -newkey rsa:2048 -nodes -days 365 -keyout certificate.pem -out certificate.pem -subj "/O=XYZ Corporation /CN=www.xyz.com" 177``` 178 179To view installed certificates on a OpenBMC system: 180 181``` 182openssl s_client -connect <BMC_IP>:443 -showcerts 183``` 184 185Refer to the 186[OpenSSL manual](https://www.openssl.org/docs/manmaster/man1/req.html) for more 187details. 188 189## peltool: 190 191peltool is an open-source platform event log(PEL) tool generally used to view 192and delete pel logs that are generated on the BMC system. Also, provides various 193pel related operations as mentioned in the 'peltool --help'. 194 195``` 196 peltool -h 197OpenBMC PEL Tool 198Usage: peltool [OPTIONS] 199 200Options: 201 --help Print this help message and exit 202 --file TEXT Display a PEL using its Raw PEL file 203 -i,--id TEXT Display a PEL based on its ID 204 --bmc-id TEXT Display a PEL based on its BMC Event ID 205 -a Display all PELs 206 -l List PELs 207 -n Show number of PELs 208 -r Reverse order of output 209 -h Include hidden PELs 210 -f,--info Include informational PELs 211 -t,--termination List only critical system terminating PELs 212 -d,--delete TEXT Delete a PEL based on its ID 213 -D,--delete-all Delete all PELs 214 -s,--scrub TEXT File containing SRC regular expressions to ignore 215 -x Display PEL(s) in hexdump instead of JSON 216 --archive List or display archived PELs 217``` 218 219## guard tool: 220 221guard tool on BMC provides an option to create, view and delete the faulty 222units. Refer to [README](https://github.com/open-power/guard#readme) 223 224## pldmtool: 225 226pldmtool is an open-source client tool that acts as a PLDM requester which runs 227on the BMC. pldmtool supports the subcommands for PLDM types such as base, 228platform, bios, fru, and oem-ibm as mentioned in the 'pldmtool --help'. Refer to 229[README](https://github.com/openbmc/pldm/tree/master/pldmtool#README.md) 230 231## VPD tool: 232 233VPD tool is designed for managing BMC system FRU's Vital Product Data(VPD). It 234provides command line interface to read and write FRU's VPD. Refer 235[VPD TOOL README](https://github.com/openbmc/openpower-vpd-parser/blob/master/vpd-tool/README.md) 236