Skip to contentSkip to conversation

perf test: Run test 126 exclusive

PATCH Superseded Thomas Richter 2 participants 2 messages Apr 8

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf test: Run test 126 exclusive

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
 #
---
 tools/perf/tests/shell/trace_btf_general.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/tests/shell/trace_btf_general.sh +1 -1
index ef2da806be6b..7a94a5743924 100755
@@ -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
Signature · 1 line
2.53.0
#1 lore raw
Sashiko AI review found 1 potential issue(s): - [Medium] The commit message demonstrates flawed validation of the fix. By marking the test as `(exclusive)`, its numerical test ID changed because…

Sashiko AI review found 1 potential issue(s):
- [Medium] The commit message demonstrates flawed validation of the fix. By marking the test as (exclusive), its numerical test ID changed because exclusive tests are deferred and sorted differently in perf test. In the 'Output after' section, the author runs perf test 126 128, but the output shows this executed entirely different tests ('perf trace exit race' and 'mmap interface tests') rather than the intended 'perf trace BTF general tests'. Thus, the provided proof of the fix is invalid. --

commit c35ec49c9966f472a5d232107254f8f61709b80f
Author: Thomas Richter <[email protected]>

perf test: Run test 126 exclusive

This commit marks the 'perf trace BTF general tests' shell script as exclusive to prevent it from failing when run concurrently with other trace tests.

Quoted 5 lines

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

Does this validation output demonstrate the correct tests being run?

In the first output block of the commit message, test 126 is 'perf trace BTF general tests' and 128 is 'perf trace record and replay'. In this later output block, 126 is 'perf trace exit race' and 128 is 'mmap interface tests'.

Did adding the exclusive tag shift the numeric test IDs, causing the validation command to run unrelated tests instead of verifying the fix for the intended BTF general tests?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1