Home
last modified time | relevance | path

Searched refs:buf2 (Results 1 – 11 of 11) 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.cpp31 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()
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.cpp309 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()
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()
Dfcntl_test.cpp242 char buf2[BUFSIZ]; in TEST() local
245 ASSERT_TRUE(fgets(buf2, sizeof(buf2), fp2) != NULL); in TEST()
249 ASSERT_STREQ(expected, buf2); 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 …]
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.cpp1615 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/
Dgetaddrinfo.c1898 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/
Dres_send.c324 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()