summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--harness/cases/5.t6
1 files changed, 3 insertions, 3 deletions
diff --git a/harness/cases/5.t b/harness/cases/5.t
index 2b4b4bb..7d67562 100644
--- a/harness/cases/5.t
+++ b/harness/cases/5.t
@@ -40,14 +40,14 @@ int test_main(void)
buf = mmap(0, page_size, PROT_WRITE, MAP_SHARED, rwfd, 0);
assert(buf != (char *)-1);
- status |= attempt_rw(rwfd, buf, SIZE, 0, READ, SIZE);
-
/* Whether PROT_WRITE is readable is arch-dependent. So compare
* against read result. */
res = read(rwfd, buf, SIZE);
if (res < 0)
res = -errno;
- status |= attempt_rw(rwfd, buf, SIZE, 0, WRITE, res);
+ status |= attempt_rw(rwfd, buf, SIZE, 0, READ, res);
+
+ status |= attempt_rw(rwfd, buf, SIZE, 0, WRITE, SIZE);
return status;
}