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

Side by Side Diff: src/trusted/service_runtime/mmap_unittest.cc

Issue 788193003: Create a build_config header file. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 6 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 9
10 #include "native_client/src/include/nacl_defines.h"
11
10 #if NACL_LINUX 12 #if NACL_LINUX
11 # include <sys/mman.h> 13 # include <sys/mman.h>
12 #elif NACL_OSX 14 #elif NACL_OSX
13 # include <mach/mach.h> 15 # include <mach/mach.h>
14 #endif 16 #endif
15 17
16 #include "gtest/gtest.h" 18 #include "gtest/gtest.h"
17 19
18 #include "native_client/src/include/portability_io.h" 20 #include "native_client/src/include/portability_io.h"
19 #include "native_client/src/trusted/desc/nacl_desc_effector_trusted_mem.h" 21 #include "native_client/src/trusted/desc/nacl_desc_effector_trusted_mem.h"
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 // graceful. 462 // graceful.
461 ASSERT_TRUE(NaClPtrIsNegErrno(&map_result)); 463 ASSERT_TRUE(NaClPtrIsNegErrno(&map_result));
462 ASSERT_EQ(-(intptr_t) map_result, NACL_ABI_EACCES); 464 ASSERT_EQ(-(intptr_t) map_result, NACL_ABI_EACCES);
463 } else { 465 } else {
464 // On Unix, the Map() should succeed. 466 // On Unix, the Map() should succeed.
465 ASSERT_FALSE(NaClPtrIsNegErrno(&map_result)); 467 ASSERT_FALSE(NaClPtrIsNegErrno(&map_result));
466 AssertArrayFilled((char *) map_result, file_size); 468 AssertArrayFilled((char *) map_result, file_size);
467 NaClDescUnmapUnsafe(desc, (void *) map_result, file_size_rounded_up); 469 NaClDescUnmapUnsafe(desc, (void *) map_result, file_size_rounded_up);
468 } 470 }
469 } 471 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698