kunit: Don't use a managed alloc in is_literal()
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Mon, 28 Aug 2023 10:41:06 +0000 (11:41 +0100)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 18 Sep 2023 16:45:30 +0000 (10:45 -0600)
commit7b4481cbe7e6bde275aa5e5f2aaa21455915e07c
tree81b666d0871de9469ac1879f2de04343e8ccf573
parent1f58cdb173a4ce1bc670fa4662af0fe3556253cf
kunit: Don't use a managed alloc in is_literal()

There is no need to use a test-managed alloc in is_literal().
The function frees the temporary buffer before returning.

This removes the only use of the test and gfp members of
struct string_stream outside of the string_stream implementation.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
lib/kunit/assert.c