[tip:perf/core] perf tests attr: Add proper return values

From: tip-bot for Jiri Olsa
Date: Thu Jul 20 2017 - 04:56:00 EST


Commit-ID: a72fe0afa18abd8d05d26944b32850775cb6c941
Gitweb: http://git.kernel.org/tip/a72fe0afa18abd8d05d26944b32850775cb6c941
Author: Jiri Olsa <jolsa@xxxxxxxxxx>
AuthorDate: Mon, 3 Jul 2017 16:50:24 +0200
Committer: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
CommitDate: Tue, 18 Jul 2017 23:14:19 -0300

perf tests attr: Add proper return values

The record command now properly returns the status of the tracee if
there's any. We need to properly set the expected return value of the
tracee in the attr tests.

Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Cc: Thomas Richter <tmricht@xxxxxxxxxxxxxxxxxx>
Link: http://lkml.kernel.org/r/20170703145030.12903-10-jolsa@xxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/tests/attr/test-record-C0 | 1 +
tools/perf/tests/attr/test-record-basic | 1 +
tools/perf/tests/attr/test-record-branch-any | 1 +
tools/perf/tests/attr/test-record-branch-filter-any | 1 +
tools/perf/tests/attr/test-record-branch-filter-any_call | 1 +
tools/perf/tests/attr/test-record-branch-filter-any_ret | 1 +
tools/perf/tests/attr/test-record-branch-filter-hv | 1 +
tools/perf/tests/attr/test-record-branch-filter-ind_call | 1 +
tools/perf/tests/attr/test-record-branch-filter-k | 1 +
tools/perf/tests/attr/test-record-branch-filter-u | 1 +
tools/perf/tests/attr/test-record-count | 1 +
tools/perf/tests/attr/test-record-data | 1 +
tools/perf/tests/attr/test-record-freq | 1 +
tools/perf/tests/attr/test-record-graph-default | 1 +
tools/perf/tests/attr/test-record-graph-dwarf | 1 +
tools/perf/tests/attr/test-record-graph-fp | 1 +
tools/perf/tests/attr/test-record-group | 1 +
tools/perf/tests/attr/test-record-group-sampling | 1 +
tools/perf/tests/attr/test-record-group1 | 1 +
tools/perf/tests/attr/test-record-no-buffering | 1 +
tools/perf/tests/attr/test-record-no-inherit | 1 +
tools/perf/tests/attr/test-record-no-samples | 1 +
tools/perf/tests/attr/test-record-period | 1 +
tools/perf/tests/attr/test-record-raw | 1 +
24 files changed, 24 insertions(+)

diff --git a/tools/perf/tests/attr/test-record-C0 b/tools/perf/tests/attr/test-record-C0
index d6a7e43..cb0a313 100644
--- a/tools/perf/tests/attr/test-record-C0
+++ b/tools/perf/tests/attr/test-record-C0
@@ -1,6 +1,7 @@
[config]
command = record
args = -C 0 kill >/dev/null 2>&1
+ret = 1

[event:base-record]
cpu=0
diff --git a/tools/perf/tests/attr/test-record-basic b/tools/perf/tests/attr/test-record-basic
index 55c0428..85a23cf 100644
--- a/tools/perf/tests/attr/test-record-basic
+++ b/tools/perf/tests/attr/test-record-basic
@@ -1,5 +1,6 @@
[config]
command = record
args = kill >/dev/null 2>&1
+ret = 1

[event:base-record]
diff --git a/tools/perf/tests/attr/test-record-branch-any b/tools/perf/tests/attr/test-record-branch-any
index 1421960..a2fe031 100644
--- a/tools/perf/tests/attr/test-record-branch-any
+++ b/tools/perf/tests/attr/test-record-branch-any
@@ -1,6 +1,7 @@
[config]
command = record
args = -b kill >/dev/null 2>&1
+ret = 1

[event:base-record]
sample_period=4000
diff --git a/tools/perf/tests/attr/test-record-branch-filter-any b/tools/perf/tests/attr/test-record-branch-filter-any
index 915c4df..7df6a48 100644
--- a/tools/perf/tests/attr/test-record-branch-filter-any
+++ b/tools/perf/tests/attr/test-record-branch-filter-any
@@ -1,6 +1,7 @@
[config]
command = record
args = -j any kill >/dev/null 2>&1
+ret = 1

[event:base-record]
sample_period=4000
diff --git a/tools/perf/tests/attr/test-record-branch-filter-any_call b/tools/perf/tests/attr/test-record-branch-filter-any_call
index 8708dbd..6c93e07 100644
--- a/tools/perf/tests/attr/test-record-branch-filter-any_call
+++ b/tools/perf/tests/attr/test-record-branch-filter-any_call
@@ -1,6 +1,7 @@
[config]
command = record
args = -j any_call kill >/dev/null 2>&1
+ret = 1

