summaryrefslogtreecommitdiffstats
path: root/tools/perf/tests/shell/list.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/tests/shell/list.sh')
-rwxr-xr-xtools/perf/tests/shell/list.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/tests/shell/list.sh b/tools/perf/tests/shell/list.sh
index 8a868ae64560..76a9846cff22 100755
--- a/tools/perf/tests/shell/list.sh
+++ b/tools/perf/tests/shell/list.sh
@@ -24,8 +24,11 @@ trap trap_cleanup EXIT TERM INT
test_list_json() {
echo "Json output test"
+ # Generate perf list json output into list_output file.
perf list -j -o "${list_output}"
- $PYTHON -m json.tool "${list_output}"
+ # Validate the json using python, redirect the json copy to /dev/null as
+ # otherwise the test may block writing to stdout.
+ $PYTHON -m json.tool "${list_output}" /dev/null
echo "Json output test [Success]"
}