Home
last modified time | relevance | path

Searched refs:stream (Results 1 – 9 of 9) sorted by relevance

/lib/kunit/
Dassert.c14 struct string_stream *stream) in kunit_base_assert_format() argument
27 string_stream_add(stream, "%s FAILED at %s:%d\n", in kunit_base_assert_format()
33 struct string_stream *stream) in kunit_assert_print_msg() argument
36 string_stream_add(stream, "\n%pV", &assert->message); in kunit_assert_print_msg()
41 struct string_stream *stream) in kunit_fail_assert_format() argument
43 kunit_base_assert_format(assert, stream); in kunit_fail_assert_format()
44 string_stream_add(stream, "%pV", &assert->message); in kunit_fail_assert_format()
49 struct string_stream *stream) in kunit_unary_assert_format() argument
54 kunit_base_assert_format(assert, stream); in kunit_unary_assert_format()
56 string_stream_add(stream, in kunit_unary_assert_format()
[all …]
Dstring-stream.c73 int string_stream_vadd(struct string_stream *stream, in string_stream_vadd() argument
89 frag_container = alloc_string_stream_fragment(stream->test, in string_stream_vadd()
91 stream->gfp); in string_stream_vadd()
96 spin_lock(&stream->lock); in string_stream_vadd()
97 stream->length += len; in string_stream_vadd()
98 list_add_tail(&frag_container->node, &stream->fragments); in string_stream_vadd()
99 spin_unlock(&stream->lock); in string_stream_vadd()
104 int string_stream_add(struct string_stream *stream, const char *fmt, ...) in string_stream_add() argument
110 result = string_stream_vadd(stream, fmt, args); in string_stream_add()
116 static void string_stream_clear(struct string_stream *stream) in string_stream_clear() argument
[all …]
Dstring-stream-test.c16 struct string_stream *stream = alloc_string_stream(test, GFP_KERNEL); in string_stream_test_empty_on_creation() local
18 KUNIT_EXPECT_TRUE(test, string_stream_is_empty(stream)); in string_stream_test_empty_on_creation()
23 struct string_stream *stream = alloc_string_stream(test, GFP_KERNEL); in string_stream_test_not_empty_after_add() local
25 string_stream_add(stream, "Foo"); in string_stream_test_not_empty_after_add()
27 KUNIT_EXPECT_FALSE(test, string_stream_is_empty(stream)); in string_stream_test_not_empty_after_add()
32 struct string_stream *stream = alloc_string_stream(test, GFP_KERNEL); in string_stream_test_get_string() local
35 string_stream_add(stream, "Foo"); in string_stream_test_get_string()
36 string_stream_add(stream, " %s", "bar"); in string_stream_test_get_string()
38 output = string_stream_get_string(stream); in string_stream_test_get_string()
Dstring-stream.h35 int __printf(2, 3) string_stream_add(struct string_stream *stream,
38 int string_stream_vadd(struct string_stream *stream,
42 char *string_stream_get_string(struct string_stream *stream);
44 int string_stream_append(struct string_stream *stream,
47 bool string_stream_is_empty(struct string_stream *stream);
49 int string_stream_destroy(struct string_stream *stream);
Dtest.c131 struct string_stream *stream) in kunit_print_string_stream() argument
136 if (string_stream_is_empty(stream)) in kunit_print_string_stream()
139 buf = string_stream_get_string(stream); in kunit_print_string_stream()
143 list_for_each_entry(fragment, &stream->fragments, node) { in kunit_print_string_stream()
155 struct string_stream *stream; in kunit_fail() local
159 stream = alloc_string_stream(test, GFP_KERNEL); in kunit_fail()
160 if (!stream) { in kunit_fail()
168 assert->format(assert, stream); in kunit_fail()
170 kunit_print_string_stream(test, stream); in kunit_fail()
172 WARN_ON(string_stream_destroy(stream)); in kunit_fail()
DMakefile4 string-stream.o \
17 obj-$(CONFIG_KUNIT_TEST) += string-stream-test.o
/lib/crypto/
Dlibchacha.c19 u8 stream[CHACHA_BLOCK_SIZE] __aligned(sizeof(long)); in chacha_crypt_generic() local
22 chacha_block_generic(state, stream, nrounds); in chacha_crypt_generic()
23 crypto_xor_cpy(dst, src, stream, CHACHA_BLOCK_SIZE); in chacha_crypt_generic()
29 chacha_block_generic(state, stream, nrounds); in chacha_crypt_generic()
30 crypto_xor_cpy(dst, src, stream, bytes); in chacha_crypt_generic()
Dchacha.c76 void chacha_block_generic(u32 *state, u8 *stream, int nrounds) in chacha_block_generic() argument
86 put_unaligned_le32(x[i] + state[i], &stream[i * sizeof(u32)]); in chacha_block_generic()
103 void hchacha_block_generic(const u32 *state, u32 *stream, int nrounds) in hchacha_block_generic() argument
111 memcpy(&stream[0], &x[0], 16); in hchacha_block_generic()
112 memcpy(&stream[4], &x[12], 16); in hchacha_block_generic()
/lib/zstd/
Dhuf_compress.c530 #define HUF_FLUSHBITS_1(stream) \ argument
531 if (sizeof((stream)->bitContainer) * 8 < HUF_TABLELOG_MAX * 2 + 7) \
532 HUF_FLUSHBITS(stream)
534 #define HUF_FLUSHBITS_2(stream) \ argument
535 if (sizeof((stream)->bitContainer) * 8 < HUF_TABLELOG_MAX * 4 + 7) \
536 HUF_FLUSHBITS(stream)