drm/rockchip: Don't change hdmi reference clock rate
[drm/drm-misc.git] / tools / perf / tests / shell / list.sh
blob76a9846cff223b2e3d63d3959f42b7f1b1e2e82d
1 #!/bin/sh
2 # perf list tests
3 # SPDX-License-Identifier: GPL-2.0
5 set -e
7 shelldir=$(dirname "$0")
8 # shellcheck source=lib/setup_python.sh
9 . "${shelldir}"/lib/setup_python.sh
11 list_output=$(mktemp /tmp/__perf_test.list_output.json.XXXXX)
13 cleanup() {
14 rm -f "${list_output}"
16 trap - EXIT TERM INT
19 trap_cleanup() {
20 cleanup
21 exit 1
23 trap trap_cleanup EXIT TERM INT
25 test_list_json() {
26 echo "Json output test"
27 # Generate perf list json output into list_output file.
28 perf list -j -o "${list_output}"
29 # Validate the json using python, redirect the json copy to /dev/null as
30 # otherwise the test may block writing to stdout.
31 $PYTHON -m json.tool "${list_output}" /dev/null
32 echo "Json output test [Success]"
35 test_list_json
36 cleanup
37 exit 0