Skip to contentSkip to conversation

perf test: Run test 126 exclusive

PATCH Applied Thomas Richter 3 participants 4 messages Apr 8 – Apr 9

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 perf test: Run test 126 exclusive

V1 --> V2 Fixed commit message

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 'perf trace BTF general tests' exclusive.

Output after:

 # for i in $(seq 3); do ./perf test 'perf trace BTF general tests' \
	'perf trace record and replay'; done
 127: perf trace BTF general tests                   : Ok
 155: perf trace record and replay                   : Ok
 127: perf trace BTF general tests                   : Ok
 155: perf trace record and replay                   : Ok
 127: perf trace BTF general tests                   : Ok
 155: perf trace record and replay                   : 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
maintainer
#1 lore raw
Quoted 4 lines · Thomas Richter

V1 --> V2 Fixed commit message

Running both tests cases 126 128 together causes the first test case 126 to fail:

Quoted 8 lines
 # 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
 #

The test numbers can be different on other platforms, let's use the test names like below.

Quoted 7 lines

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 'perf trace BTF general tests' exclusive.

Output after:

Quoted 9 lines
 # for i in $(seq 3); do ./perf test 'perf trace BTF general tests' \
	'perf trace record and replay'; done
 127: perf trace BTF general tests                   : Ok
 155: perf trace record and replay                   : Ok
 127: perf trace BTF general tests                   : Ok
 155: perf trace record and replay                   : Ok
 127: perf trace BTF general tests                   : Ok
 155: perf trace record and replay                   : Ok
 #

I believe I have a fix for this problem but it's blocked by a BPF verifier issue. I need to find time to work on it again..

https://lore.kernel.org/linux-perf-users/[email protected]/

Until then, I think it's ok to have this.

Thanks,
Namhyung

Quoted 21 lines
---
 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
Acked-by
#2 lore raw

Hi Namhyung and Thomas,

Quoted 35 lines · Namhyung Kim
Quoted 4 lines · Thomas Richter

V1 --> V2 Fixed commit message

Running both tests cases 126 128 together causes the first test case 126 to fail:

Quoted 8 lines
 # 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
 #

The test numbers can be different on other platforms, let's use the test names like below.

Quoted 7 lines

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 'perf trace BTF general tests' exclusive.

Output after:

Quoted 9 lines
 # for i in $(seq 3); do ./perf test 'perf trace BTF general tests' \
      'perf trace record and replay'; done
 127: perf trace BTF general tests                   : Ok
 155: perf trace record and replay                   : Ok
 127: perf trace BTF general tests                   : Ok
 155: perf trace record and replay                   : Ok
 127: perf trace BTF general tests                   : Ok
 155: perf trace record and replay                   : Ok
 #
Quoted 6 lines

I believe I have a fix for this problem but it's blocked by a BPF verifier issue. I need to find time to work on it again..

https://lore.kernel.org/linux-perf-users/[email protected]/

Until then, I think it's ok to have this.

Agreed.

Thanks,
Howard

Quoted 7 lines

Thanks,
Namhyung

Quoted 3 lines

Thanks,
Howard

Quoted 18 lines
Quoted 18 lines
---
 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 -2
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
--

2.53.0

maintainer Applied
#3 lore raw
In reply to Thomas Richter
Quoted 13 lines · Thomas Richter

V1 --> V2 Fixed commit message

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
 #
Quoted 1 line

[...]

Applied to perf-tools-next, thanks!

Best regards,
Namhyung