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

Unified Diff: src/trusted/service_runtime/mmap_test.c

Issue 12226119: Factor out duplicated GioMemoryFileSnapshotCtor() + NaClAppLoadFile() calls (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 7 years, 10 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 | « src/trusted/service_runtime/load_file.c ('k') | src/trusted/service_runtime/sel_main.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/service_runtime/mmap_test.c
diff --git a/src/trusted/service_runtime/mmap_test.c b/src/trusted/service_runtime/mmap_test.c
index 3d40a34f162fc50609d2581cc57c268527a30ad9..7640b6348956fbc9e1c9cdf27a74052e9a1fb7c9 100644
--- a/src/trusted/service_runtime/mmap_test.c
+++ b/src/trusted/service_runtime/mmap_test.c
@@ -19,12 +19,11 @@
#include "native_client/src/trusted/service_runtime/include/sys/errno.h"
#include "native_client/src/include/nacl_assert.h"
-#include "native_client/src/shared/gio/gio.h"
+#include "native_client/src/trusted/service_runtime/load_file.h"
#include "native_client/src/trusted/service_runtime/mmap_test_check.h"
#include "native_client/src/trusted/service_runtime/nacl_all_modules.h"
#include "native_client/src/trusted/service_runtime/nacl_app_thread.h"
#include "native_client/src/trusted/service_runtime/nacl_syscall_common.h"
-#include "native_client/src/trusted/service_runtime/nacl_valgrind_hooks.h"
#include "native_client/src/trusted/service_runtime/sel_addrspace.h"
#include "native_client/src/trusted/service_runtime/sel_ldr.h"
@@ -69,7 +68,6 @@ void CheckForGuardRegion(uintptr_t addr, size_t expected_size) {
int main(int argc, char **argv) {
char *nacl_file;
- struct GioMemoryFileSnapshot gf;
struct NaClApp state;
struct NaClApp *nap = &state;
struct NaClAppThread nat, *natp = &nat;
@@ -93,14 +91,10 @@ int main(int argc, char **argv) {
? 0
: strtol(nacl_verbosity, (char **) 0, 0));
- NaClFileNameForValgrind(nacl_file);
- errcode = GioMemoryFileSnapshotCtor(&gf, nacl_file);
- ASSERT_NE(errcode, 0);
errcode = NaClAppCtor(&state);
ASSERT_NE(errcode, 0);
- errcode = NaClAppLoadFile((struct Gio *) &gf,
- &state);
- ASSERT_EQ(errcode, 0);
+ errcode = NaClAppLoadFileFromFilename(nap, nacl_file);
+ ASSERT_EQ(errcode, LOAD_OK);
InitThread(&state, natp);
« no previous file with comments | « src/trusted/service_runtime/load_file.c ('k') | src/trusted/service_runtime/sel_main.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698