aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/uevent
diff options
context:
space:
mode:
authorZenghui Yu <yuzenghui@huawei.com>2024-07-29 10:46:04 +0800
committerDaniel Vetter <daniel.vetter@ffwll.ch>2024-07-29 09:02:54 +0200
commit291e4baf70019f17a81b7b47aeb186b27d222159 (patch)
tree3270dbd8a16a07b6d4ca9684a5a163f1956dfcde /tools/testing/selftests/uevent
parentb6f7d984ebf826069d3dc6fa187b4d1cfb90f965 (diff)
kselftests: dmabuf-heaps: Ensure the driver name is null-terminated
Even if a vgem device is configured in, we will skip the import_vgem_fd() test almost every time. TAP version 13 1..11 # Testing heap: system # ======================================= # Testing allocation and importing: ok 1 # SKIP Could not open vgem -1 The problem is that we use the DRM_IOCTL_VERSION ioctl to query the driver version information but leave the name field a non-null-terminated string. Terminate it properly to actually test against the vgem device. While at it, let's check the length of the driver name is exactly 4 bytes and return early otherwise (in case there is a name like "vgemfoo" that gets converted to "vgem\0" unexpectedly). Signed-off-by: Zenghui Yu <yuzenghui@huawei.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20240729024604.2046-1-yuzenghui@huawei.com
Diffstat (limited to 'tools/testing/selftests/uevent')
0 files changed, 0 insertions, 0 deletions