[event:base-record]
sample_period=4000
diff --git a/tools/perf/tests/attr/test-record-branch-filter-any_ret b/tools/perf/tests/attr/test-record-branch-filter-any_ret
index 0d3607a..daf8b83 100644
--- a/tools/perf/tests/attr/test-record-branch-filter-any_ret
+++ b/tools/perf/tests/attr/test-record-branch-filter-any_ret
@@ -1,6 +1,7 @@
[config]
command = record
args = -j any_ret kill >/dev/null 2>&1
+ret = 1

[event:base-record]
sample_period=4000
diff --git a/tools/perf/tests/attr/test-record-branch-filter-hv b/tools/perf/tests/attr/test-record-branch-filter-hv
index f255267..fbf491d 100644
--- a/tools/perf/tests/attr/test-record-branch-filter-hv
+++ b/tools/perf/tests/attr/test-record-branch-filter-hv
@@ -1,6 +1,7 @@
[config]
command = record
args = -j hv kill >/dev/null 2>&1
+ret = 1

[event:base-record]
sample_period=4000
diff --git a/tools/perf/tests/attr/test-record-branch-filter-ind_call b/tools/perf/tests/attr/test-record-branch-filter-ind_call
index e862dd1..c63cc50 100644
--- a/tools/perf/tests/attr/test-record-branch-filter-ind_call
+++ b/tools/perf/tests/attr/test-record-branch-filter-ind_call
@@ -1,6 +1,7 @@
[config]
command = record
args = -j ind_call kill >/dev/null 2>&1
+ret = 1

[event:base-record]
sample_period=4000
diff --git a/tools/perf/tests/attr/test-record-branch-filter-k b/tools/perf/tests/attr/test-record-branch-filter-k
index 182971e..e0f2f09 100644
--- a/tools/perf/tests/attr/test-record-branch-filter-k
+++ b/tools/perf/tests/attr/test-record-branch-filter-k
@@ -1,6 +1,7 @@
[config]
command = record
args = -j k kill >/dev/null 2>&1
+ret = 1

[event:base-record]
sample_period=4000
diff --git a/tools/perf/tests/attr/test-record-branch-filter-u b/tools/perf/tests/attr/test-record-branch-filter-u
index 83449ef..6cd36e0 100644
--- a/tools/perf/tests/attr/test-record-branch-filter-u
+++ b/tools/perf/tests/attr/test-record-branch-filter-u
@@ -1,6 +1,7 @@
[config]
command = record
args = -j u kill >/dev/null 2>&1
+ret = 1

[event:base-record]
sample_period=4000
diff --git a/tools/perf/tests/attr/test-record-count b/tools/perf/tests/attr/test-record-count
index 2f841de..34f6cc5 100644
--- a/tools/perf/tests/attr/test-record-count
+++ b/tools/perf/tests/attr/test-record-count
@@ -1,6 +1,7 @@
[config]
command = record
args = -c 123 kill >/dev/null 2>&1
+ret = 1

[event:base-record]
sample_period=123
diff --git a/tools/perf/tests/attr/test-record-data b/tools/perf/tests/attr/test-record-data
index 716e143..53c8890 100644
--- a/tools/perf/tests/attr/test-record-data
+++ b/tools/perf/tests/attr/test-record-data
@@ -1,6 +1,7 @@
[config]
command = record
args = -d kill >/dev/null 2>&1
+ret = 1

[event:base-record]
sample_period=4000
diff --git a/tools/perf/tests/attr/test-record-freq b/tools/perf/tests/attr/test-record-freq
index 600d0f8..bf4cb45 100644
--- a/tools/perf/tests/attr/test-record-freq
+++ b/tools/perf/tests/attr/test-record-freq
@@ -1,6 +1,7 @@
[config]
command = record
args = -F 100 kill >/dev/null 2>&1
+ret = 1

[event:base-record]
sample_period=100
diff --git a/tools/perf/tests/attr/test-record-graph-default b/tools/perf/tests/attr/test-record-graph-default
index 853597a..0b216e6 100644
--- a/tools/perf/tests/attr/test-record-graph-default
+++ b/tools/perf/tests/attr/test-record-graph-default
@@ -1,6 +1,7 @@
[config]
command = record
args = -g kill >/dev/null 2>&1
+ret = 1

