/bionic/tests/ |
D | sys_random_test.cpp | 39 char buf1[64]; in TEST() local 42 ASSERT_EQ(0, getentropy(buf1, sizeof(buf1))); in TEST() 44 ASSERT_TRUE(memcmp(buf1, buf2, sizeof(buf1)) != 0); in TEST() 75 char buf1[64]; in TEST() local 78 ASSERT_EQ(64, getrandom(buf1, sizeof(buf1), 0)); in TEST() 80 ASSERT_TRUE(memcmp(buf1, buf2, sizeof(buf1)) != 0); in TEST()
|
D | sys_uio_test.cpp | 26 char buf1[] = "hello"; in TEST() local 28 iovec ios[] = { { buf1, 5 }, { buf2, 5 } }; in TEST() 34 memset(buf1, '1', sizeof(buf1)); in TEST() 38 buf1[5] = buf2[5] = '\0'; in TEST() 39 ASSERT_STREQ("hello", buf1); in TEST()
|
D | buffer_tests.cpp | 316 uint8_t* buf1 = new uint8_t[3*max_test_size]; in RunCmpBufferAlignTest() local 328 buf1, g_double_aligns[i][0], g_double_aligns[i][1])); in RunCmpBufferAlignTest() 355 delete[] buf1; in RunCmpBufferAlignTest() 431 uint8_t* buf1 = &memory1[pagesize-i]; in RunCmpBufferOverreadTest() local 434 test_cmp_func(buf1, buf2, i); in RunCmpBufferOverreadTest() 445 uint8_t* buf1 = &memory1[pagesize-i]; in RunCmpBufferOverreadTest() local 452 test_miscmp_func(buf1, buf2, i, j); in RunCmpBufferOverreadTest()
|
D | string_test.cpp | 1290 static void DoStrcmpTest(uint8_t* buf1, uint8_t* buf2, size_t len) { in DoStrcmpTest() argument 1292 memset(buf1, (32 + (len % 96)), len - 1); in DoStrcmpTest() 1293 buf1[len-1] = '\0'; in DoStrcmpTest() 1296 ASSERT_EQ(0, strcmp(reinterpret_cast<char*>(buf1), in DoStrcmpTest() 1301 static void DoStrcmpFailTest(uint8_t* buf1, uint8_t* buf2, size_t len1, size_t len2) { in DoStrcmpFailTest() argument 1304 memset(buf1, c, len1 - 1); in DoStrcmpFailTest() 1305 buf1[len1-1] = '\0'; in DoStrcmpFailTest() 1308 ASSERT_NE(0, strcmp(reinterpret_cast<char*>(buf1), in DoStrcmpFailTest() 1320 buf1[len-1] = '\0'; in DoStrcmpFailTest() 1324 buf1[len-2] = diff_c; in DoStrcmpFailTest() [all …]
|
D | fcntl_test.cpp | 247 char buf1[BUFSIZ]; in TEST() local 250 ASSERT_TRUE(fgets(buf1, sizeof(buf1), fp1) != nullptr); in TEST() 259 ASSERT_STREQ(expected, buf1); in TEST()
|
D | fortify_test.cpp | 933 char buf1[10] = {}; in TEST() local 936 __builtin_mempcpy(buf1, input_str, input_str_size); in TEST() 939 ASSERT_EQ(memcmp(buf1, buf2, sizeof(buf2)), 0); in TEST() 941 void *builtin_ptr = __builtin_mempcpy(buf1, input_str, input_str_size); in TEST() 942 void *fortify_ptr = __builtin___mempcpy_chk(buf1, input_str, input_str_size, __bos0(buf2)); in TEST()
|
D | stdio_test.cpp | 2002 char buf1[4 * 4]; in TEST() local 2003 memset(buf1, 0, sizeof(buf1)); in TEST() 2004 ASSERT_EQ(2U, fread(buf1, 4, 4, fp)); in TEST() 2005 ASSERT_STREQ("0123456789", buf1); in TEST()
|
/bionic/libc/dns/resolv/ |
D | res_send.c | 313 res_queriesmatch(const u_char *buf1, const u_char *eom1, in res_queriesmatch() argument 316 const u_char *cp = buf1 + HFIXEDSZ; in res_queriesmatch() 317 int qdcount = ntohs(((const HEADER*)(const void *)buf1)->qdcount); in res_queriesmatch() 319 if (buf1 + HFIXEDSZ > eom1 || buf2 + HFIXEDSZ > eom2) in res_queriesmatch() 326 if ((((const HEADER *)(const void *)buf1)->opcode == ns_o_update) && in res_queriesmatch() 336 n = dn_expand(buf1, eom1, cp, tname, sizeof tname); in res_queriesmatch()
|