Skip to content

Commit 279b5a8

Browse files
captain5050namhyung
authored andcommitted
perf tests stat: Add "--null" coverage
Ensure "--null" does a minimal run. Reported-by: Ingo Molnar <mingo@kernel.org> Closes: https://lore.kernel.org/linux-perf-users/aSwt7yzFjVJCEmVp@gmail.com/ Tested-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: Thomas Richter <tmricht@linux.ibm.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
1 parent e2de90b commit 279b5a8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tools/perf/tests/shell/stat.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,17 @@ test_default_stat() {
1616
echo "Basic stat command test [Success]"
1717
}
1818

19+
test_null_stat() {
20+
echo "Null stat command test"
21+
if ! perf stat --null true 2>&1 | grep -E -q "Performance counter stats for 'true':"
22+
then
23+
echo "Null stat command test [Failed]"
24+
err=1
25+
return
26+
fi
27+
echo "Null stat command test [Success]"
28+
}
29+
1930
test_stat_record_report() {
2031
echo "stat record and report test"
2132
if ! perf stat record -e task-clock -o - true | perf stat report -i - 2>&1 | \
@@ -212,6 +223,7 @@ test_hybrid() {
212223
}
213224

214225
test_default_stat
226+
test_null_stat
215227
test_stat_record_report
216228
test_stat_record_script
217229
test_stat_repeat_weak_groups

0 commit comments

Comments
 (0)