Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf test: Avoid list test blocking on writing to stdout

Python's json.tool will output the input json to stdout. Redirect to
/dev/null to avoid blocking on stdout writes.

Tested-by: James Clark <james.clark@linaro.org>
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Colin Ian King <colin.i.king@gmail.com>
Cc: Howard Chu <howardchu95@gmail.com>
Cc: Weilin Wang <weilin.wang@intel.com>
Cc: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Dapeng Mi <dapeng1.mi@linux.intel.com>
Cc: Athira Jajeev <atrajeev@linux.vnet.ibm.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Veronika Molnarova <vmolnaro@redhat.com>
Link: https://lore.kernel.org/r/20241025192109.132482-5-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>

authored by

Ian Rogers and committed by
Namhyung Kim
2c663439 d50318fe

+4 -1
+4 -1
tools/perf/tests/shell/list.sh
··· 24 24 25 25 test_list_json() { 26 26 echo "Json output test" 27 + # Generate perf list json output into list_output file. 27 28 perf list -j -o "${list_output}" 28 - $PYTHON -m json.tool "${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 29 32 echo "Json output test [Success]" 30 33 } 31 34