]> 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)
commitee99a04c57207147f918c8b407eac85647c19a7c
tree02e8fb835d869fc4c3b3354a36a52de6f85784a3
parent29cd6ee6ef8777146ca6b9b24ad4a8a3a84b5a81
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