Home
last modified time | relevance | path

Searched refs:BUFSIZE (Results 1 – 25 of 67) sorted by relevance

123

/freebsd/lib/libc/tests/stdio/
H A Dflushlbuf_test.c12 #define BUFSIZE 16 macro
20 char buf[BUFSIZE];
47 static char buf[BUFSIZE + 1]; in ATF_TC_BODY()
57 s.len = BUFSIZE / 2; // write will fail after this amount in ATF_TC_BODY()
59 ATF_REQUIRE(setvbuf(f, buf, _IOLBF, BUFSIZE) == 0); in ATF_TC_BODY()
60 while (i < BUFSIZE) in ATF_TC_BODY()
63 ATF_CHECK_EQ(BUFSIZE, i); in ATF_TC_BODY()
64 ATF_CHECK_EQ(seq[i - 1], buf[BUFSIZE - 1]); in ATF_TC_BODY()
84 while (i < BUFSIZE + s.len) in ATF_TC_BODY()
86 ATF_CHECK_EQ(BUFSIZE + s.len, i); in ATF_TC_BODY()
[all …]
/freebsd/contrib/netbsd-tests/lib/libc/stdio/
H A Dt_popen.c55 #define BUFSIZE (640*1024) macro
79 if ((buffer = malloc(BUFSIZE)) == NULL) in ATF_TC_BODY()
84 for (idx = 0; idx < BUFSIZE; idx++) in ATF_TC_BODY()
93 if (fwrite(buffer, sizeof(char), BUFSIZE, my_pipe) != BUFSIZE) in ATF_TC_BODY()
106 if (idx == BUFSIZE) { in ATF_TC_BODY()
115 if (idx < BUFSIZE) { in ATF_TC_BODY()
/freebsd/tests/sys/kern/
H A Dunix_dgram.c180 #define BUFSIZE 1024 in ATF_TC_BODY() macro
181 char buf[BUFSIZE], goodboy[BUFSIZE], flooder[BUFSIZE], notconn[BUFSIZE]; in ATF_TC_BODY()
229 ATF_REQUIRE(sendto(two, notconn, BUFSIZE, 0, (struct sockaddr *)&sun, in ATF_TC_BODY()
230 sizeof(sun)) == BUFSIZE); in ATF_TC_BODY()
231 ATF_REQUIRE(send(many[1], goodboy, BUFSIZE, 0) == BUFSIZE); in ATF_TC_BODY()
239 ATF_REQUIRE(send(many[0], flooder, BUFSIZE, 0) == -1); in ATF_TC_BODY()
241 ATF_REQUIRE(send(many[1], goodboy, BUFSIZE, 0) == BUFSIZE); in ATF_TC_BODY()
250 ATF_REQUIRE(send(many[1], goodboy, BUFSIZE, 0) == BUFSIZE); in ATF_TC_BODY()
259 ATF_REQUIRE(sendto(two, notconn, BUFSIZE, 0, (struct sockaddr *)&sun, in ATF_TC_BODY()
260 sizeof(sun)) == BUFSIZE); in ATF_TC_BODY()
[all …]
/freebsd/lib/libc/tests/gen/
H A Darc4random_test.c44 #define BUFSIZE 8 macro
54 char parentbuf[BUFSIZE]; in ATF_TC_BODY()
55 char childbuf[BUFSIZE]; in ATF_TC_BODY()
70 arc4random_buf(page->childbuf, BUFSIZE); in ATF_TC_BODY()
75 arc4random_buf(page->parentbuf, BUFSIZE); in ATF_TC_BODY()
78 ATF_CHECK_MSG(memcmp(page->parentbuf, page->childbuf, BUFSIZE) != 0, in ATF_TC_BODY()
/freebsd/stand/i386/libi386/
H A Dpread.c43 #define BUFSIZE (1*1024) macro
45 #define BUFSIZE (4*1024) macro
48 static char buf[BUFSIZE];
62 count = (rsize < BUFSIZE ? rsize : BUFSIZE);
/freebsd/contrib/netbsd-tests/lib/libc/gen/posix_spawn/
H A Dh_fileactions.c40 #define BUFSIZE 16 macro
53 char buf[BUFSIZE]; in main()
70 if (read(lowfd, buf, BUFSIZE) != -1 || errno != EBADF) { in main()
76 if (read(lowfd + 1, buf, BUFSIZE) != -1 || errno != EBADF) { in main()
82 if (write(lowfd + 2, buf, BUFSIZE) <= 0) { in main()
88 if (write(lowfd + 3, buf, BUFSIZE) <= 0) { in main()
/freebsd/contrib/netbsd-tests/lib/libc/sys/
H A Dt_mmap.c87 #define BUFSIZE (32 * 1024) /* enough size to trigger sosend_loan */ macro
105 char buf[BUFSIZE]; in testloan()
106 char backup[BUFSIZE]; in testloan()
112 val = BUFSIZE; in testloan()
115 (void)memcpy(backup, vp, BUFSIZE); in testloan()
120 val = BUFSIZE; in testloan()
125 val = BUFSIZE; in testloan()
133 nwritten = write(fds[0], (char *)vp + page, BUFSIZE - page); in testloan()
139 (void)memset(vp2, pat, BUFSIZE); in testloan()
141 nread = read(fds[1], buf + page, BUFSIZE - page); in testloan()
[all …]
H A Dt_recvmmsg.c55 #define BUFSIZE 65536 macro
82 buf = malloc(BUFSIZE); in ATF_TC_BODY()
85 mmsgcnt = BUFSIZE / sizeof(DGRAM); in ATF_TC_BODY()
/freebsd/crypto/openssl/apps/
H A Dmac.c20 #undef BUFSIZE
21 #define BUFSIZE 1024*8 macro
94 buf = app_malloc(BUFSIZE, "I/O buffer"); in mac_main()
187 i = BIO_read(in, (char *)buf, BUFSIZE); in mac_main()
205 if (len > BUFSIZE) { in mac_main()
210 if (!EVP_MAC_final(ctx, buf, &len, BUFSIZE)) { in mac_main()
228 OPENSSL_clear_free(buf, BUFSIZE); in mac_main()
H A Ddgst.c24 #undef BUFSIZE
25 #define BUFSIZE 1024*8 macro
115 buf = app_malloc(BUFSIZE, "I/O buffer"); in dgst_main()
464 OPENSSL_clear_free(buf, BUFSIZE); in dgst_main()
552 size_t len = BUFSIZE; in do_fp()
557 i = BIO_read(bp, (char *)buf, BUFSIZE); in do_fp()
590 if (tmplen > BUFSIZE) { in do_fp()
603 if (len > BUFSIZE) { in do_fp()
615 len = BIO_gets(bp, (char *)buf, BUFSIZE); in do_fp()
/freebsd/contrib/netbsd-tests/dev/audio/
H A Dh_pad.c48 #define BUFSIZE 1024 macro
53 char buf[BUFSIZE]; in main()
54 char zeros[BUFSIZE]; in main()
/freebsd/sys/dev/ppbus/
H A Dppi.c63 #define BUFSIZE 512 macro
73 char ppi_buffer[BUFSIZE];
361 buffer = malloc(BUFSIZE, M_DEVBUF, M_WAITOK); in ppiread()
403 buffer, min(BUFSIZE, uio->uio_resid), &len); in ppiread()
463 buffer = malloc(BUFSIZE, M_DEVBUF, M_WAITOK); in ppiwrite()
471 while (!error && (len = min(uio->uio_resid, BUFSIZE))) { in ppiwrite()
481 buffer = malloc(BUFSIZE, M_DEVBUF, M_WAITOK); in ppiwrite()
518 while ((len = min(uio->uio_resid, BUFSIZE)) != 0) { in ppiwrite()
/freebsd/sys/contrib/openzfs/tests/zfs-tests/cmd/
H A Dbtree_test.c24 #define BUFSIZE 256 macro
168 (void) snprintf(why, BUFSIZE, "Unexpectedly found %llu\n", in find_without_index()
176 (void) snprintf(why, BUFSIZE, "Found bad value: %llu\n", *p); in find_without_index()
193 (void) snprintf(why, BUFSIZE, "Didn't find value in tree\n"); in insert_find_remove()
196 (void) snprintf(why, BUFSIZE, "Found (%llu) in tree\n", *p); in insert_find_remove()
205 (void) snprintf(why, BUFSIZE, in insert_find_remove()
248 (void) snprintf(why, BUFSIZE, in drain_tree()
529 char why[BUFSIZE] = {0}; in main()
/freebsd/sys/contrib/openzfs/lib/libspl/os/linux/
H A Dgetmntany.c43 #define BUFSIZE (MNT_LINE_MAX + 2) macro
45 static __thread char buf[BUFSIZE];
70 ret = getmntent_r(fp, &mntbuf, buf, BUFSIZE); in _sol_getmntent()
/freebsd/contrib/tcsh/
H A Dsh.lex.c1557 fbuf[fblocks] = xcalloc(BUFSIZE, sizeof(Char)); in balloc()
1565 char cbuf[BUFSIZE + 1]; in wide_read()
1646 c = wide_read(SHIN, fbuf[0], BUFSIZE, 1); in bgetc()
1676 c = numleft = tenex(InputBuf, BUFSIZE); in bgetc()
1681 off = (int) feobp % BUFSIZE; in bgetc()
1682 buf = (int) feobp / BUFSIZE; in bgetc()
1684 roomleft = BUFSIZE - off; in bgetc()
1693 off = (int) feobp % BUFSIZE; in bgetc()
1694 buf = (int) feobp / BUFSIZE; in bgetc()
1696 roomleft = BUFSIZE - off; in bgetc()
[all …]
/freebsd/contrib/netbsd-tests/fs/common/
H A Dfstest_puffs.c53 #define BUFSIZE (128*1024) macro
106 char buf[BUFSIZE]; in readshovel()
125 assert(phdr->pth_framelen < BUFSIZE); in readshovel()
160 char buf[BUFSIZE]; in writeshovel()
182 assert(toread < BUFSIZE); in writeshovel()
/freebsd/tools/test/stress2/misc/
H A Dholdcnt02.sh116 if (write(fd, buf, BUFSIZE) != BUFSIZE)
214 buf = malloc(BUFSIZE);
H A Dholdcnt03.sh117 if (write(fd, buf, BUFSIZE) != BUFSIZE)
213 buf = malloc(BUFSIZE);
H A Dholdcnt05.sh124 if (write(fd, buf, BUFSIZE) != BUFSIZE)
222 buf = malloc(BUFSIZE);
H A Dholdcnt0.sh135 if (write(fd, buf, BUFSIZE) != BUFSIZE)
233 buf = malloc(BUFSIZE);
H A Dholdcnt04.sh125 if (write(fd, buf, BUFSIZE) != BUFSIZE)
223 buf = malloc(BUFSIZE);
H A Dsendfile12.sh130 if ((buf = malloc(BUFSIZE)) == NULL)
131 err(1, "malloc(%d), %s:%d", BUFSIZE, __FILE__, __LINE__);
138 if ((n = read(msgsock, buf, BUFSIZE)) < 0)
H A Dsendfile11.sh131 if ((buf = malloc(BUFSIZE)) == NULL)
132 err(1, "malloc(%d), %s:%d", BUFSIZE, __FILE__, __LINE__);
139 if ((n = read(msgsock, buf, BUFSIZE)) < 0)
/freebsd/tests/sys/fs/fusefs/
H A Dwrite.cc275 const ssize_t BUFSIZE = 9; in TEST_F() local
278 const char CONTENTS[BUFSIZE] = "abcdefgh"; in TEST_F()
289 expect_write(ino, initial_offset, BUFSIZE, BUFSIZE, CONTENTS); in TEST_F()
295 ASSERT_EQ(BUFSIZE, write(fd, CONTENTS, BUFSIZE)) << strerror(errno); in TEST_F()
302 const ssize_t BUFSIZE = 9; in TEST_F() local
306 const char CONTENTS[BUFSIZE] = "abcdefgh"; in TEST_F()
320 maybe_expect_write(ino, oldsize, BUFSIZE, CONTENTS); in TEST_F()
331 ASSERT_EQ(BUFSIZE, write(fd, CONTENTS, BUFSIZE)) << strerror(errno); in TEST_F()
339 const ssize_t BUFSIZE = 9; in TEST_F() local
342 const char CONTENTS[BUFSIZE] = "abcdefgh"; in TEST_F()
[all …]
/freebsd/crypto/openssl/crypto/txt_db/
H A Dtxt_db.c17 #undef BUFSIZE
18 #define BUFSIZE 512 macro
25 int size = BUFSIZE; in TXT_DB_read()
57 size += BUFSIZE; in TXT_DB_read()

123