Cygwin: testsuite: Fix size of write to temporary file to be mmap()ed
See ltp commit 91361378
This commit is contained in:
parent
19b3b814bc
commit
f1d7ef46f7
|
@ -225,7 +225,7 @@ setup()
|
|||
}
|
||||
|
||||
/* Write test buffer contents into temporary file */
|
||||
if (write(fildes, tst_buff, sizeof(tst_buff)) < (int)sizeof(tst_buff)) {
|
||||
if (write(fildes, tst_buff, page_sz) < page_sz) {
|
||||
tst_brkm(TFAIL, NULL, "write() on %s Failed, errno=%d : %s",
|
||||
TEMPFILE, errno, strerror(errno));
|
||||
free(tst_buff);
|
||||
|
|
|
@ -225,7 +225,7 @@ setup()
|
|||
}
|
||||
|
||||
/* Write test buffer contents into temporary file */
|
||||
if (write(fildes, tst_buff, strlen(tst_buff)) < (int)strlen(tst_buff)) {
|
||||
if (write(fildes, tst_buff, page_sz) < page_sz) {
|
||||
tst_brkm(TFAIL, NULL, "write() on %s Failed, errno=%d : %s",
|
||||
TEMPFILE, errno, strerror(errno));
|
||||
free(tst_buff);
|
||||
|
|
|
@ -225,7 +225,7 @@ setup()
|
|||
}
|
||||
|
||||
/* Write test buffer contents into temporary file */
|
||||
if (write(fildes, tst_buff, strlen(tst_buff)) < (int)strlen(tst_buff)) {
|
||||
if (write(fildes, tst_buff, page_sz) < page_sz) {
|
||||
tst_brkm(TFAIL, NULL, "write() on %s Failed, errno=%d : %s",
|
||||
TEMPFILE, errno, strerror(errno));
|
||||
free(tst_buff);
|
||||
|
|
|
@ -228,8 +228,7 @@ setup()
|
|||
}
|
||||
|
||||
/* Write test buffer contents into temporary file */
|
||||
if (write(fildes, tst_buff, strlen(tst_buff))
|
||||
!= (int)strlen(tst_buff)) {
|
||||
if (write(fildes, tst_buff, page_sz) != page_sz) {
|
||||
tst_brkm(TFAIL, NULL, "write() on %s Failed, errno=%d : %s",
|
||||
TEMPFILE, errno, strerror(errno));
|
||||
free(tst_buff);
|
||||
|
|
|
@ -197,7 +197,7 @@ setup()
|
|||
}
|
||||
|
||||
/* Write test buffer contents into temporary file */
|
||||
if (write(fildes, tst_buff, strlen(tst_buff)) < (int)strlen(tst_buff)) {
|
||||
if (write(fildes, tst_buff, page_sz) < page_sz) {
|
||||
tst_brkm(TFAIL, NULL,
|
||||
"write() on %s Failed, errno=%d : %s",
|
||||
TEMPFILE, errno, strerror(errno));
|
||||
|
|
|
@ -198,7 +198,7 @@ setup()
|
|||
}
|
||||
|
||||
/* Write test buffer contents into temporary file */
|
||||
if (write(fildes, tst_buff, strlen(tst_buff)) < (int)strlen(tst_buff)) {
|
||||
if (write(fildes, tst_buff, page_sz) < page_sz) {
|
||||
tst_brkm(TFAIL, NULL, "write() on %s Failed, errno=%d : %s",
|
||||
TEMPFILE, errno, strerror(errno));
|
||||
free(tst_buff);
|
||||
|
|
Loading…
Reference in New Issue