Chromium Code Reviews| Index: tests/mmap/mmap_test.cc |
| diff --git a/tests/mmap/mmap_test.cc b/tests/mmap/mmap_test.cc |
| index 000baf969d33b7dd5dd73cd41d027470e7e9cad8..8aba06aef2facb96b57269f44d47e0403b9f3fc5 100644 |
| --- a/tests/mmap/mmap_test.cc |
| +++ b/tests/mmap/mmap_test.cc |
| @@ -226,11 +226,22 @@ bool test3() { |
| void *res; |
| printf("test3\n"); |
| + if (NONSFI_MODE) { |
| + /* |
| + * This test is designed to made sure NaClSyscall mmap's behavior returns |
|
Mark Seaborn
2014/07/25 20:54:54
"make sure"
How about: "This test checks a securi
hidehiko
2014/07/28 22:11:05
Done.
|
| + * an appropriate error. So, we skip it in non-SFI mode. |
| + */ |
| + 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; |
| } |