Cygwin: testsuite: Fix size of write to temporary file to be mmap()ed

See ltp commit 91361378
This commit is contained in:
Jon Turney 2020-11-26 16:11:44 +00:00
parent 19b3b814bc
commit f1d7ef46f7
No known key found for this signature in database
GPG Key ID: C7C86F0370285C81
6 changed files with 6 additions and 7 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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));

View File

@ -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);