/bionic/tests/ |
D | sys_random_test.cpp | 40 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() 79 char buf2[64]; in TEST() local 82 ASSERT_EQ(64, getrandom(buf2, sizeof(buf2), 0)); in TEST() 83 ASSERT_TRUE(memcmp(buf1, buf2, sizeof(buf1)) != 0); in TEST()
|
D | bug_26110743_test.cpp | 33 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()
|
D | sys_uio_test.cpp | 31 char buf2[] = "world"; in TEST() local 32 iovec ios[] = { { buf1, 5 }, { buf2, 5 } }; in TEST() 39 memset(buf2, '2', sizeof(buf2)); in TEST() 42 buf1[5] = buf2[5] = '\0'; in TEST() 44 ASSERT_STREQ("world", buf2); in TEST()
|
D | buffer_tests.cpp | 317 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()
|
D | netdb_test.cpp | 210 char buf2[512]; in TEST() local 211 result = gethostbyname_r("localhost", &hent2, buf2, sizeof(buf2), &hp2, &err); in TEST() 232 char buf2[512]; in TEST() local 233 result = gethostbyname2_r("localhost", AF_INET, &hent2, buf2, sizeof(buf2), &hp2, &err); in TEST() 261 char buf2[512]; in TEST() local 262 result = gethostbyaddr_r(&addr, sizeof(addr), AF_INET, &hent2, buf2, sizeof(buf2), &hp2, &err); in TEST()
|
D | string_test.cpp | 1300 static void DoStrcmpTest(uint8_t* buf1, uint8_t* buf2, size_t len) { in DoStrcmpTest() argument 1304 memset(buf2, (32 + (len % 96)), len - 1); in DoStrcmpTest() 1305 buf2[len-1] = '\0'; in DoStrcmpTest() 1307 reinterpret_cast<char*>(buf2))); in DoStrcmpTest() 1311 static void DoStrcmpFailTest(uint8_t* buf1, uint8_t* buf2, size_t len1, size_t len2) { in DoStrcmpFailTest() argument 1316 memset(buf2, c, len2 - 1); in DoStrcmpFailTest() 1317 buf2[len2-1] = '\0'; in DoStrcmpFailTest() 1319 reinterpret_cast<char*>(buf2))); in DoStrcmpFailTest() 1331 buf2[len-1] = '\0'; in DoStrcmpFailTest() 1336 reinterpret_cast<char*>(buf2))); in DoStrcmpFailTest() [all …]
|
D | fcntl_test.cpp | 258 char buf2[BUFSIZ]; in TEST() local 261 ASSERT_TRUE(fgets(buf2, sizeof(buf2), fp2) != nullptr); in TEST() 265 ASSERT_STREQ(expected, buf2); in TEST()
|
D | iconv_test.cpp | 324 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()
|
D | fortify_test.cpp | 929 char buf2[10] = {}; in TEST() local 932 __builtin___mempcpy_chk(buf2, input_str, input_str_size, __bos0(buf2)); in TEST() 934 ASSERT_EQ(memcmp(buf1, buf2, sizeof(buf2)), 0); in TEST() 937 void *fortify_ptr = __builtin___mempcpy_chk(buf1, input_str, input_str_size, __bos0(buf2)); in TEST()
|
D | stdio_test.cpp | 1745 char buf2[BUFSIZ]; in TEST() local 1746 ASSERT_EQ(8U, fread(buf2, 1, sizeof(buf2), fp)); in TEST() 1767 char buf2[8]; in TEST() local 1768 memset(buf2, 'x', sizeof(buf2)); in TEST() 1769 ASSERT_EQ(4U, fread(buf2, 1, sizeof(buf2), fp)); in TEST() 1770 ASSERT_EQ('l', buf2[0]); in TEST() 1771 ASSERT_EQ(0, buf2[1]); in TEST() 1772 ASSERT_EQ('o', buf2[2]); in TEST() 1773 ASSERT_EQ(0, buf2[3]); in TEST() 1774 for (size_t i = 4; i < sizeof(buf2); ++i) ASSERT_EQ('x', buf2[i]) << i; in TEST() [all …]
|
/bionic/libc/dns/net/ |
D | getaddrinfo.c | 1897 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/ |
D | res_send.c | 314 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()
|