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

Side by Side Diff: src/native_client/tests/dynamic_code_loading/nacl.scons

Issue 7068021: Dynamic loading: Fill pages with halts only when they are needed (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Fix log messages Created 9 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/native_client/tests/dynamic_code_loading/dyncode_demand_alloc_test.stdout ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # -*- python -*- 1 # -*- python -*-
2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. 2 # Copyright (c) 2011 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 Import('env') 6 Import('env')
7 7
8 # The test works with PNaCl-ARM but not with PNaCl-x86, because the 8 # The test works with PNaCl-ARM but not with PNaCl-x86, because the
9 # assembler #defines __arm__ rather than __i386__ or __x86_64__ even 9 # assembler #defines __arm__ rather than __i386__ or __x86_64__ even
10 # when we are targetting x86. 10 # when we are targetting x86.
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 prog_env.ComponentProgram('dyncode_disabled_test.nexe', 78 prog_env.ComponentProgram('dyncode_disabled_test.nexe',
79 ['dyncode_disabled_test.c'], 79 ['dyncode_disabled_test.c'],
80 EXTRA_LIBS=['nacl_dyncode']) 80 EXTRA_LIBS=['nacl_dyncode'])
81 81
82 prog_env.ComponentProgram('debug_mode_test.nexe', 82 prog_env.ComponentProgram('debug_mode_test.nexe',
83 ['debug_mode_test.c', 83 ['debug_mode_test.c',
84 template_obj], 84 template_obj],
85 EXTRA_LIBS=['nacl_dyncode']) 85 EXTRA_LIBS=['nacl_dyncode'])
86 86
87 prog_env.ComponentProgram('dyncode_demand_alloc_test.nexe',
88 ['dyncode_demand_alloc_test.c'],
89 EXTRA_LIBS=['nacl_dyncode'])
90
87 tests = [ 91 tests = [
88 prog_env.CommandSelLdrTestNacl( 92 prog_env.CommandSelLdrTestNacl(
89 'dynamic_load_test.out', 93 'dynamic_load_test.out',
90 command=[dynamic_load_test_nexe], 94 command=[dynamic_load_test_nexe],
91 # We need to set this because the test needs to behave 95 # We need to set this because the test needs to behave
92 # differently in the plugin, but the plugin does not provide a 96 # differently in the plugin, but the plugin does not provide a
93 # way to distinguish itself. TODO(mseaborn): Fix that. 97 # way to distinguish itself. TODO(mseaborn): Fix that.
94 # See http://code.google.com/p/nativeclient/issues/detail?id=889 98 # See http://code.google.com/p/nativeclient/issues/detail?id=889
95 sel_ldr_flags=['-E', 'NACL_SRPC_STANDALONE=1'], 99 sel_ldr_flags=['-E', 'NACL_SRPC_STANDALONE=1'],
96 ), 100 ),
97 prog_env.CommandSelLdrTestNacl( 101 prog_env.CommandSelLdrTestNacl(
98 'write_to_dyncode.out', 102 'write_to_dyncode.out',
99 command=[prog_env.File('write_to_dyncode.nexe')], 103 command=[prog_env.File('write_to_dyncode.nexe')],
100 exit_status='untrusted_segfault', 104 exit_status='untrusted_segfault',
101 stdout_golden=prog_env.File('write_to_dyncode.stdout'), 105 stdout_golden=prog_env.File('write_to_dyncode.stdout'),
102 ), 106 ),
103 prog_env.CommandSelLdrTestNacl( 107 prog_env.CommandSelLdrTestNacl(
104 'dyncode_disabled_test.out', 108 'dyncode_disabled_test.out',
105 command=[prog_env.File('dyncode_disabled_test.nexe')], 109 command=[prog_env.File('dyncode_disabled_test.nexe')],
106 osenv='NACL_DISABLE_DYNAMIC_LOADING=1', 110 osenv='NACL_DISABLE_DYNAMIC_LOADING=1',
107 ), 111 ),
108 prog_env.CommandSelLdrTestNacl( 112 prog_env.CommandSelLdrTestNacl(
109 'debug_mode_test.out', 113 'debug_mode_test.out',
110 # NOTE: the data we are loading does not pass the validator 114 # NOTE: the data we are loading does not pass the validator
111 sel_ldr_flags=["-c"], 115 sel_ldr_flags=["-c"],
112 command=[prog_env.File('debug_mode_test.nexe')], 116 command=[prog_env.File('debug_mode_test.nexe')],
113 ), 117 ),
118 # This tests, from untrusted code, that dyncode pages are
119 # inaccessible before they are allocated.
120 prog_env.CommandSelLdrTestNacl(
121 'dyncode_demand_alloc_test.out',
122 command=[prog_env.File('dyncode_demand_alloc_test.nexe')],
123 exit_status='untrusted_segfault',
124 stdout_golden=prog_env.File('dyncode_demand_alloc_test.stdout'),
125 ),
114 ] 126 ]
115 if not prog_env.Bit('target_arm'): 127 if not prog_env.Bit('target_arm'):
116 tests.append(prog_env.CommandSelLdrTestNacl( 128 tests.append(prog_env.CommandSelLdrTestNacl(
117 'dynamic_modify_test.out', 129 'dynamic_modify_test.out',
118 command=[dynamic_modify_test_nexe], 130 command=[dynamic_modify_test_nexe],
119 sel_ldr_flags=['-E', 'NACL_SRPC_STANDALONE=1'])) 131 sel_ldr_flags=['-E', 'NACL_SRPC_STANDALONE=1']))
120 132
121 # TODO(kcc): non-standard linking options confuse Valgrind debug info reader. 133 # TODO(kcc): non-standard linking options confuse Valgrind debug info reader.
122 # See http://code.google.com/p/nativeclient/issues/detail?id=1606 134 # See http://code.google.com/p/nativeclient/issues/detail?id=1606
123 is_broken = prog_env.IsRunningUnderValgrind() 135 is_broken = prog_env.IsRunningUnderValgrind()
124 prog_env.AddNodeToTestSuite(tests, 136 prog_env.AddNodeToTestSuite(tests,
125 ['small_tests', 'sel_ldr_tests'], 137 ['small_tests', 'sel_ldr_tests'],
126 'run_dynamic_load_test', 138 'run_dynamic_load_test',
127 is_broken=is_broken) 139 is_broken=is_broken)
OLDNEW
« no previous file with comments | « src/native_client/tests/dynamic_code_loading/dyncode_demand_alloc_test.stdout ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698