| Index: tests/mmap/mmap_test.cc
|
| diff --git a/tests/mmap/mmap_test.cc b/tests/mmap/mmap_test.cc
|
| index 000baf969d33b7dd5dd73cd41d027470e7e9cad8..446570ce1c5e57d72b6a2a02a0cc722fa209c012 100644
|
| --- a/tests/mmap/mmap_test.cc
|
| +++ b/tests/mmap/mmap_test.cc
|
| @@ -226,11 +226,23 @@ bool test3() {
|
| void *res;
|
|
|
| printf("test3\n");
|
| + if (NONSFI_MODE) {
|
| + /*
|
| + * This test checks a security property of the NaCl TCB. However, when
|
| + * calling Linux's mmap() syscall directly, we can't necessarily expect
|
| + * a specific error value for this case.
|
| + */
|
| + printf("test3 skipped\n");
|
| + return true;
|
| + }
|
| +
|
| res = mmap(static_cast<void*>(0), (size_t) (1 << 16),
|
| PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, 0, 0);
|
| printf("res = %p\n", res);
|
| - const int kExpectedErrno = NONSFI_MODE ? EPERM : EINVAL;
|
| - if (MAP_FAILED == res && kExpectedErrno == errno) {
|
| + if (MAP_FAILED == res) {
|
| + printf("errno = %d\n", errno);
|
| + }
|
| + if (MAP_FAILED == res && EINVAL == errno) {
|
| printf("mmap okay\n");
|
| return true;
|
| }
|
|
|