linux-stable/lib/kunit
Richard Fitzgerald 20631e154c kunit: string-stream: Add kunit_alloc_string_stream()
Add function kunit_alloc_string_stream() to do a resource-managed
allocation of a string stream, and corresponding
kunit_free_string_stream() to free the resource-managed stream.

This is preparing for decoupling the string_stream
implementation from struct kunit, to reduce the amount of code
churn when that happens. Currently:
 - kunit_alloc_string_stream() only calls alloc_string_stream().
 - kunit_free_string_stream() takes a struct kunit* which
   isn't used yet.

Callers of the old alloc_string_stream() and
string_stream_destroy() are all requesting a managed allocation
so have been changed to use the new functions.

alloc_string_stream() has been temporarily made static because
its current behavior has been replaced with
kunit_alloc_string_stream().

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2023-09-18 10:45:35 -06:00
..
.kunitconfig kunit: tool: make --kunitconfig accept dirs, add lib/kunit fragment 2021-04-02 14:14:36 -06:00
Kconfig kunit: Allow kunit test modules to use test filtering 2023-08-08 13:46:18 -06:00
Makefile kunit: Add test attributes API structure 2023-07-26 13:28:57 -06:00
assert.c kunit: Don't use a managed alloc in is_literal() 2023-09-18 10:45:30 -06:00
attributes.c kunit: fix struct kunit_attr header 2023-08-21 08:07:56 -06:00
debugfs.c kunit: include debugfs header file 2023-06-09 17:44:16 -07:00
debugfs.h kunit: add debugfs /sys/kernel/debug/kunit/<suite>/results display 2020-03-26 14:07:18 -06:00
executor.c kunit: Fix possible memory leak in kunit_filter_suites() 2023-09-05 12:30:06 -06:00
executor_test.c kunit: test: Make filter strings in executor_test writable 2023-09-01 09:09:25 -06:00
hooks-impl.h kunit: Add printf attribute to fail_current_test_impl 2023-02-08 18:08:14 -07:00
hooks.c kunit: Add "hooks" to call into KUnit when it's built as a module 2023-02-08 14:26:25 -07:00
kunit-example-test.c kunit: Add speed attribute 2023-07-26 13:29:04 -06:00
kunit-test.c kunit: Add kunit_add_action() to defer a call until test exit 2023-05-25 08:52:55 -06:00
resource.c kunit: Add kunit_add_action() to defer a call until test exit 2023-05-25 08:52:55 -06:00
static_stub.c kunit: Expose 'static stub' API to redirect functions 2023-02-08 14:28:17 -07:00
string-stream-test.c kunit: string-stream: Add kunit_alloc_string_stream() 2023-09-18 10:45:35 -06:00
string-stream.c kunit: string-stream: Add kunit_alloc_string_stream() 2023-09-18 10:45:35 -06:00
string-stream.h kunit: string-stream: Add kunit_alloc_string_stream() 2023-09-18 10:45:35 -06:00
test.c kunit: string-stream: Add kunit_alloc_string_stream() 2023-09-18 10:45:35 -06:00
try-catch-impl.h kunit: hide unexported try-catch interface in try-catch-impl.h 2020-01-09 16:42:09 -07:00
try-catch.c kunit: make kunit_test_timeout compatible with comment 2022-03-22 15:57:11 -07:00