Home
last modified time | relevance | path

Searched refs:buf2 (Results 1 – 12 of 12) sorted by relevance

/bionic/tests/
Dsys_random_test.cpp40 char buf2[64]; in TEST() local
43 ASSERT_EQ(0, getentropy(buf2, sizeof(buf2))); in TEST()
44 ASSERT_TRUE(memcmp(buf1, buf2, sizeof(buf1)) != 0); in TEST()
76 char buf2[64]; in TEST() local
79 ASSERT_EQ(64, getrandom(buf2, sizeof(buf2), 0)); in TEST()
80 ASSERT_TRUE(memcmp(buf1, buf2, sizeof(buf1)) != 0); in TEST()
Dbug_26110743_test.cpp33 char buf2[1024]; in ProcSelfReadlinkBody() local
40 ssize_t length = readlink(buf, buf2, sizeof(buf2)); in ProcSelfReadlinkBody()
42 ASSERT_EQ("/dev/null", std::string(buf2, length)); in ProcSelfReadlinkBody()
76 char buf2[1024]; in ProcTaskFdReadlinkBody() local
85 ssize_t length = readlink(buf, buf2, sizeof(buf2)); in ProcTaskFdReadlinkBody()
87 ASSERT_EQ("/dev/null", std::string(buf2, length)); in ProcTaskFdReadlinkBody()
Dsys_uio_test.cpp27 char buf2[] = "world"; in TEST() local
28 iovec ios[] = { { buf1, 5 }, { buf2, 5 } }; in TEST()
35 memset(buf2, '2', sizeof(buf2)); in TEST()
38 buf1[5] = buf2[5] = '\0'; in TEST()
40 ASSERT_STREQ("world", buf2); in TEST()
Dbuffer_tests.cpp317 uint8_t* buf2 = new uint8_t[3*max_test_size]; in RunCmpBufferAlignTest() local
331 buf2, g_double_aligns[i][2], g_double_aligns[i][3])); in RunCmpBufferAlignTest()
356 delete[] buf2; in RunCmpBufferAlignTest()
432 uint8_t* buf2 = &memory2[pagesize-i]; in RunCmpBufferOverreadTest() local
434 test_cmp_func(buf1, buf2, i); in RunCmpBufferOverreadTest()
450 uint8_t* buf2 = &memory2[pagesize-j]; in RunCmpBufferOverreadTest() local
452 test_miscmp_func(buf1, buf2, i, j); in RunCmpBufferOverreadTest()
Dnetdb_test.cpp209 char buf2[512]; in TEST() local
210 result = gethostbyname_r("localhost", &hent2, buf2, sizeof(buf2), &hp2, &err); in TEST()
231 char buf2[512]; in TEST() local
232 result = gethostbyname2_r("localhost", AF_INET, &hent2, buf2, sizeof(buf2), &hp2, &err); in TEST()
260 char buf2[512]; in TEST() local
261 result = gethostbyaddr_r(&addr, sizeof(addr), AF_INET, &hent2, buf2, sizeof(buf2), &hp2, &err); in TEST()
Dstring_test.cpp1290 static void DoStrcmpTest(uint8_t* buf1, uint8_t* buf2, size_t len) { in DoStrcmpTest() argument
1294 memset(buf2, (32 + (len % 96)), len - 1); in DoStrcmpTest()
1295 buf2[len-1] = '\0'; in DoStrcmpTest()
1297 reinterpret_cast<char*>(buf2))); in DoStrcmpTest()
1301 static void DoStrcmpFailTest(uint8_t* buf1, uint8_t* buf2, size_t len1, size_t len2) { in DoStrcmpFailTest() argument
1306 memset(buf2, c, len2 - 1); in DoStrcmpFailTest()
1307 buf2[len2-1] = '\0'; in DoStrcmpFailTest()
1309 reinterpret_cast<char*>(buf2))); in DoStrcmpFailTest()
1321 buf2[len-1] = '\0'; in DoStrcmpFailTest()
1326 reinterpret_cast<char*>(buf2))); in DoStrcmpFailTest()
[all …]
Dfcntl_test.cpp253 char buf2[BUFSIZ]; in TEST() local
256 ASSERT_TRUE(fgets(buf2, sizeof(buf2), fp2) != nullptr); in TEST()
260 ASSERT_STREQ(expected, buf2); in TEST()
Diconv_test.cpp324 char buf2[BUFSIZ] = {}; in RoundTrip() local
325 out = buf2; in RoundTrip()
326 out_bytes = sizeof(buf2); in RoundTrip()
329 ASSERT_STREQ(utf8, buf2) << dst_enc; in RoundTrip()
Dstdio_test.cpp1685 char buf2[BUFSIZ]; in TEST() local
1686 ASSERT_EQ(8U, fread(buf2, 1, sizeof(buf2), fp)); in TEST()
1707 char buf2[8]; in TEST() local
1708 memset(buf2, 'x', sizeof(buf2)); in TEST()
1709 ASSERT_EQ(4U, fread(buf2, 1, sizeof(buf2), fp)); in TEST()
1710 ASSERT_EQ('l', buf2[0]); in TEST()
1711 ASSERT_EQ(0, buf2[1]); in TEST()
1712 ASSERT_EQ('o', buf2[2]); in TEST()
1713 ASSERT_EQ(0, buf2[3]); in TEST()
1714 for (size_t i = 4; i < sizeof(buf2); ++i) ASSERT_EQ('x', buf2[i]) << i; in TEST()
[all …]
Dfortify_test.cpp934 char buf2[10] = {}; in TEST() local
937 __builtin___mempcpy_chk(buf2, input_str, input_str_size, __bos0(buf2)); in TEST()
939 ASSERT_EQ(memcmp(buf1, buf2, sizeof(buf2)), 0); in TEST()
942 void *fortify_ptr = __builtin___mempcpy_chk(buf1, input_str, input_str_size, __bos0(buf2)); in TEST()
/bionic/libc/dns/net/
Dgetaddrinfo.c1897 querybuf *buf, *buf2; in _dns_getaddrinfo() local
1920 buf2 = malloc(sizeof(*buf2)); in _dns_getaddrinfo()
1921 if (buf2 == NULL) { in _dns_getaddrinfo()
1946 q2.answer = buf2->buf; in _dns_getaddrinfo()
1947 q2.anslen = sizeof(buf2->buf); in _dns_getaddrinfo()
1953 free(buf2); in _dns_getaddrinfo()
1973 free(buf2); in _dns_getaddrinfo()
1980 free(buf2); in _dns_getaddrinfo()
1993 free(buf2); in _dns_getaddrinfo()
2003 ai = getanswer(buf2, q2.n, q2.name, q2.qtype, pai); in _dns_getaddrinfo()
[all …]
/bionic/libc/dns/resolv/
Dres_send.c314 const u_char *buf2, const u_char *eom2) in res_queriesmatch() argument
319 if (buf1 + HFIXEDSZ > eom1 || buf2 + HFIXEDSZ > eom2) in res_queriesmatch()
327 (((const HEADER *)(const void *)buf2)->opcode == ns_o_update)) in res_queriesmatch()
330 if (qdcount != ntohs(((const HEADER*)(const void *)buf2)->qdcount)) in res_queriesmatch()
344 if (!res_nameinquery(tname, ttype, tclass, buf2, eom2)) in res_queriesmatch()