Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / native_client / tests / mmap_main_nexe / nacl.scons
1 # -*- python -*-
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.
5
6 Import('env')
7
8 if 'TRUSTED_ENV' not in env:
9   Return()
10 trusted_env = env['TRUSTED_ENV']
11
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'):
15   Return()
16
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',
25            'NACLVERBOSITY=1'],
26     filter_regex='"(NaClElfFileMapSegment: EXERCISING MMAP LOAD PATH)"',
27     filter_group_only='true',
28     stderr_golden=env.File('mmap_main_nexe.stderr'))
29
30 # This test is broken on the memcheck bots, where Valgrind dies with an
31 # assertion failure:
32 #
33 # valgrind: m_debuginfo/readelf.c:1445
34 # (vgModuleLocal_read_elf_debug_info): Assertion 'rw_svma_limit != 0'
35 # failed.
36 env.AddNodeToTestSuite(node, ['small_tests', 'nonpexe_tests'],
37                        'run_mmap_main_nexe_test',
38                        is_broken=env.Bit('running_on_valgrind'))
39
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',
46          'NACLVERBOSITY=1'],
47   filter_regex='"(NaClElfFileMapSegment: EXERCISING MMAP LOAD PATH)"',
48   filter_group_only='true',
49   stderr_golden=env.File('mmap_main_nexe_rpc.stderr'))
50
51 env.AddNodeToTestSuite(node, ['small_tests', 'nonpexe_tests'],
52                        'run_mmap_main_nexe_rpc_test',
53                        is_broken=env.Bit('running_on_valgrind'))