Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] harness_reset_abi.py races with its child process when resolving the Generic Netlink family, leading to test failure on a fresh system.
--
--- Patch [6]: [RFC PATCH 06/12] drm/fabric: add YNL query and policy selftests ---
commit 095db697e4004f927fd42e79eb88a4bd06030771
Author: Konstantin Sinyuk <[email protected]>
Subject: drm/fabric: add YNL query and policy selftests
This commit adds eleven kselftest programs for the drm-fabric Generic Netlink
ABI. These tests use the in-tree YNL client against fabricsim to cover paths
like policy validation, multipart dumps, and family introspection.
> diff --git a/tools/testing/selftests/drivers/gpu/drm_fabric/harness_reset_abi.py b/tools/testing/selftests/drivers/gpu/drm_fabric/harness_reset_abi.py
> new file mode 100755
> index 0000000000000..211613185a39b
> --- /dev/null
> +++ b/tools/testing/selftests/drivers/gpu/drm_fabric/harness_reset_abi.py
[ ... ]
> +def test_sigkill_topology_recovery(ksft, cfg):
> + """A SIGKILL-leaked switch shape must not survive the next entry reset."""
> + # 1. Bring up the switch shape in a helper and confirm it is observable.
> + child = subprocess.Popen([sys.executable, "-c", _CHILD])
> + try:
> + fab = L.DrmFabric()
[Severity: Medium]
Is there a race condition here on a fresh system where the drm_fabric module
is not yet loaded?
The child process executes a script that calls insmod('drm-fabric.ko').
However, immediately after spawning the child, the parent process calls
L.DrmFabric().
Since L.DrmFabric() synchronously resolves the generic netlink family,
wouldn't this fail with an NlError exception if the child process hasn't
finished loading the module yet?
> + loaded = L.wait_until(
> + lambda: L.module_loaded("drm_fabric_sim") and _has_switch_peer(fab),
> + timeout=10.0)
> + if not loaded:
> + child.send_signal(signal.SIGKILL)
> + ksft.skip("harness-reset-sigkill-recovery",
> + "helper could not establish switch shape")
--
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=6
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.