Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

kunit: move string-stream.h to lib/kunit

string-stream interfaces are not intended for external use;
move them from include/kunit to lib/kunit accordingly.

Co-developed-by: Knut Omang <knut.omang@oracle.com>
Signed-off-by: Knut Omang <knut.omang@oracle.com>
Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Tested-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>

authored by

Alan Maguire and committed by
Shuah Khan
109fb06f 4d944bcd

+10 -3
+2 -1
include/kunit/assert.h
··· 9 9 #ifndef _KUNIT_ASSERT_H 10 10 #define _KUNIT_ASSERT_H 11 11 12 - #include <kunit/string-stream.h> 13 12 #include <linux/err.h> 13 + #include <linux/kernel.h> 14 14 15 15 struct kunit; 16 + struct string_stream; 16 17 17 18 /** 18 19 * enum kunit_assert_type - Type of expectation/assertion.
include/kunit/string-stream.h lib/kunit/string-stream.h
+2
lib/kunit/assert.c
··· 7 7 */ 8 8 #include <kunit/assert.h> 9 9 10 + #include "string-stream.h" 11 + 10 12 void kunit_base_assert_format(const struct kunit_assert *assert, 11 13 struct string_stream *stream) 12 14 {
+2 -1
lib/kunit/string-stream-test.c
··· 6 6 * Author: Brendan Higgins <brendanhiggins@google.com> 7 7 */ 8 8 9 - #include <kunit/string-stream.h> 10 9 #include <kunit/test.h> 11 10 #include <linux/slab.h> 11 + 12 + #include "string-stream.h" 12 13 13 14 static void string_stream_test_empty_on_creation(struct kunit *test) 14 15 {
+2 -1
lib/kunit/string-stream.c
··· 6 6 * Author: Brendan Higgins <brendanhiggins@google.com> 7 7 */ 8 8 9 - #include <kunit/string-stream.h> 10 9 #include <kunit/test.h> 11 10 #include <linux/list.h> 12 11 #include <linux/slab.h> 12 + 13 + #include "string-stream.h" 13 14 14 15 struct string_stream_fragment_alloc_context { 15 16 struct kunit *test;
+2
lib/kunit/test.c
··· 11 11 #include <linux/kernel.h> 12 12 #include <linux/sched/debug.h> 13 13 14 + #include "string-stream.h" 15 + 14 16 static void kunit_set_failure(struct kunit *test) 15 17 { 16 18 WRITE_ONCE(test->success, false);