Thread (2 messages) 2 messages, 2 authors, 2021-12-03

Re: [PATCH bpf] bpf: Fix the test_task_vma selftest to support output shorter than 1 kB

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-12-03 23:00:12
Also in: linux-kselftest, netdev

Hello:

This patch was applied to bpf/bpf-next.git (master)
by Daniel Borkmann [off-list ref]:

On Tue, 30 Nov 2021 20:18:11 +0200 you wrote:
The test for bpf_iter_task_vma assumes that the output will be longer
than 1 kB, as the comment above the loop says. Due to this assumption,
the loop becomes infinite if the output turns to be shorter than 1 kB.
The return value of read_fd_into_buffer is 0 when the end of file was
reached, and len isn't being increased any more.

This commit adds a break on EOF to handle short output correctly. For
the reference, this is the contents that I get when running test_progs
under vmtest.sh, and it's shorter than 1 kB:

[...]
Here is the summary with links:
  - [bpf] bpf: Fix the test_task_vma selftest to support output shorter than 1 kB
    https://git.kernel.org/bpf/bpf-next/c/da54ab14953c

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help