Skip to content

Commit

Permalink
perf tests: Fixes hang in zstd compression test by changing the sourc…
Browse files Browse the repository at this point in the history
…e of random data

Running 'perf test' with zstd compression linked will hang at the test
'Zstd perf.data compression/decompression' because /dev/random blocks
reads until there is enough entropy. This means that the test will
appear to never complete unless the mouse is continually moved while
running it.

Signed-off-by: James Clark <james.clark@arm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
Cc: Jeremy Linton <jeremy.linton@arm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/3d8cc701-df4e-f949-1715-5118b530e990@arm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
James-A-Clark authored and acmel committed Aug 26, 2019
1 parent 185bcb9 commit d93fc7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/perf/tests/shell/record+zstd_comp_decomp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ skip_if_no_z_record() {
collect_z_record() {
echo "Collecting compressed record file:"
$perf_tool record -o $trace_file -g -z -F 5000 -- \
dd count=500 if=/dev/random of=/dev/null
dd count=500 if=/dev/urandom of=/dev/null
}

check_compressed_stats() {
Expand Down

0 comments on commit d93fc7a

Please sign in to comment.