Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/testsuite/winsup.api/ltp/mmap04.c')
-rw-r--r--winsup/testsuite/winsup.api/ltp/mmap04.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/winsup/testsuite/winsup.api/ltp/mmap04.c b/winsup/testsuite/winsup.api/ltp/mmap04.c
index dbe25aefd..e69d15a97 100644
--- a/winsup/testsuite/winsup.api/ltp/mmap04.c
+++ b/winsup/testsuite/winsup.api/ltp/mmap04.c
@@ -121,11 +121,12 @@ main(int ac, char **av)
* Call mmap to map the temporary file 'TEMPFILE'
* with read and execute access.
*/
- TEST(mmap(0, page_sz, PROT_READ|PROT_EXEC,
- MAP_FILE|MAP_SHARED, fildes, 0));
+ errno = 0;
+ addr = mmap(0, page_sz, PROT_READ|PROT_EXEC,
+ MAP_FILE|MAP_SHARED, fildes, 0);
/* Check for the return value of mmap() */
- if (TEST_RETURN == (int)MAP_FAILED) {
+ if (addr == MAP_FAILED) {
tst_resm(TFAIL, "mmap() Failed on %s, errno=%d : %s",
TEMPFILE, errno, strerror(errno));
continue;
@@ -136,9 +137,6 @@ main(int ac, char **av)
* executed without (-f) option.
*/
if (STD_FUNCTIONAL_TEST) {
- /* Get the mmap return value */
- addr = (char *)TEST_RETURN;
-
/*
* Read the file contents into the dummy
* variable.