Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Unified Diff: tests/mmap/mmap_test.cc

Issue 415383002: Non-SFI mode: SCONS_NONSFI_TC clean up. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « buildbot/buildbot_pnacl.sh ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « buildbot/buildbot_pnacl.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698