Lines Matching refs:buf

20 void *consumebytes(size_t length, char **buf, size_t *buflength);
21 char *consumestr(char **buf, size_t *buflength);
31 char buf[1024]; in TEST() local
32 size_t len = sizeof(buf); in TEST()
33 char *pos = &buf[0]; in TEST()
35 EXPECT_EQ(&buf[0], pos); in TEST()
36 EXPECT_EQ(sizeof(buf), len); in TEST()
40 char buf[1024]; in TEST() local
41 size_t len = sizeof(buf); in TEST()
42 char *pos = &buf[0]; in TEST()
44 char *end = &buf[sizeof(buf)]; in TEST()
51 char buf[1024]; in TEST() local
52 size_t len = sizeof(buf); in TEST()
53 char *pos = &buf[0]; in TEST()
55 char *end = &buf[sizeof(buf) / 2]; in TEST()
57 EXPECT_EQ(sizeof(buf) / 2, len); in TEST()
62 char buf[1024]; in TEST() local
63 size_t len = sizeof(buf); in TEST()
64 char *pos = &buf[0]; in TEST()
67 EXPECT_EQ(sizeof(buf), len); in TEST()
68 EXPECT_EQ(&buf[0], pos); in TEST()
72 char buf[1024]; in TEST() local
74 char *pos = &buf[0]; in TEST()
75 memset(buf, 0xff, sizeof(buf)); in TEST()
78 EXPECT_EQ(&buf[0], pos); in TEST()
82 char buf[1024]; in TEST() local
83 size_t len = sizeof(buf); in TEST()
84 char *pos = &buf[0]; in TEST()
85 memset(buf, 0xff, sizeof(buf)); in TEST()
87 EXPECT_EQ(sizeof(buf), len); in TEST()
88 EXPECT_EQ(&buf[0], pos); in TEST()
92 char buf[1024]; in TEST() local
93 size_t len = sizeof(buf); in TEST()
94 char *pos = &buf[0]; in TEST()
95 memset(buf, 0xff, sizeof(buf)); in TEST()
96 buf[sizeof(buf)-1] = '\0'; in TEST()
97 EXPECT_EQ((void *)buf, consumestr(&pos, &len)); in TEST()
99 EXPECT_EQ(&buf[sizeof(buf)], pos); in TEST()
103 char buf[1024]; in TEST() local
104 size_t len = sizeof(buf) - 1; in TEST()
105 char *pos = &buf[0]; in TEST()
106 memset(buf, 0xff, sizeof(buf)); in TEST()
107 buf[sizeof(buf)-1] = '\0'; in TEST()
109 EXPECT_EQ(sizeof(buf) - 1, len); in TEST()
110 EXPECT_EQ(&buf[0], pos); in TEST()
114 char buf[4096]; in FIXTURE() local
125 ASSERT_GT(sizeof(self->buf), self->size) { in FIXTURE_SETUP()
136 ASSERT_EQ(0, minijail_marshal(self->m, self->buf, sizeof(self->buf))); in TEST_F()
137 EXPECT_EQ(0, minijail_unmarshal(self->j, self->buf, self->size)); in TEST_F()
141 memset(self->buf, 0xff, sizeof(self->buf));
143 EXPECT_EQ(-EINVAL, minijail_unmarshal(self->j, self->buf, sizeof(self->buf)));
152 char buf[buf_len]; in TEST() local
176 read_ret = read(child_stdout, buf, 8); in TEST()
178 buf[teststr_len] = 0; in TEST()
179 EXPECT_EQ(strcmp(buf, teststr), 0); in TEST()
199 read_ret = read(child_stderr, buf, buf_len); in TEST()