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'): |
(...skipping 57 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. | |
Mark Seaborn
2013/03/14 15:48:00
If stubout mode is implemented for MIPS, can't you
petarj
2013/03/15 18:34:07
We are still missing ncvalidate_verbose for MIPS.
| |
87 node = env.CommandSelLdrTestNacl( | 94 node = env.CommandSelLdrTestNacl( |
88 'partly_invalid_stubout.out', | 95 'partly_invalid_stubout.out', |
Mark Seaborn
2013/03/14 15:48:00
Don't change the indentation here.
petarj
2013/03/15 18:34:07
Done.
| |
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 |