Thanks. The helper on the original base did not NUL-terminate captured
output, but the current bpf-next helper does. The comment should describe
only why this test strips the newline, which is true for both versions.

I have made the following local correction for the next full revision.
It changes no test behavior.

diff --git a/tools/testing/selftests/bpf/prog_tests/bpftool_map_dump.c 
b/tools/testing/selftests/bpf/prog_tests/bpftool_map_dump.c
index 9c88743a8f8..db547a68d0a 100644
--- a/tools/testing/selftests/bpf/prog_tests/bpftool_map_dump.c
+++ b/tools/testing/selftests/bpf/prog_tests/bpftool_map_dump.c
@@ -16,7 +16,7 @@ static bool dump_map(__u32 id, const char *options, char 
*output)
        if (!ASSERT_OK(get_bpftool_command_output(command, output, OUTPUT_SIZE 
- 1),
                       "dump_map"))
                return false;
-       /* The helper doesn't terminate or strip the output. */
+       /* The helper leaves the trailing newline in place. */
        output[strcspn(output, "\n")] = '\0';
        return true;
 }

Reply via email to