/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() 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()
|
D | bug_26110743_test.cpp | 31 char buf2[1024]; in ProcSelfReadlinkBody() local 38 ASSERT_NE(-1, readlink(buf, buf2, sizeof(buf2))) << ERRORMSG; in ProcSelfReadlinkBody() 39 ASSERT_STREQ("/dev/null", buf2); in ProcSelfReadlinkBody() 73 char buf2[1024]; in ProcTaskFdReadlinkBody() local 82 ASSERT_NE(-1, readlink(buf, buf2, sizeof(buf2))) << ERRORMSG; in ProcTaskFdReadlinkBody() 83 ASSERT_STREQ("/dev/null", buf2); in ProcTaskFdReadlinkBody()
|
D | sys_uio_test.cpp | 27 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()
|
D | buffer_tests.cpp | 309 uint8_t* buf2 = new uint8_t[3*max_test_size]; in RunCmpBufferAlignTest() local 323 buf2, g_double_aligns[i][2], g_double_aligns[i][3])); in RunCmpBufferAlignTest() 348 delete[] buf2; in RunCmpBufferAlignTest() 424 uint8_t* buf2 = &memory2[pagesize-i]; in RunCmpBufferOverreadTest() local 426 test_cmp_func(buf1, buf2, i); in RunCmpBufferOverreadTest() 442 uint8_t* buf2 = &memory2[pagesize-j]; in RunCmpBufferOverreadTest() local 444 test_miscmp_func(buf1, buf2, i, j); in RunCmpBufferOverreadTest()
|
D | netdb_test.cpp | 209 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()
|
D | fcntl_test.cpp | 242 char buf2[BUFSIZ]; in TEST() local 245 ASSERT_TRUE(fgets(buf2, sizeof(buf2), fp2) != NULL); in TEST() 249 ASSERT_STREQ(expected, buf2); in TEST()
|
D | string_test.cpp | 1290 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 …]
|
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 | stdio_test.cpp | 1615 char buf2[BUFSIZ]; in TEST() local 1616 ASSERT_EQ(8U, fread(buf2, 1, sizeof(buf2), fp)); in TEST() 1637 char buf2[8]; in TEST() local 1638 memset(buf2, 'x', sizeof(buf2)); in TEST() 1639 ASSERT_EQ(4U, fread(buf2, 1, sizeof(buf2), fp)); in TEST() 1640 ASSERT_EQ('l', buf2[0]); in TEST() 1641 ASSERT_EQ(0, buf2[1]); in TEST() 1642 ASSERT_EQ('o', buf2[2]); in TEST() 1643 ASSERT_EQ(0, buf2[3]); in TEST() 1644 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 | 1898 querybuf *buf, *buf2; in _dns_getaddrinfo() local 1921 buf2 = malloc(sizeof(*buf2)); in _dns_getaddrinfo() 1922 if (buf2 == NULL) { in _dns_getaddrinfo() 1947 q2.answer = buf2->buf; in _dns_getaddrinfo() 1948 q2.anslen = sizeof(buf2->buf); in _dns_getaddrinfo() 1954 free(buf2); in _dns_getaddrinfo() 1974 free(buf2); in _dns_getaddrinfo() 1981 free(buf2); in _dns_getaddrinfo() 1994 free(buf2); in _dns_getaddrinfo() 2004 ai = getanswer(buf2, q2.n, q2.name, q2.qtype, pai); in _dns_getaddrinfo() [all …]
|
/bionic/libc/dns/resolv/ |
D | res_send.c | 324 const u_char *buf2, const u_char *eom2) in res_queriesmatch() argument 329 if (buf1 + HFIXEDSZ > eom1 || buf2 + HFIXEDSZ > eom2) in res_queriesmatch() 337 (((const HEADER *)(const void *)buf2)->opcode == ns_o_update)) in res_queriesmatch() 340 if (qdcount != ntohs(((const HEADER*)(const void *)buf2)->qdcount)) in res_queriesmatch() 354 if (!res_nameinquery(tname, ttype, tclass, buf2, eom2)) in res_queriesmatch()
|