Lines Matching +full:512 +full:- +full:bytes
1 /*-
36 #include <atf-c.h>
41 /* Use a pre-existing buffer. */ in ATF_TC_BODY()
42 char buf[512]; in ATF_TC_BODY()
43 char buf2[512]; in ATF_TC_BODY()
63 /* Re-open the FILE * to read back the data. */ in ATF_TC_BODY()
83 /* Now open a FILE * on the first 4 bytes of the string. */ in ATF_TC_BODY()
88 * Try to write more bytes than we shoud, we'll get a short count (4). in ATF_TC_BODY()
97 /* Check that the string was not modified after the first 4 bytes. */ in ATF_TC_BODY()
111 fp = fmemopen(NULL, 512, "w+"); in ATF_TC_BODY()
115 for (i = 0; i < 512; i++) { in ATF_TC_BODY()
122 ATF_REQUIRE(pos == 512); in ATF_TC_BODY()
133 fp = fmemopen(NULL, 512, "r"); in ATF_TC_BODY()
137 fp = fmemopen(NULL, 512, "w"); in ATF_TC_BODY()
151 char buf[512] = {'\0'}; in ATF_TC_BODY()
154 char str3[sizeof(str) + sizeof(str2) -1]; in ATF_TC_BODY()
198 ATF_REQUIRE(strncmp(str3, str, sizeof(str) - 1) == 0); in ATF_TC_BODY()
199 ATF_REQUIRE(strncmp(str3 + sizeof(str) - 1, str2, sizeof(str2)) == 0); in ATF_TC_BODY()
210 * Make sure that NULL bytes are never appended when opening a buffer in ATF_TC_BODY()
220 /* Pre-fill the buffer. */ in ATF_TC_BODY()
231 /* Make sure that the buffer doesn't contain any NULL bytes. */ in ATF_TC_BODY()
256 /* Make sure that a pre-allocated buffer behaves correctly. */ in ATF_TC_BODY()
277 * PR281953 - ensure we cannot write in read-only only mode, and cannot read in
278 * write-only mode.