| OLD | NEW |
| 1 # -*- python -*- | 1 # -*- python -*- |
| 2 # Copyright 2010 The Native Client Authors. All rights reserved. | 2 # Copyright 2010 The Native Client Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can | 3 # Use of this source code is governed by a BSD-style license that can |
| 4 # be found in the LICENSE file. | 4 # be found in the LICENSE file. |
| 5 | 5 |
| 6 | 6 |
| 7 Import('env') | 7 Import('env') |
| 8 | 8 |
| 9 prog_env = env.Clone() | 9 prog_env = env.Clone() |
| 10 | 10 |
| 11 if prog_env.Bit('bitcode'): | 11 if prog_env.Bit('bitcode'): |
| 12 prog_env.AddBiasForPNaCl() | 12 prog_env.AddBiasForPNaCl() |
| 13 | 13 |
| 14 prog_env.ComponentProgram('execute_data.nexe', ['execute_data.c']) | 14 nexe = prog_env.ComponentProgram('execute_data', ['execute_data.c']) |
| 15 | 15 |
| 16 # We check the output to ensure that the process doesn't die for an | 16 # We check the output to ensure that the process doesn't die for an |
| 17 # unexpected reason. | 17 # unexpected reason. |
| 18 node = prog_env.CommandSelLdrTestNacl( | 18 node = prog_env.CommandSelLdrTestNacl( |
| 19 'execute_data.out', | 19 'execute_data.out', |
| 20 command=[prog_env.File('execute_data.nexe')], | 20 nexe, |
| 21 exit_status='untrusted_sigsegv_or_equivalent', | 21 exit_status='untrusted_sigsegv_or_equivalent', |
| 22 stdout_golden=prog_env.File('execute_data.stdout')) | 22 stdout_golden=prog_env.File('execute_data.stdout')) |
| 23 | 23 |
| 24 # This test does not work under qemu-arm because qemu-arm does not | 24 # This test does not work under qemu-arm because qemu-arm does not |
| 25 # support the NX page protection bit. | 25 # support the NX page protection bit. |
| 26 is_broken = prog_env.Bit('target_arm') and prog_env.UsingEmulator() | 26 is_broken = prog_env.Bit('target_arm') and prog_env.UsingEmulator() |
| 27 | 27 |
| 28 # This test also fails on ARM machines running Linux versions before | 28 # This test also fails on ARM machines running Linux versions before |
| 29 # 2.6.32.9, which don't handle the fault properly. The fault causes | 29 # 2.6.32.9, which don't handle the fault properly. The fault causes |
| 30 # the process to hang rather than receive a signal. | 30 # the process to hang rather than receive a signal. |
| 31 # TODO(mseaborn): Re-enable when the ARM Buildbot slave has been | 31 # TODO(mseaborn): Re-enable when the ARM Buildbot slave has been |
| 32 # upgraded to a newer kernel. | 32 # upgraded to a newer kernel. |
| 33 is_broken = prog_env.Bit('target_arm') | 33 is_broken = prog_env.Bit('target_arm') |
| 34 | 34 |
| 35 # 64-bit Ubuntu Hardy (Linux) on VMWare also seems to have problems | 35 # 64-bit Ubuntu Hardy (Linux) on VMWare also seems to have problems |
| 36 # with NX page protection, but later versions of Ubuntu are OK on | 36 # with NX page protection, but later versions of Ubuntu are OK on |
| 37 # VMWare, and 64-bit Hardy is OK on real hardware. | 37 # VMWare, and 64-bit Hardy is OK on real hardware. |
| 38 if not prog_env.Bit('disable_hardy64_vmware_failures'): | 38 if not prog_env.Bit('disable_hardy64_vmware_failures'): |
| 39 prog_env.AddNodeToTestSuite(node, ['small_tests'], 'run_execute_data_test', | 39 prog_env.AddNodeToTestSuite(node, ['small_tests'], 'run_execute_data_test', |
| 40 is_broken=is_broken) | 40 is_broken=is_broken) |
| OLD | NEW |