Index: tests/stubout_mode/nacl.scons |
diff --git a/tests/stubout_mode/nacl.scons b/tests/stubout_mode/nacl.scons |
index d44ee22b9080603b33a7b72d86d170ad589bb811..075afe27ee5b23f3866a9bf1360e297651071308 100644 |
--- a/tests/stubout_mode/nacl.scons |
+++ b/tests/stubout_mode/nacl.scons |
@@ -9,6 +9,8 @@ if 'TRUSTED_ENV' not in env: |
Return() |
# Even if stubout mode is not supported sel_ldr still must run valid .nexes. |
+# TODO(shyamsundarr): consider removing support for stubout mode completely |
+# from code, given that currently only MIPS supports it and it is untested. |
hello_world_nexe = env.File('${STAGING_DIR}/hello_world${PROGSUFFIX}') |
node = env.CommandSelLdrTestNacl( |
'hello_world_stub_out_run.out', hello_world_nexe, |
@@ -16,102 +18,3 @@ node = env.CommandSelLdrTestNacl( |
env.AddNodeToTestSuite( |
node, ['small_tests'], 'run_valid_nexe_with_stubout_test') |
-# Do not run these tests with pexes, assuming they are portable, since |
-# they use inline assembler. |
-if env.Bit('bitcode') and env.Bit('pnacl_generate_pexe'): |
- Return() |
- |
-# The file partly_invalid.c contains inline assembler |
-if env.Bit('bitcode'): |
- env.AddBiasForPNaCl() |
- env.PNaClForceNative() |
- |
-# Newlib + PIC doesn't provide native ___tls_get_addr, so gold complains. |
-if env.Bit('bitcode') and env.Bit('nacl_pic'): |
- Return() |
- |
-# TODO(mseaborn): Extend the ARM validator to support this. |
-# BUG= http://code.google.com/p/nativeclient/issues/detail?id=2369 |
-if env.Bit('build_arm'): |
- Return() |
- |
-stubout_tool = env['TRUSTED_ENV'].File( |
- '${STAGING_DIR}/${PROGPREFIX}ncval_stubout${PROGSUFFIX}') |
- |
-partly_invalid_nexe = env.ComponentProgram('partly_invalid', 'partly_invalid.c', |
- EXTRA_LIBS=['${NONIRT_LIBS}']) |
- |
- |
-# R-DFA does not support stubout mode but we need to create at least file |
-# partly_invalid.nexe used in PPAPI tests thus we first create a rule for |
-# this file and only then bail out. |
-if env.Bit('validator_ragel'): |
- Return() |
- |
-partly_invalid_stubout_nexe = env.File('partly_invalid_stubout${PROGSUFFIX}') |
- |
-node = env.Command( |
- target=partly_invalid_stubout_nexe, |
- source=[stubout_tool, partly_invalid_nexe], |
- action=[Action('${SOURCES[0]} ${SOURCES[1]} -o $TARGET')]) |
-# This alias is to ensure this test works with built_elsewhere=1, |
-# because with that option CommandSelLdrTestNacl() assumes all its |
-# inputs have already been built (which is not necessarily a good |
-# idea, but apparently true for all other cases so far). |
-env.Alias('all_test_programs', node) |
- |
-# For speed, SConstruct disables the validator (using '-cc') for |
-# Valgrind+nacl-glibc tests, which breaks one test below. |
-is_validation_disabled = env.IsRunningUnderValgrind() and env.Bit('nacl_glibc') |
- |
-test_suites = ['small_tests', 'nonpexe_tests'] |
- |
-# Without any debug flags, the executable fails validation. |
Mark Seaborn
2014/10/07 21:53:46
Can we keep this test case?
I have a strong suspi
shyamsundarr
2014/10/08 19:59:03
Done.
|
-if env.Bit('nacl_static_link'): |
- # The exit status produced by sel_ldr. |
- validation_failure_status = '1' |
-else: |
- # The exit status produced by the dynamic linker. |
- validation_failure_status = '127' |
-node = env.CommandSelLdrTestNacl( |
- 'partly_invalid_1.out', partly_invalid_nexe, |
- exit_status=validation_failure_status) |
-env.AddNodeToTestSuite(node, test_suites, 'run_without_stubout_1_test', |
- is_broken=is_validation_disabled) |
- |
-# With "-c", the executable runs to completion but is not safe. |
-node = env.CommandSelLdrTestNacl( |
- 'partly_invalid_2.out', partly_invalid_nexe, |
- stdout_golden=env.File('without_stubout.stdout'), |
- sel_ldr_flags=['-c']) |
-env.AddNodeToTestSuite(node, test_suites, 'run_without_stubout_2_test') |
- |
-# With "-s", the executable runs part way but then faults. |
- |
-if env.Bit('target_mips32'): |
- partly_invalid_exit_status = 'sigtrap' |
-else: |
- partly_invalid_exit_status = 'untrusted_sigsegv' |
- |
-# Valgrind and ASan interfere with the exit status |
-testing_on_asan_or_valgrind = (env.Bit('running_on_valgrind') or |
- env.Bit('asan')) |
-node = env.CommandSelLdrTestNacl( |
- 'partly_invalid_3.out', partly_invalid_nexe, |
- stdout_golden=env.File('with_stubout.stdout'), |
- sel_ldr_flags=['-s'], |
- exit_status=partly_invalid_exit_status) |
-env.AddNodeToTestSuite(node, test_suites, 'run_stubout_mode_test', |
- is_broken=testing_on_asan_or_valgrind) |
- |
-# Using the standalone ncval_stubout tool to rewrite the executable |
-# offline should be equivalent to using sel_ldr's "-s" option. |
-# This tool exists only for x86. |
-node = env.CommandSelLdrTestNacl( |
- 'partly_invalid_stubout.out', |
- partly_invalid_stubout_nexe, |
- stdout_golden=env.File('with_stubout.stdout'), |
- exit_status='untrusted_sigsegv') |
-env.AddNodeToTestSuite(node, test_suites, 'run_offline_stubout_test', |
- is_broken=(env.Bit('target_mips32') or |
- testing_on_asan_or_valgrind)) |