Home
last modified time | relevance | path

Searched refs:read_buf (Results 1 – 25 of 41) sorted by relevance

12

/third_party/ltp/testcases/kernel/syscalls/dup2/
Ddup207.c51 char read_buf[20]; in run() local
53 memset(read_buf, 0, sizeof(read_buf)); in run()
67 SAFE_READ(1, nfd, read_buf, tc->exp_size); in run()
68 if (strncmp(read_buf, tc->exp_data, tc->exp_size)) in run()
69 tst_res(TFAIL, "Expect %s, but get %s.", tc->exp_data, read_buf); in run()
71 tst_res(TPASS, "Get expected buf %s", read_buf); in run()
/third_party/ltp/testcases/kernel/syscalls/pread/
Dpread01.c30 static char *read_buf[NBUFS]; variable
49 if (memcmp(write_buf[count], read_buf[count], K1) != 0) { in compare_bufers()
61 SAFE_PREAD(1, fildes, read_buf[2], K1, K2); in verify_pread()
65 SAFE_PREAD(1, fildes, read_buf[3], K1, K3); in verify_pread()
68 SAFE_READ(1, fildes, read_buf[0], K1); in verify_pread()
71 SAFE_PREAD(1, fildes, read_buf[1], K1, K1); in verify_pread()
85 read_buf[count] = SAFE_MALLOC(K1); in setup()
104 free(read_buf[count]); in cleanup()
/third_party/ltp/testcases/kernel/syscalls/lseek/
Dlseek01.c39 char read_buf[64]; in verify_lseek() local
43 SAFE_READ(0, fd, read_buf, sizeof(read_buf)); in verify_lseek()
45 memset(read_buf, 0, sizeof(read_buf)); in verify_lseek()
60 SAFE_READ(1, fd, read_buf, tc->exp_size); in verify_lseek()
62 if (tc->exp_data && strcmp(read_buf, tc->exp_data)) { in verify_lseek()
Dlseek07.c39 char read_buf[64]; in verify_lseek() local
42 memset(read_buf, 0, sizeof(read_buf)); in verify_lseek()
63 SAFE_READ(1, *tc->fd, read_buf, tc->exp_size); in verify_lseek()
65 if (strcmp(read_buf, tc->exp_data)) { in verify_lseek()
67 tc->fname, tc->off, read_buf); in verify_lseek()
70 tc->fname, tc->off, read_buf); in verify_lseek()
/third_party/ltp/testcases/kernel/sound/
Dsnd_timer01.c89 char read_buf[MAX_BUFSIZE]; in run() local
97 iov.iov_base = read_buf; in run()
98 iov.iov_len = sizeof(read_buf) - 1; in run()
103 memset(read_buf, 0, sizeof(read_buf)); in run()
114 if (read_buf[i]) { in run()
122 len = strlen(read_buf); in run()
/third_party/ltp/testcases/kernel/syscalls/llseek/
Dllseek03.c78 char read_buf[128]; in verify_lseek64() local
83 SAFE_READ(1, fd, read_buf, 4); in verify_lseek64()
99 memset(read_buf, 0, sizeof(read_buf)); in verify_lseek64()
101 ret = SAFE_READ(0, fd, read_buf, tc->read); in verify_lseek64()
112 if (strcmp(read_buf, tc->str)) in verify_lseek64()
/third_party/ltp/testcases/kernel/syscalls/epoll_wait/
Depoll_wait01.c42 char read_buf[write_size]; in get_writesize() local
44 SAFE_READ(1, fds[0], read_buf, sizeof(read_buf)); in get_writesize()
134 char read_buf[sizeof(write_buf)]; in verify_epollin() local
169 SAFE_READ(1, fds[0], read_buf, sizeof(write_buf)); in verify_epollin()
175 char read_buf[sizeof(write_buf)]; in verify_epollio() local
216 SAFE_READ(1, fds[0], read_buf, sizeof(write_buf)); in verify_epollio()
/third_party/libsnd/tests/
Ddwvw_test.c57 static int read_buf [BUFFER_SIZE] ; in dwvw_test() local
89 if ((k = sf_read_int (file, read_buf, BUFFER_SIZE)) != BUFFER_SIZE) in dwvw_test()
95 { if (read_buf [k] != write_buf [k]) in dwvw_test()
97 write_buf [k] >> (32 - bit_width), read_buf [k] >> (32 - bit_width), in dwvw_test()
99 oct_save_int (write_buf, read_buf, BUFFER_SIZE) ; in dwvw_test()
/third_party/ltp/testcases/kernel/syscalls/truncate/
Dtruncate02.c48 char read_buf[tc->read_count]; in verify_truncate() local
51 memset(read_buf, 'b', tc->read_count); in verify_truncate()
80 SAFE_PREAD(1, fd, read_buf, tc->read_count, tc->read_off); in verify_truncate()
82 if (read_buf[i] != tc->exp_char) { in verify_truncate()
84 TESTFILE, read_buf[i], tc->exp_char); in verify_truncate()
/third_party/ltp/testcases/kernel/syscalls/pwrite/
Dpwrite01.c31 static char *read_buf[NBUFS]; variable
51 SAFE_READ(1, fildes, read_buf[count], K1); in check_file_contents()
53 if (memcmp(write_buf[count], read_buf[count], K1) != 0) { in check_file_contents()
89 read_buf[count] = SAFE_MALLOC(K1); in setup()
102 free(read_buf[count]); in cleanup()
/third_party/ltp/testcases/kernel/syscalls/msync/
Dmsync01.c92 char read_buf[BUF_SIZE]; /* buffer to hold data read from file */ in main() local
119 nread = read(fildes, read_buf, sizeof(read_buf)); in main()
129 if (read_buf[count] != 1) in main()
/third_party/rust/crates/nix/test/sys/
Dtest_uio.rs46 let mut read_buf: Vec<u8> = iter::repeat(0u8).take(128 * 16).collect(); in test_writev() localVariable
52 let read_res = read(reader, &mut read_buf[..]); in test_writev()
57 assert_eq!(&to_write, &read_buf); in test_writev()
95 let mut read_buf = Vec::with_capacity(to_write.len()); in test_readv() localVariable
97 read_buf.extend(iovec.iter().cloned()); in test_readv()
100 assert_eq!(read_buf.len(), to_write.len()); in test_readv()
102 assert_eq!(&read_buf, &to_write); in test_readv()
/third_party/ffmpeg/libavformat/
Dsegafilmenc.c175 uint8_t *buf, *read_buf[2]; in write_header() local
183 read_buf[0] = buf; in write_header()
184 read_buf[1] = header; in write_header()
209 read_size[read_buf_id] = avio_read(read_pb, read_buf[read_buf_id], in write_header()
215 avio_write(format_context->pb, read_buf[read_buf_id], n); in write_header()
Dflvenc.c584 uint8_t *buf, *read_buf[2]; in shift_data() local
603 read_buf[0] = buf; in shift_data()
604 read_buf[1] = buf + metadata_size; in shift_data()
631 read_size[read_buf_id] = avio_read(read_pb, read_buf[read_buf_id], metadata_size); \ in shift_data()
642 avio_write(s->pb, read_buf[read_buf_id], n); in shift_data()
/third_party/ltp/testcases/kernel/syscalls/poll/
Dpoll01.c48 char read_buf[BUF_SIZE]; in verify_pollin() local
72 SAFE_READ(1, fildes[0], read_buf, sizeof(write_buf)); in verify_pollin()
/third_party/NuttX/drivers/usbdev/gadget/
Df_hid.c350 ret = memcpy_s(hid->read_buf, HID_OUT_DATA_SIZE, req->buf, req->xfrd); in fhid_output_request_complete()
474 hid->read_buf = memalign(USB_CACHE_ALIGN_SIZE, HID_OUT_DATA_SIZE); in usbclass_hid_bind()
475 if (hid->read_buf == NULL) in usbclass_hid_bind()
541 if (hid->read_buf != NULL) in usbclass_hid_unbind()
543 free(hid->read_buf); in usbclass_hid_unbind()
544 hid->read_buf = NULL; in usbclass_hid_unbind()
601 req->buf = (uint8_t *)hid->read_buf; in usbclass_hid_set_endpoint()
Df_hid.h76 void *read_buf; member
Dusbd_hid.c261 ret = usbd_copy_to_user(buffer, buflen, (const void *)hid->read_buf, hid->read_len); in hid_read()
/third_party/ltp/testcases/kernel/syscalls/epoll_ctl/
Depoll_ctl01.c77 char read_buf[sizeof(write_buf)]; in check_epoll_ctl() local
120 SAFE_READ(1, fd[0], read_buf, sizeof(write_buf)); in check_epoll_ctl()
/third_party/gstreamer/gstreamer/libs/gst/check/libcheck/
Dcheck_pack.c74 static int read_buf (FILE * fdes, int size, char *buf);
338 read_buf (FILE * fdes, int size, char *buf) in read_buf() function
467 nread = read_buf (fdes, CK_MAX_MSG_SIZE, buf); in punpack()
481 nread = read_buf (fdes, n, buf + nparse); in punpack()
/third_party/rust/crates/signal-hook/signal-hook-tokio/src/
Dlib.rs136 let mut read_buf = ReadBuf::new(&mut buf); in has_signals() localVariable
137 match Pin::new(read).poll_read(ctx, &mut read_buf) { in has_signals()
/third_party/ltp/testcases/kernel/syscalls/open/
Dopen12.c144 char read_buf; in test_noatime() local
171 SAFE_READ(cleanup, 1, TEST_RETURN, &read_buf, 1); in test_noatime()
/third_party/openssl/test/helpers/
Dhandshake.c725 unsigned char *read_buf; member
736 unsigned char *read_buf = NULL, *write_buf = NULL; in create_peer() local
740 || !TEST_ptr(read_buf = OPENSSL_zalloc(peer_buffer_size))) in create_peer()
745 peer->read_buf = read_buf; in create_peer()
751 OPENSSL_free(read_buf); in create_peer()
759 OPENSSL_free(peer->read_buf); in peer_free_data()
808 ret = SSL_read(peer->ssl, peer->read_buf, peer->read_buf_len); in do_app_data_step()
/third_party/ltp/testcases/kernel/device-drivers/agp/user_space/
Duser_tagp.c140 char read_buf[BUFFER_LEN]; in agpgart_io_test() local
/third_party/zlib/
Ddeflate.c89 local unsigned read_buf OF((z_streamp strm, Bytef *buf, unsigned size));
1204 local unsigned read_buf(strm, buf, size) in read_buf() function
1576 n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more);
1765 read_buf(s->strm, s->strm->next_out, len);
1833 read_buf(s->strm, s->window + s->strstart, have);

12