2 # Copyright (c) 2013 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
8 if 'TRUSTED_ENV' not in env:
10 trusted_env = env['TRUSTED_ENV']
12 # This test uses a nexe built by another test. Nexes do not get
13 # staged in pexe mode, so only run this test in nonpexe mode.
14 if env.Bit('pnacl_generate_pexe'):
17 # The log message that this test looks for is in
18 # src/trusted/service_runtime/elf_util.c.
19 node = env.CommandSelLdrTestNacl(
20 'mmap_main_nexe_test.out',
21 env.File('${STAGING_DIR}/hello_world.nexe'),
22 osenv=['NACL_FAULT_INJECTION=' +
23 'ELF_LOAD_BYPASS_DESCRIPTOR_SAFETY_CHECK=GF1/999:' +
24 'ELF_LOAD_FORCE_VALIDATION_STATUS=GF0',
26 filter_regex='"(NaClElfFileMapSegment: EXERCISING MMAP LOAD PATH)"',
27 filter_group_only='true',
28 stderr_golden=env.File('mmap_main_nexe.stderr'))
30 # This test is broken on the memcheck bots, where Valgrind dies with an
33 # valgrind: m_debuginfo/readelf.c:1445
34 # (vgModuleLocal_read_elf_debug_info): Assertion 'rw_svma_limit != 0'
36 env.AddNodeToTestSuite(node, ['small_tests', 'nonpexe_tests'],
37 'run_mmap_main_nexe_test',
38 is_broken=env.Bit('running_on_valgrind'))
40 node = env.SelUniversalTest(
41 'mmap_main_nexe_rpc_test.out',
42 env.File('${STAGING_DIR}/hello_world.nexe'),
43 sel_universal_flags=['--no_app_channel'],
44 osenv=['NACL_FAULT_INJECTION=' +
45 'validation_cache_replacement_bypass=GF1/9999',
47 filter_regex='"(NaClElfFileMapSegment: EXERCISING MMAP LOAD PATH)"',
48 filter_group_only='true',
49 stderr_golden=env.File('mmap_main_nexe_rpc.stderr'))
51 env.AddNodeToTestSuite(node, ['small_tests', 'nonpexe_tests'],
52 'run_mmap_main_nexe_rpc_test',
53 is_broken=env.Bit('running_on_valgrind'))