Drm: mount debugfs before reading dri node in verify_dri_node - #4624
Drm: mount debugfs before reading dri node in verify_dri_node#4624pdostal wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes verify_dri_node failures on images where debugfs isn’t auto-mounted by ensuring debugfs is mounted before reading /sys/kernel/debug/dri/*/name.
Changes:
- Add
_ensure_debugfs_mounted()helper to mountdebugfswhen needed. - Call
_ensure_debugfs_mounted()at the start ofverify_dri_nodeto avoid missing-path failures.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (1)
lisa/microsoft/testsuites/display/drm.py:139
Mount.get_partition_info()only parses mount entries that look like/dev/<name> on <mountpoint> ...(see lisa/tools/mount.py), so it won’t report pseudo-filesystem mounts likedebugfs on /sys/kernel/debug type debugfs .... As a result,_is_debugfs_mounted()will always return False, causing an unnecessary (and retrying) mount attempt and potentially skipping the test even when debugfs is already mounted.
def _is_debugfs_mounted() -> bool:
return any(
partition.type == FileSystem.debugfs.name
for partition in mount_tool.get_partition_info(
mountpoint=debugfs_point
|
@pdostal thanks for fixing this, please take care of the CI check error. |
verify_dri_node reads /sys/kernel/debug/dri/*/name directly, but debugfs isn't guaranteed to be mounted on all images. A sibling test on the same node (verify_connection_status) passes fine via modetest, confirming hyperv_drm itself is loaded and working -- the failure is purely a missing debugfs mount, not an absent/broken driver. Add _ensure_debugfs_mounted, mirroring the existing pattern in microsoft/testsuites/hyperv/dynamic_memory.py. It verifies the mounted fs type via get_partition_info() rather than just checking something is mounted at the path, and catches mount() failures into a SkippedException instead of letting an uncaught AssertionError fail the test.
f341c16 to
8b50e04
Compare
|
@pdostal please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (1)
lisa/microsoft/testsuites/display/drm.py:137
- Major:
_is_debugfs_mounted()relies onMount.get_partition_info(mountpoint=...), butget_partition_info()only parsesmountlines that start with/dev/...(seelisa/tools/mount.pyregex), so it won’t detectdebugfs on /sys/kernel/debug type debugfs .... This makes_is_debugfs_mounted()always return False, causing an unnecessary mount attempt and potentially skipping the test even when debugfs is already mounted. Consider parsingmountoutput for the mountpoint/type instead.
def _is_debugfs_mounted() -> bool:
return any(
partition.type == FileSystem.debugfs.name
for partition in mount_tool.get_partition_info(mountpoint=debugfs_point)
)
Description
verify_dri_nodereads/sys/kernel/debug/dri/*/namedirectly with no check that debugfs is mounted. On images where it isn't auto-mounted, this fails withAssertionError: cat: '/sys/kernel/debug/dri/*/name': No such file or directoryeven thoughhyperv_drmis loaded and working correctly (verify_connection_status, which checks the same driver viamodetestinstead of debugfs, passes on the same node).Adds
_ensure_debugfs_mounted, mirroring the existing pattern already used inmicrosoft/testsuites/hyperv/dynamic_memory.py, and calls it before the debugfs read inverify_dri_node.Type of Change
Checklist
Test Results