Running both tests cases 126 128 together causes the first test case
126 to fail:
# for i in $(seq 3); do perf test 126 128; done
126: perf trace BTF general tests : FAILED!
128: perf trace record and replay : Ok
126: perf trace BTF general tests : FAILED!
128: perf trace record and replay : Ok
126: perf trace BTF general tests : FAILED!
128: perf trace record and replay : Ok
#
Test case 126 fails because test case 128 runs concurrently as can
be observed using a ps -ef | grep perf output list on a different
window. Both do a perf trace command concurrently.
Make test case 126 exclusive and it works.
Output after:
# for i in $(seq 3); do perf test 126 128; done
126: perf trace exit race : Ok
128: mmap interface tests :
128.1: Read samples using the mmap interface : Ok
128.2: User space counter reading of instructions : Ok
128.3: User space counter reading of cycles : Ok
128.4: User space counter disabling instructions : Ok
128.5: User space counter disabling cycles : Ok
126: perf trace exit race : Ok
128: mmap interface tests :
128.1: Read samples using the mmap interface : Ok
128.2: User space counter reading of instructions : Ok
128.3: User space counter reading of cycles : Ok
128.4: User space counter disabling instructions : Ok
128.5: User space counter disabling cycles : Ok
126: perf trace exit race : Ok
128: mmap interface tests :
128.1: Read samples using the mmap interface : Ok
128.2: User space counter reading of instructions : Ok
128.3: User space counter reading of cycles : Ok
128.4: User space counter disabling instructions : Ok
128.5: User space counter disabling cycles : Ok
#
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Cc: Howard Chu <howardchu95@gmail.com>
---
tools/perf/tests/shell/trace_btf_general.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/tests/shell/trace_btf_general.sh b/tools/perf/tests/shell/trace_btf_general.sh
index ef2da806be6b..7a94a5743924 100755
--- a/tools/perf/tests/shell/trace_btf_general.sh
+++ b/tools/perf/tests/shell/trace_btf_general.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# perf trace BTF general tests
+# perf trace BTF general tests (exclusive)
# SPDX-License-Identifier: GPL-2.0
err=0
--
2.53.0