[event:base-record]
sample_type=295
diff --git a/tools/perf/tests/attr/test-record-graph-dwarf b/tools/perf/tests/attr/test-record-graph-dwarf
index 8321c60..da2fa73 100644
--- a/tools/perf/tests/attr/test-record-graph-dwarf
+++ b/tools/perf/tests/attr/test-record-graph-dwarf
@@ -1,6 +1,7 @@
[config]
command = record
args = --call-graph dwarf -- kill >/dev/null 2>&1
+ret = 1

[event:base-record]
sample_type=45359
diff --git a/tools/perf/tests/attr/test-record-graph-fp b/tools/perf/tests/attr/test-record-graph-fp
index 055e3be..625d190 100644
--- a/tools/perf/tests/attr/test-record-graph-fp
+++ b/tools/perf/tests/attr/test-record-graph-fp
@@ -1,6 +1,7 @@
[config]
command = record
args = --call-graph fp kill >/dev/null 2>&1
+ret = 1

[event:base-record]
sample_type=295
diff --git a/tools/perf/tests/attr/test-record-group b/tools/perf/tests/attr/test-record-group
index 57739ca..6e7961f 100644
--- a/tools/perf/tests/attr/test-record-group
+++ b/tools/perf/tests/attr/test-record-group
@@ -1,6 +1,7 @@
[config]
command = record
args = --group -e cycles,instructions kill >/dev/null 2>&1
+ret = 1

[event-1:base-record]
fd=1
diff --git a/tools/perf/tests/attr/test-record-group-sampling b/tools/perf/tests/attr/test-record-group-sampling
index 658f5d6..ef59afd 100644
--- a/tools/perf/tests/attr/test-record-group-sampling
+++ b/tools/perf/tests/attr/test-record-group-sampling
@@ -1,6 +1,7 @@
[config]
command = record
args = -e '{cycles,cache-misses}:S' kill >/dev/null 2>&1
+ret = 1

[event-1:base-record]
fd=1
diff --git a/tools/perf/tests/attr/test-record-group1 b/tools/perf/tests/attr/test-record-group1
index c5548d0..87a222d 100644
--- a/tools/perf/tests/attr/test-record-group1
+++ b/tools/perf/tests/attr/test-record-group1
@@ -1,6 +1,7 @@
[config]
command = record
args = -e '{cycles,instructions}' kill >/dev/null 2>&1
+ret = 1

[event-1:base-record]
fd=1
diff --git a/tools/perf/tests/attr/test-record-no-buffering b/tools/perf/tests/attr/test-record-no-buffering
index 0b0355a..5bf349a 100644
--- a/tools/perf/tests/attr/test-record-no-buffering
+++ b/tools/perf/tests/attr/test-record-no-buffering
@@ -1,6 +1,7 @@
[config]
command = record
args = --no-buffering kill >/dev/null 2>&1
+ret = 1

[event:base-record]
sample_period=4000
diff --git a/tools/perf/tests/attr/test-record-no-inherit b/tools/perf/tests/attr/test-record-no-inherit
index 44edcb2..560943d 100644
--- a/tools/perf/tests/attr/test-record-no-inherit
+++ b/tools/perf/tests/attr/test-record-no-inherit
@@ -1,6 +1,7 @@
[config]
command = record
args = -i kill >/dev/null 2>&1
+ret = 1

[event:base-record]
sample_type=263
diff --git a/tools/perf/tests/attr/test-record-no-samples b/tools/perf/tests/attr/test-record-no-samples
index d0141b2..8eb73ab 100644
--- a/tools/perf/tests/attr/test-record-no-samples
+++ b/tools/perf/tests/attr/test-record-no-samples
@@ -1,6 +1,7 @@
[config]
command = record
args = -n kill >/dev/null 2>&1
+ret = 1

[event:base-record]
sample_period=0
diff --git a/tools/perf/tests/attr/test-record-period b/tools/perf/tests/attr/test-record-period
index 8abc531..69bc748 100644
--- a/tools/perf/tests/attr/test-record-period
+++ b/tools/perf/tests/attr/test-record-period
@@ -1,6 +1,7 @@
[config]
command = record
args = -c 100 -P kill >/dev/null 2>&1
+ret = 1

[event:base-record]
sample_period=100
diff --git a/tools/perf/tests/attr/test-record-raw b/tools/perf/tests/attr/test-record-raw
index 4a8ef25..3b89f99 100644
--- a/tools/perf/tests/attr/test-record-raw
+++ b/tools/perf/tests/attr/test-record-raw
@@ -1,6 +1,7 @@
[config]
command = record
args = -R kill >/dev/null 2>&1
+ret = 1

[event:base-record]
sample_period=4000