]> git.baikalelectronics.ru Git - kernel.git/commit
bpf/tests: Reduce memory footprint of test suite
authorJohan Almbladh <johan.almbladh@anyfinetworks.com>
Tue, 14 Sep 2021 09:18:30 +0000 (11:18 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 28 Sep 2021 07:26:28 +0000 (09:26 +0200)
commit7b08d5d33b293fdf7ec1dbd956a434c9d4e7d497
tree02e8fb835d869fc4c3b3354a36a52de6f85784a3
parentc51ea0bc914bbb3a90d1ec396ba80970081ce2e3
bpf/tests: Reduce memory footprint of test suite

The test suite used to call any fill_helper callbacks to generate eBPF
program data for all test cases at once. This caused ballooning memory
requirements as more extensive test cases were added. Now the each
fill_helper is called before the test is run and the allocated memory
released afterwards, before the next test case is processed.

Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20210914091842.4186267-3-johan.almbladh@anyfinetworks.com
lib/test_bpf.c