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