treewide: lint and format
Run all the latest linters and formatters from openbmc-build-scripts.
These were all robotically generated except for fixes due to
markdownlint warnings.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: If16d2fd802a2d452234d8b56b41e79d030138a6b
diff --git a/tracing/README.md b/tracing/README.md
index 5ee628f..a125b52 100644
--- a/tracing/README.md
+++ b/tracing/README.md
@@ -1,27 +1,25 @@
-Description
-===========
+# trace
-The trace script automates the process of enabling named sets of tracepoints
-and dumping the trace file over the SSH connection, then cleaning up after
-itself.
+## Description
-Usage
-=====
+The trace script automates the process of enabling named sets of tracepoints and
+dumping the trace file over the SSH connection, then cleaning up after itself.
+
+## Usage
To run:
-```
+```text
Usage: ./trace [USER@]HOST EVENTSET [EVENTSET...]
Valid EVENTSETs: fsi, occ, sbefifo, timer, sched
-
```
To stop the trace output and disable the tracepoints, hit `Return`.
For example, capturing the defined tracepoints for the `sched` event set:
-```
+```sh
$ ./trace root@my-bmc sched
+ set -eou pipefail
+ set -x
diff --git a/tracing/trace b/tracing/trace
index 89840e1..db1b74f 100755
--- a/tracing/trace
+++ b/tracing/trace
@@ -7,10 +7,10 @@
if [ $# -lt 2 ]
then
- echo Usage: $0 [USER@]HOST EVENTSET [EVENTSET...]
- echo
- echo Valid EVENTSETs: fsi, occ, sbefifo, timer, sched
- exit 1
+ echo Usage: $0 [USER@]HOST EVENTSET [EVENTSET...]
+ echo
+ echo Valid EVENTSETs: fsi, occ, sbefifo, timer, sched
+ exit 1
fi
TRACE_TARGET="$1"
@@ -20,8 +20,8 @@
TRACESCRIPT_PATH="$(mktemp obmc-fsi-trace.XXXXXX)"
TRACESCRIPT="$(basename "${TRACESCRIPT_PATH}")"
-on_exit() {
- rm -f "${TRACESCRIPT_PATH}"
+function on_exit() {
+ rm -f "${TRACESCRIPT_PATH}"
}
trap on_exit EXIT