OLD | NEW |
---|---|
1 # -*- python -*- | 1 # -*- python -*- |
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 Import('env') | 6 Import('env') |
7 | 7 |
8 # Do not run these tests with pexes, assuming they are portable, since | 8 # Do not run these tests with pexes, assuming they are portable, since |
9 # they use inline assembler. | 9 # they use inline assembler. |
10 if env.Bit('bitcode') and env.Bit('pnacl_generate_pexe'): | 10 if env.Bit('bitcode') and env.Bit('pnacl_generate_pexe'): |
11 Return() | 11 Return() |
12 | 12 |
13 # The file partly_invalid.c contains inline assembler | 13 # The file partly_invalid.c contains inline assembler |
14 if env.Bit('bitcode'): | 14 if env.Bit('bitcode'): |
15 env.AddBiasForPNaCl() | 15 env.AddBiasForPNaCl() |
16 env.PNaClForceNative() | 16 env.PNaClForceNative() |
17 | 17 |
18 # Newlib + PIC doesn't provide native ___tls_get_addr, so gold complains. | 18 # Newlib + PIC doesn't provide native ___tls_get_addr, so gold complains. |
19 if env.Bit('bitcode') and env.Bit('nacl_pic'): | 19 if env.Bit('bitcode') and env.Bit('nacl_pic'): |
20 Return() | 20 Return() |
21 | 21 |
22 # TODO(mseaborn): Extend the ARM validator to support this. | 22 # TODO(mseaborn): Extend the ARM validator to support this. |
23 # BUG= http://code.google.com/p/nativeclient/issues/detail?id=2369 | 23 # BUG= http://code.google.com/p/nativeclient/issues/detail?id=2369 |
24 if env.Bit('build_arm'): | 24 if env.Bit('build_arm'): |
Mark Seaborn
2013/03/11 15:54:38
How about just disabling this file for MIPS the sa
petarj
2013/03/14 01:13:03
MIPS has stubout mode, so it can execute stubout t
| |
25 Return() | 25 Return() |
26 | 26 |
27 # R-DFA does not support stubout mode | 27 # R-DFA does not support stubout mode |
28 if env.Bit('validator_ragel'): | 28 if env.Bit('validator_ragel'): |
29 Return() | 29 Return() |
30 | 30 |
31 if 'TRUSTED_ENV' not in env: | 31 if 'TRUSTED_ENV' not in env: |
32 Return() | 32 Return() |
33 | 33 |
34 stubout_tool = env['TRUSTED_ENV'].File( | 34 stubout_tool = env['TRUSTED_ENV'].File( |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
68 is_broken=is_validation_disabled) | 68 is_broken=is_validation_disabled) |
69 | 69 |
70 # With "-c", the executable runs to completion but is not safe. | 70 # With "-c", the executable runs to completion but is not safe. |
71 node = env.CommandSelLdrTestNacl( | 71 node = env.CommandSelLdrTestNacl( |
72 'partly_invalid_2.out', partly_invalid_nexe, | 72 'partly_invalid_2.out', partly_invalid_nexe, |
73 stdout_golden=env.File('without_stubout.stdout'), | 73 stdout_golden=env.File('without_stubout.stdout'), |
74 sel_ldr_flags=['-c']) | 74 sel_ldr_flags=['-c']) |
75 env.AddNodeToTestSuite(node, test_suites, 'run_without_stubout_2_test') | 75 env.AddNodeToTestSuite(node, test_suites, 'run_without_stubout_2_test') |
76 | 76 |
77 # With "-s", the executable runs part way but then faults. | 77 # With "-s", the executable runs part way but then faults. |
78 | |
79 if env.Bit('target_mips32'): | |
80 partly_invalid_exit_status = 'sigtrap' | |
81 else: | |
82 partly_invalid_exit_status = 'untrusted_sigill' | |
83 | |
78 node = env.CommandSelLdrTestNacl( | 84 node = env.CommandSelLdrTestNacl( |
79 'partly_invalid_3.out', partly_invalid_nexe, | 85 'partly_invalid_3.out', partly_invalid_nexe, |
80 stdout_golden=env.File('with_stubout.stdout'), | 86 stdout_golden=env.File('with_stubout.stdout'), |
81 sel_ldr_flags=['-s'], | 87 sel_ldr_flags=['-s'], |
82 exit_status='untrusted_sigill') | 88 exit_status=partly_invalid_exit_status) |
83 env.AddNodeToTestSuite(node, test_suites, 'run_stubout_mode_test') | 89 env.AddNodeToTestSuite(node, test_suites, 'run_stubout_mode_test') |
84 | 90 |
85 # Using the standalone ncval_stubout tool to rewrite the executable | 91 # Using the standalone ncval_stubout tool to rewrite the executable |
86 # offline should be equivalent to using sel_ldr's "-s" option. | 92 # offline should be equivalent to using sel_ldr's "-s" option. |
93 # This tool exists only for x86. | |
87 node = env.CommandSelLdrTestNacl( | 94 node = env.CommandSelLdrTestNacl( |
88 'partly_invalid_stubout.out', | 95 'partly_invalid_stubout.out', |
89 partly_invalid_stubout_nexe, | 96 partly_invalid_stubout_nexe, |
90 stdout_golden=env.File('with_stubout.stdout'), | 97 stdout_golden=env.File('with_stubout.stdout'), |
91 exit_status='untrusted_sigill') | 98 exit_status='untrusted_sigill') |
92 env.AddNodeToTestSuite(node, test_suites, 'run_offline_stubout_test') | 99 env.AddNodeToTestSuite(node, test_suites, 'run_offline_stubout_test', |
100 is_broken=env.Bit('target_mips32')) | |
OLD | NEW |