On 8/26/20 10:29 AM, Jesper Dangaard Brouer wrote:
On Wed, 26 Aug 2020 10:17:36 +0200
Jesper Dangaard Brouer <brouer@xxxxxxxxxx> wrote:
When stdout output from the selftests tool 'test_maps' gets redirected
into e.g file or pipe, then the output lines increase a lot (from 21
to 33949 lines). This is caused by the printf that happens before the
fork() call, and there are user-space buffered printf data that seems
to be duplicated into the forked process.
To fix this fflush() stdout before the fork loop in __run_parallel().
Signed-off-by: Jesper Dangaard Brouer <brouer@xxxxxxxxxx>
Fixes: 1a97cf1fe503 ("selftests/bpf: speedup test_maps")
I forgot to add the fixes line to the patch, I hope patchwork[1] will
pick it up for maintainers.
It won't but I've just added it manually. Applied, thanks!
[1] http://patchwork.ozlabs.org/project/netdev/patch/159842985651.1050885.2154399297503372406.stgit@firesoul/