(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

selftests/bpf: Accept unnamed dma-bufs in the dmabuf_iter default test

The dmabuf_collector iterator prints the inode, size, name and exporter of every dma-buf in the system on separate lines, with an empty name for the buffers that have none. The default_iter subtest parses that output and looks for the two buffers it created. It requires a name for every buffer, and sscanf() finds none on the empty line of an unnamed one. On a system that has such a buffer, like one exported by udmabuf without a name, the subtest fails before it gets to its own buffers. Take an empty name for a buffer without one. Fixes: ae5d2c59ecd7 ("selftests/bpf: Add test for dmabuf_iter") Signed-off-by: Qiliang Yuan <odys.yuan@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Reviewed-by: T.J. Mercier <tjmercier@google.com> Link: https://lore.kernel.org/bpf/20261009-selftests-bpf-dmabuf-iter-unnamed-v1-1-962ee94f7a5e@gmail.com


Author Qiliang Yuan Committer Daniel Borkmann Date Commit Parent d3c9ecb8
+3 -2
1 changed file
+3 -2
1 changed file