Messages in this thread | | | From | Brendan Higgins <> | Date | Wed, 5 Oct 2022 16:28:57 -0400 | Subject | Re: [PATCH v2 1/5] kunit: string-stream: Simplify resource use |
| |
On Fri, Jul 22, 2022 at 1:15 PM 'Daniel Latypov' via KUnit Development <kunit-dev@googlegroups.com> wrote: > > From: David Gow <davidgow@google.com> > > 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 <davidgow@google.com> > Signed-off-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
| |