Skip to contentSkip to conversation

Squash-to: "selftests: mptcp: tweak simult_flows for debug kernels"

PATCH In review Mat Martineau 3 participants 3 messages Jul 5, 2022 – Jul 6, 2022

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

PATCH v2 1/1 Squash-to: "selftests: mptcp: tweak simult_flows for debug kernels"

kbuild is still seeing intermittent failures in the simult_flows.sh test. It uses a kernel config without kmemleak, but with other performance-affecting debug options like lockdep and kasan.

Example failures:
kernel-selftests.net/mptcp.simult_flows.sh.unbalanced_bwidth_with_unbalanced_delay_transfer_slower_than_expected!_runtime_4339_ms_expected_4005_ms_max_4005.fail kernel-selftests.net/mptcp.simult_flows.sh.unbalanced_bwidth_transfer_slower_than_expected!_runtime_4285_ms_expected_4005_ms_max_4005.fail kernel-selftests.net/mptcp.simult_flows.sh.unbalanced_bwidth_transfer_slower_than_expected!_runtime_4346_ms_expected_4005_ms_max_4005.fail

Adjust the debug detection to look for more kernel debug features and further loosen the simult_flows timing constraints if any of those features are detected.

v2: Use kallsyms for debug feature detection, increase the debug timeout.

---
 tools/testing/selftests/net/mptcp/simult_flows.sh | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
tools/testing/selftests/net/mptcp/simult_flows.sh +6 -3
index e266b26a4274..ffa13a957a36 100755
@@ -110,9 +110,12 @@ setup()
 	# debug build can slow down measurably the test program
 	# we use quite tight time limit on the run-time, to ensure
 	# maximum B/W usage.
-	# Use the kmemleak file presence as a rough estimate for this being
-	# a debug kernel and increase the maximum run-time accordingly
-	[ -f /sys/kernel/debug/kmemleak ] && slack=$((slack+200))
+	# Use kmemleak/lockdep/kasan/prove_locking presence as a rough
+	# estimate for this being a debug kernel and increase the
+	# maximum run-time accordingly. Observed run times for CI builds
+	# running selftests, including kbuild, were used to determine the
+	# amount of time to add.
+	grep -q ' kmemleak_init$\| lockdep_init$\| kasan_init$\| prove_locking$' /proc/kallsyms && slack=$((slack+550))
 }
 
 # $1: ns, $2: port
Signature · 1 line
2.37.0
#1 lore raw

Re: Squash-to: "selftests: mptcp: tweak simult_flows for debug kernels": Tests Results

Hi Mat,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal:
- Success! ✅:
- Task: https://cirrus-ci.com/task/5834940309831680
- Summary: https://api.cirrus-ci.com/v1/artifact/task/5834940309831680/summary/summary.txt

- KVM Validation: debug:
- Success! ✅:
- Task: https://cirrus-ci.com/task/5271990356410368
- Summary: https://api.cirrus-ci.com/v1/artifact/task/5271990356410368/summary/summary.txt

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/153529610b41

If there are some issues, you can reproduce them using the same environment as the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-debug

For more details:

https://github.com/multipath-tcp/mptcp-upstream-virtme-docker

Please note that despite all the efforts that have been already done to have a stable tests suite when executed on a public CI like here, it is possible some reported issues are not due to your modifications. Still, do not hesitate to help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (Tessares)

#2 lore raw
In reply to Mat Martineau

Hi Mat,

Quoted 9 lines · Mat Martineau

kbuild is still seeing intermittent failures in the simult_flows.sh test. It uses a kernel config without kmemleak, but with other performance-affecting debug options like lockdep and kasan.

Example failures:
kernel-selftests.net/mptcp.simult_flows.sh.unbalanced_bwidth_with_unbalanced_delay_transfer_slower_than_expected!_runtime_4339_ms_expected_4005_ms_max_4005.fail kernel-selftests.net/mptcp.simult_flows.sh.unbalanced_bwidth_transfer_slower_than_expected!_runtime_4285_ms_expected_4005_ms_max_4005.fail kernel-selftests.net/mptcp.simult_flows.sh.unbalanced_bwidth_transfer_slower_than_expected!_runtime_4346_ms_expected_4005_ms_max_4005.fail

Quoted 5 lines

Adjust the debug detection to look for more kernel debug features and further loosen the simult_flows timing constraints if any of those features are detected.

v2: Use kallsyms for debug feature detection, increase the debug timeout.

Thank you for the v2!

- a240e7e697a6: "squashed" in "selftests: mptcp: tweak simult_flows for debug kernels"
- 3925007b31c6: "Signed-off-by" + "Co-developed-by"
- Results: 7d868133e0d9..bf96db80c6d5 (export)

I left the Co-dev tags because they make sense and I'm sure you will change the tags anyway when sending them to netdev :)

Builds and tests are now in progress:

https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20220706T171803
https://github.com/multipath-tcp/mptcp_net-next/actions/workflows/build-validation.yml?query=branch:export

Cheers,
Matt

Signature · 2 lines
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net