| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2010 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2010 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * be 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/portability.h" | 10 #include "native_client/src/include/portability.h" |
| 11 | 11 |
| 12 #include "native_client/src/shared/platform/nacl_check.h" | 12 #include "native_client/src/shared/platform/nacl_check.h" |
| 13 | 13 |
| 14 #include "native_client/src/trusted/desc/nrd_all_modules.h" | 14 #include "native_client/src/trusted/desc/nrd_all_modules.h" |
| 15 #include "native_client/src/trusted/gio/gio_shm_unbounded.h" | 15 #include "native_client/src/trusted/gio/gio_shm_unbounded.h" |
| 16 #include "native_client/src/trusted/service_runtime/include/bits/mman.h" |
| 16 #include "native_client/src/trusted/service_runtime/include/sys/errno.h" | 17 #include "native_client/src/trusted/service_runtime/include/sys/errno.h" |
| 17 #include "native_client/src/trusted/service_runtime/include/sys/mman.h" | |
| 18 #include "native_client/src/trusted/service_runtime/include/sys/stat.h" | 18 #include "native_client/src/trusted/service_runtime/include/sys/stat.h" |
| 19 #include "native_client/src/trusted/service_runtime/nacl_config.h" | 19 #include "native_client/src/trusted/service_runtime/nacl_config.h" |
| 20 | 20 |
| 21 | 21 |
| 22 size_t gNumBytes = 10 * NACL_MAP_PAGESIZE; | 22 size_t gNumBytes = 10 * NACL_MAP_PAGESIZE; |
| 23 uint32_t gLinearGeneratorSeed = 0xdeadbeef; | 23 uint32_t gLinearGeneratorSeed = 0xdeadbeef; |
| 24 | 24 |
| 25 struct DataGenerator { | 25 struct DataGenerator { |
| 26 void (*Dtor)(struct DataGenerator *self); | 26 void (*Dtor)(struct DataGenerator *self); |
| 27 uint8_t (*Next)(struct DataGenerator *self); | 27 uint8_t (*Next)(struct DataGenerator *self); |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 } | 191 } |
| 192 | 192 |
| 193 nerrs += TestWithDataGenerators(&ngsu); | 193 nerrs += TestWithDataGenerators(&ngsu); |
| 194 | 194 |
| 195 unrecoverable: | 195 unrecoverable: |
| 196 NaClNrdAllModulesFini(); | 196 NaClNrdAllModulesFini(); |
| 197 | 197 |
| 198 printf("%s\n", (0 == nerrs) ? "PASSED" : "FAILED"); | 198 printf("%s\n", (0 == nerrs) ? "PASSED" : "FAILED"); |
| 199 return (0 == nerrs) ? EXIT_SUCCESS : EXIT_FAILURE; | 199 return (0 == nerrs) ? EXIT_SUCCESS : EXIT_FAILURE; |
| 200 } | 200 } |
| OLD | NEW |