| /examples/libc/ |
| A D | printf.c | 81 char buf[256]; in printf_test() local 88 strcpy(buf, format[i]); in printf_test() 89 strcat(buf, "d"); in printf_test() 90 intchk(buf); in printf_test() 96 strcat(buf, "f"); in printf_test() 97 fltchk(buf); in printf_test() 102 strcat(buf, "x"); in printf_test() 103 intchk(buf); in printf_test() 150 char buf[20]; in printf_test() local 155 snprintf (buf, sizeof (buf), "%30s", "foo"), (int) sizeof (buf), in printf_test() [all …]
|
| A D | file.c | 71 char buf[200]; in libc_fseek() local 174 else if (fread(buf, sizeof(outstr) - 1, 1, fp) != 1) in libc_fseek() 201 else if (fread(buf, sizeof(outstr) - 1, 1, fp) != 1) in libc_fseek() 228 else if (fread(buf, sizeof(outstr) - 1, 1, fp) != 1) in libc_fseek() 255 else if (fread(buf, sizeof(outstr) - 1, 1, fp) != 1) in libc_fseek() 282 else if (fread(buf, sizeof(outstr) - 1, 1, fp) != 1) in libc_fseek() 309 else if (fread(buf, sizeof(outstr) - 1, 1, fp) != 1) in libc_fseek() 414 &buf[sizeof(outstr) - 1], outstr, sizeof(outstr) - 1) != 0 || buf[2 in libc_fseek() 438 &buf[sizeof(outstr) - 1], outstr, sizeof(outstr) - 1) != 0 || buf[2 in libc_fseek() 444 else if (buf[2 * (sizeof(outstr) - 1) + 1] == '9') in libc_fseek() [all …]
|
| /examples/utest/testcases/posix/unistd_h/functions/ |
| A D | chdir_tc.c | 13 char *buf; in chdir_entry() local 20 for (buf = ptr = NULL; ptr == NULL; size *= 2) in chdir_entry() 22 if ((buf = realloc(buf, size)) == NULL) in chdir_entry() 26 ptr = getcwd(buf, size); in chdir_entry() 41 ptr = getcwd(buf, size); in chdir_entry() 52 free(buf); in chdir_entry()
|
| /examples/utest/testcases/posix/stdio_h/functions/ |
| A D | vsnprintf_tc.c | 5 static char buf[64] = {0}; variable 11 vsnprintf(buf, 22, format, args); in WriteFrmtd() 17 char buf[64] = {0}; in vsnprintf_entry() local 19 snprintf(buf, 22,"vsnprintf test:%s-%d-%c %.02f 0x%x","2021" ,8 ,'1' ,3.14 ,0xff); in vsnprintf_entry() 21 if(strcmp(buf, test_data)) in vsnprintf_entry()
|
| A D | vsprintf_tc.c | 5 static char buf[64] = {0}; variable 11 vsprintf(buf, format, args); in WriteFrmtd() 17 char buf[64] = {0}; in vsprintf_entry() local 19 sprintf(buf, "vsprintf test:%s-%d-%c %.02f 0x%x","2021" ,8 ,'1' ,3.14 ,0xff); in vsprintf_entry() 21 if(strcmp(buf, test_data)) in vsprintf_entry()
|
| A D | snprintf_tc.c | 6 char buf[64] = {0}; in snprintf_entry() local 8 snprintf(buf, 22,"snprintf test:%s-%d-%c %.02f 0x%x","2021" ,8 ,'1' ,3.14 ,0xff); in snprintf_entry() 10 if(strcmp(buf, test_data)) in snprintf_entry()
|
| A D | sprintf_tc.c | 6 char buf[64] = {0}; in sprintf_entry() local 8 sprintf(buf, "sprintf test:%s-%d-%c %.02f 0x%x","2021" ,8 ,'1' ,3.14 ,0xff); in sprintf_entry() 10 if(strcmp(buf, test_data)) in sprintf_entry()
|
| A D | vfprintf_tc.c | 17 char buf[64] = {0}; in vfprintf_entry() local 26 fread(buf, 1, sizeof(test_data), stream); in vfprintf_entry() 27 if(strcmp(buf, test_data)) in vfprintf_entry()
|
| /examples/utest/testcases/mm/ |
| A D | test_synchronization.h | 42 static void unmap(void *buf) in unmap() argument 46 rt_aspace_unmap(&rt_kernel_space, buf); in unmap() 57 void *buf; in group1_entry() local 64 buf = map(); in group1_entry() 66 memset(buf, 'A' + id, BUF_SIZE); in group1_entry() 70 if (memtest(buf, 'A' + id, BUF_SIZE)) in group1_entry() 75 unmap(buf); in group1_entry() 87 void *buf; in group2_entry() local 96 buf = map(); in group2_entry() 98 memset(buf, 'a' + id, BUF_SIZE); in group2_entry() [all …]
|
| A D | mm_api_tc.c | 80 static char ALIGN(BUF_SIZE) buf[BUF_SIZE]; 88 .start = (size_t)buf, 89 .end = (size_t)buf + BUF_SIZE,
|
| A D | common.h | 67 rt_inline int memtest(volatile char *buf, int value, size_t buf_sz) in memtest() argument 72 if (buf[i] != value) in memtest()
|
| /examples/test/ |
| A D | net_test.c | 27 struct netbuf *buf; in udpecho_entry() local 43 buf = netconn_recv(conn); in udpecho_entry() 45 netconn_recv(conn, &buf); in udpecho_entry() 47 if(buf == NULL) in udpecho_entry() 51 addr = netbuf_fromaddr(buf); in udpecho_entry() 52 port = netbuf_fromport(buf); in udpecho_entry() 59 buf->addr = RT_NULL; in udpecho_entry() 61 buf->addr = *IP_ADDR_ANY; in udpecho_entry() 64 netconn_send(conn, buf); in udpecho_entry() 67 netbuf_delete(buf); in udpecho_entry() [all …]
|
| A D | rbb_test.c | 35 block->buf[0] = put_count++; in put_thread() 60 if (block->buf[0] != get_count++) in get_thread() 100 memset(blk1->buf, 1, blk1->size); in rbb_test() 111 memset(blk2->buf, 2, blk2->size); in rbb_test() 122 memset(blk3->buf, 3, blk3->size); in rbb_test() 133 memset(blk4->buf, 4, blk4->size); in rbb_test() 144 memset(blk5->buf, 5, blk5->size); in rbb_test() 154 memset(blk5->buf, 5, blk5->size); in rbb_test() 194 if (_blk1->buf[i] != 1) break; in rbb_test() 198 if (_blk2->buf[j] != 2) break; in rbb_test()
|
| /examples/ymodem/ |
| A D | tofile.c | 31 rt_uint8_t *buf, in _rym_bg() argument 37 strcpy(&(cctx->fpath[1]), (const char*)buf); in _rym_bg() 47 cctx->flen = atoi((const char*)buf+strlen((const char*)buf)+1); in _rym_bg() 55 rt_uint8_t *buf, in _rym_tof() argument 62 write(cctx->fd, buf, len); in _rym_tof() 67 write(cctx->fd, buf, wlen); in _rym_tof() 75 rt_uint8_t *buf, in _rym_end() argument
|
| A D | echo.c | 16 rt_uint8_t *buf, in _rym_echo_data() argument 19 rt_device_write(_odev, 0, buf, len); in _rym_echo_data()
|
| A D | null.c | 14 rt_uint8_t *buf, in _rym_dummy_write() argument
|
| /examples/utest/testcases/kernel/ |
| A D | slab_tc.c | 50 rt_uint8_t *buf; in slab_alloc_test() local 61 buf = rt_malloc(TEST_SLAB_SIZE); in slab_alloc_test() 62 uassert_not_null(buf); in slab_alloc_test() 63 uassert_int_equal(RT_ALIGN((rt_ubase_t)buf, RT_ALIGN_SIZE), (rt_ubase_t)buf); in slab_alloc_test() 64 rt_memset(buf, 0xAA, TEST_SLAB_SIZE); in slab_alloc_test() 157 rt_free(buf); in slab_alloc_test() 182 rt_uint8_t *buf; in slab_realloc_test() local 196 buf = rt_malloc(TEST_SLAB_SIZE); in slab_realloc_test() 197 uassert_not_null(buf); in slab_realloc_test() 198 uassert_int_equal(RT_ALIGN((rt_ubase_t)buf, RT_ALIGN_SIZE), (rt_ubase_t)buf); in slab_realloc_test() [all …]
|
| A D | mem_tc.c | 85 rt_uint8_t *buf; in mem_functional_test() local 91 uassert_not_null(buf); in mem_functional_test() 92 uassert_int_equal(RT_ALIGN((rt_ubase_t)buf, RT_ALIGN_SIZE), (rt_ubase_t)buf); in mem_functional_test() 279 rt_free(buf); in mem_functional_test() 305 rt_uint8_t *buf; in mem_alloc_test() local 317 uassert_not_null(buf); in mem_alloc_test() 318 uassert_int_equal(RT_ALIGN((rt_ubase_t)buf, RT_ALIGN_SIZE), (rt_ubase_t)buf); in mem_alloc_test() 415 rt_free(buf); in mem_alloc_test() 440 rt_uint8_t *buf; in mem_realloc_test() local 456 uassert_int_equal(RT_ALIGN((rt_ubase_t)buf, RT_ALIGN_SIZE), (rt_ubase_t)buf); in mem_realloc_test() [all …]
|
| A D | object_tc.c | 34 static rt_err_t generate_unique_name(char *buf, rt_size_t size, const char *prefix) in generate_unique_name() argument 36 if (!buf || !prefix || size < TEST_RT_NAME_MAX) in generate_unique_name() 41 rt_snprintf(buf, size, "%s%d", prefix, name_counter++); in generate_unique_name() 42 rt_size_t len = rt_strlen(buf); in generate_unique_name() 45 buf[TEST_RT_NAME_MAX - 1] = '\0'; in generate_unique_name() 50 if (rt_object_find(buf, RT_Object_Class_Unknown) == RT_NULL && in generate_unique_name() 51 rt_thread_find(buf) == RT_NULL && in generate_unique_name() 52 rt_device_find(buf) == RT_NULL) in generate_unique_name()
|