Home
last modified time | relevance | path

Searched refs:buf1 (Results 1 – 8 of 8) sorted by relevance

/bionic/tests/
Dsys_random_test.cpp39 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()
Dsys_uio_test.cpp26 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()
Dbuffer_tests.cpp316 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()
Dstring_test.cpp1290 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 …]
Dfcntl_test.cpp247 char buf1[BUFSIZ]; in TEST() local
250 ASSERT_TRUE(fgets(buf1, sizeof(buf1), fp1) != nullptr); in TEST()
259 ASSERT_STREQ(expected, buf1); in TEST()
Dfortify_test.cpp933 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()
Dstdio_test.cpp2002 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/
Dres_send.c313 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()