diff --git a/winsup/testsuite/winsup.api/ltp/mmap02.c b/winsup/testsuite/winsup.api/ltp/mmap02.c index 33a12738c..b96bdb452 100644 --- a/winsup/testsuite/winsup.api/ltp/mmap02.c +++ b/winsup/testsuite/winsup.api/ltp/mmap02.c @@ -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); diff --git a/winsup/testsuite/winsup.api/ltp/mmap03.c b/winsup/testsuite/winsup.api/ltp/mmap03.c index 9302d335d..fba512c28 100644 --- a/winsup/testsuite/winsup.api/ltp/mmap03.c +++ b/winsup/testsuite/winsup.api/ltp/mmap03.c @@ -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); diff --git a/winsup/testsuite/winsup.api/ltp/mmap04.c b/winsup/testsuite/winsup.api/ltp/mmap04.c index 64d3a8ebe..dbe25aefd 100644 --- a/winsup/testsuite/winsup.api/ltp/mmap04.c +++ b/winsup/testsuite/winsup.api/ltp/mmap04.c @@ -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); diff --git a/winsup/testsuite/winsup.api/ltp/mmap05.c b/winsup/testsuite/winsup.api/ltp/mmap05.c index bcdfd0cd8..6e75ee222 100644 --- a/winsup/testsuite/winsup.api/ltp/mmap05.c +++ b/winsup/testsuite/winsup.api/ltp/mmap05.c @@ -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); diff --git a/winsup/testsuite/winsup.api/ltp/mmap06.c b/winsup/testsuite/winsup.api/ltp/mmap06.c index ec113c077..c099f8c33 100644 --- a/winsup/testsuite/winsup.api/ltp/mmap06.c +++ b/winsup/testsuite/winsup.api/ltp/mmap06.c @@ -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)); diff --git a/winsup/testsuite/winsup.api/ltp/mmap07.c b/winsup/testsuite/winsup.api/ltp/mmap07.c index ab989f443..6e3bb5112 100644 --- a/winsup/testsuite/winsup.api/ltp/mmap07.c +++ b/winsup/testsuite/winsup.api/ltp/mmap07.c @@ -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);