aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/prog_array_init.c
diff options
context:
space:
mode:
authorDavid Gow <[email protected]>2022-07-22 17:15:30 +0000
committerShuah Khan <[email protected]>2022-10-07 10:15:22 -0600
commit78b1c6584fcedcf2d9687a4455c461859094cf04 (patch)
treef55834f324f16c9854f1750ab49567d5ee685072 /tools/testing/selftests/bpf/prog_tests/prog_array_init.c
parent4e37057387cca749b7fbc8c77e3d86605117fffd (diff)
kunit: string-stream: Simplify resource use
Currently, KUnit's string streams are themselves "KUnit resources". This is redundant since the stream itself is already allocated with kunit_kzalloc() and will thus be freed automatically at the end of the test. string-stream is only used internally within KUnit, and isn't using the extra features that resources provide like reference counting, being able to locate them dynamically as "test-local variables", etc. Indeed, the resource's refcount is never incremented when the pointer is returned. The fact that it's always manually destroyed is more evidence that the reference counting is unused. Signed-off-by: David Gow <[email protected]> Signed-off-by: Daniel Latypov <[email protected]> Reviewed-by: Brendan Higgins <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/prog_array_init.c')
0 files changed, 0 insertions, 0 deletions