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

Unified Diff: tests/faulted_thread_queue/faultqueue_test_host.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 | « tests/custom_desc/desc_test_host.c ('k') | tests/minnacl/minimal_test_host.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/faulted_thread_queue/faultqueue_test_host.c
diff --git a/tests/faulted_thread_queue/faultqueue_test_host.c b/tests/faulted_thread_queue/faultqueue_test_host.c
index 36cbeabb1b0a88f5c62138261e4d22ea9f5a63c8..930b8a69581b13dbdeb3eb523710802739c2e6cb 100644
--- a/tests/faulted_thread_queue/faultqueue_test_host.c
+++ b/tests/faulted_thread_queue/faultqueue_test_host.c
@@ -7,20 +7,19 @@
#include "native_client/src/include/nacl_assert.h"
#include "native_client/src/include/nacl_macros.h"
#include "native_client/src/include/portability_io.h"
-#include "native_client/src/shared/gio/gio.h"
#include "native_client/src/shared/platform/nacl_check.h"
#include "native_client/src/shared/platform/nacl_exit.h"
#include "native_client/src/shared/platform/nacl_log.h"
#include "native_client/src/shared/platform/nacl_sync_checked.h"
#include "native_client/src/trusted/service_runtime/arch/sel_ldr_arch.h"
#include "native_client/src/trusted/service_runtime/include/bits/mman.h"
+#include "native_client/src/trusted/service_runtime/load_file.h"
#include "native_client/src/trusted/service_runtime/nacl_all_modules.h"
#include "native_client/src/trusted/service_runtime/nacl_app.h"
#include "native_client/src/trusted/service_runtime/nacl_app_thread.h"
#include "native_client/src/trusted/service_runtime/nacl_copy.h"
#include "native_client/src/trusted/service_runtime/nacl_signal.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/osx/mach_exception_handler.h"
#include "native_client/src/trusted/service_runtime/sel_ldr.h"
#include "native_client/src/trusted/service_runtime/thread_suspension.h"
@@ -277,7 +276,6 @@ void TestGettingRegistersInMacSwitchRemainingRegs(struct NaClApp *nap) {
int main(int argc, char **argv) {
struct NaClApp app;
struct NaClApp *nap = &app;
- struct GioMemoryFileSnapshot gio_file;
NaClDebugExceptionHandlerStandaloneHandleArgs(argc, argv);
NaClHandleBootstrapArgs(&argc, &argv);
@@ -292,10 +290,8 @@ int main(int argc, char **argv) {
NaClLog(LOG_FATAL, "Expected 1 argument: executable filename\n");
}
- NaClFileNameForValgrind(argv[1]);
- CHECK(GioMemoryFileSnapshotCtor(&gio_file, argv[1]));
CHECK(NaClAppCtor(nap));
- CHECK(NaClAppLoadFile((struct Gio *) &gio_file, nap) == LOAD_OK);
+ CHECK(NaClAppLoadFileFromFilename(nap, argv[1]) == LOAD_OK);
NaClAppInitialDescriptorHookup(nap);
CHECK(NaClAppPrepareToLaunch(nap) == LOAD_OK);
« no previous file with comments | « tests/custom_desc/desc_test_host.c ('k') | tests/minnacl/minimal_test_host.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698