Lines Matching refs:cbuf

55 	uint8_t cbuf[sizeof(struct vb2_struct_common) + 128];  in test_common_header_functions()  local
56 uint8_t cbufgood[sizeof(cbuf)]; in test_common_header_functions()
57 struct vb2_struct_common *c = (struct vb2_struct_common *)cbuf; in test_common_header_functions()
62 c->total_size = sizeof(cbuf); in test_common_header_functions()
65 memcpy(cbuf + c->fixed_size, test_desc, sizeof(test_desc)); in test_common_header_functions()
68 c2 = (struct vb2_struct_common *)(cbuf + desc_end); in test_common_header_functions()
77 TEST_SUCC(vb2_verify_common_header(cbuf, sizeof(cbuf)), in test_common_header_functions()
79 memcpy(cbufgood, cbuf, sizeof(cbufgood)); in test_common_header_functions()
81 memcpy(cbuf, cbufgood, sizeof(cbuf)); in test_common_header_functions()
83 TEST_EQ(vb2_verify_common_header(cbuf, sizeof(cbuf)), in test_common_header_functions()
87 memcpy(cbuf, cbufgood, sizeof(cbuf)); in test_common_header_functions()
89 TEST_EQ(vb2_verify_common_header(cbuf, sizeof(cbuf)), in test_common_header_functions()
93 memcpy(cbuf, cbufgood, sizeof(cbuf)); in test_common_header_functions()
95 TEST_EQ(vb2_verify_common_header(cbuf, sizeof(cbuf)), in test_common_header_functions()
99 memcpy(cbuf, cbufgood, sizeof(cbuf)); in test_common_header_functions()
101 TEST_EQ(vb2_verify_common_header(cbuf, sizeof(cbuf)), in test_common_header_functions()
105 memcpy(cbuf, cbufgood, sizeof(cbuf)); in test_common_header_functions()
107 TEST_EQ(vb2_verify_common_header(cbuf, sizeof(cbuf)), in test_common_header_functions()
111 memcpy(cbuf, cbufgood, sizeof(cbuf)); in test_common_header_functions()
113 TEST_EQ(vb2_verify_common_header(cbuf, sizeof(cbuf)), in test_common_header_functions()
117 memcpy(cbuf, cbufgood, sizeof(cbuf)); in test_common_header_functions()
119 TEST_EQ(vb2_verify_common_header(cbuf, sizeof(cbuf)), in test_common_header_functions()
123 memcpy(cbuf, cbufgood, sizeof(cbuf)); in test_common_header_functions()
124 cbuf[desc_end - 1] = 1; in test_common_header_functions()
125 TEST_EQ(vb2_verify_common_header(cbuf, sizeof(cbuf)), in test_common_header_functions()
130 memcpy(cbuf, cbufgood, sizeof(cbuf)); in test_common_header_functions()
132 TEST_SUCC(vb2_verify_common_member(cbuf, &m, c->total_size - 8, 4), in test_common_header_functions()
137 TEST_SUCC(vb2_verify_common_member(cbuf, &m, desc_end, 4), in test_common_header_functions()
142 TEST_EQ(vb2_verify_common_member(cbuf, &m, c->total_size - 8, -4), in test_common_header_functions()
147 TEST_EQ(vb2_verify_common_member(cbuf, &m, c->total_size - 7, 4), in test_common_header_functions()
152 TEST_EQ(vb2_verify_common_member(cbuf, &m, c->total_size - 8, 5), in test_common_header_functions()
157 TEST_EQ(vb2_verify_common_member(cbuf, &m, desc_end - 4, 4), in test_common_header_functions()
162 TEST_EQ(vb2_verify_common_member(cbuf, &m, desc_end, 4), in test_common_header_functions()
167 TEST_EQ(vb2_verify_common_member(cbuf, &m, c->total_size - 4, 8), in test_common_header_functions()
173 TEST_SUCC(vb2_verify_common_subobject(cbuf, &m, desc_end), in test_common_header_functions()
175 TEST_EQ(m, sizeof(cbuf), " new minimum"); in test_common_header_functions()
178 TEST_EQ(vb2_verify_common_subobject(cbuf, &m, desc_end), in test_common_header_functions()
184 TEST_EQ(vb2_verify_common_subobject(cbuf, &m, desc_end), in test_common_header_functions()