all.T 4.6 KB
Newer Older
1
test('testblockalloc', compose(c_src, 
2
                       compose(only_ways(['normal','threaded1']),
3
                               extra_run_opts('+RTS -I0'))), 
4
                       compile_and_run, [''])
Simon Marlow's avatar
Simon Marlow committed
5
6
7
8
9


# See bug #101, test requires +RTS -c (or equivalently +RTS -M<something>)
# only GHCi triggers the bug, but we run the test all ways for completeness.
test('bug1010', normal, compile_and_run, ['+RTS -c -RTS'])
10
test('derefnull',
11
     composes([
dterei's avatar
dterei committed
12
13
14
15
             # LLVM Optimiser considers dereference of a null pointer
             # undefined and marks the code as unreachable which means
             # that later optimisations remove it altogether.
             omit_ways(['optllvm']),
16
17
18
19
20
21
             # SIGSEGV on Linux (which we make the default)
             exit_code(139),
             # Apparently the output can be different on different
             # Linux setups, so just ignore it. As long as we get
             # the right exit code we're OK.
             if_os('linux', ignore_output),
22
23
24
             # SIGBUS on OX X (PPC and x86 only; amd64 gives SEGV)
             if_platform('i386-apple-darwin', exit_code(138)),
             if_platform('powerpc-apple-darwin', exit_code(138)),
25
             if_platform('i386-unknown-mingw32', exit_code(1))]),
26
27
     compile_and_run, [''])
test('divbyzero',
28
     composes([
29
             # SIGFPE on Linux
30
31
32
33
34
35
             exit_code(136),
             # Apparently the output can be different on different
             # Linux setups, so just ignore it. As long as we get
             # the right exit code we're OK.
             if_os('linux', ignore_output),
             if_platform('i386-unknown-mingw32', exit_code(1))]),
36
     compile_and_run, [''])
Simon Marlow's avatar
Simon Marlow committed
37

38
test('outofmem', normal, run_command, ['$MAKE -s --no-print-directory outofmem'])
39
test('outofmem2', extra_run_opts('+RTS -M5m -RTS'),
40
                  run_command, ['$MAKE -s --no-print-directory outofmem2'])
Simon Marlow's avatar
Simon Marlow committed
41
42
43

test('2047', compose(ignore_output, extra_run_opts('+RTS -c -RTS')),
             compile_and_run, ['-package containers'])
Simon Marlow's avatar
Simon Marlow committed
44
45
46
47

# Blackhole-detection test.
# Skip GHCi due to #2786
test('2783', [ omit_ways(['ghci']), exit_code(1) ], compile_and_run, [''])
48
49
50

# Test the work-stealing deque implementation.  We run this test in
# both threaded1 (-threaded -debug) and threaded2 (-threaded) ways.
51
test('testwsdeque', [unless_in_tree_compiler(skip),
Simon Marlow's avatar
Simon Marlow committed
52
                    c_src, only_ways(['threaded1', 'threaded2'])],
Simon Marlow's avatar
Simon Marlow committed
53
                    compile_and_run, ['-I../../../../rts'])
Simon Marlow's avatar
Simon Marlow committed
54
55

test('3236', [c_src, only_ways(['normal','threaded1']), exit_code(1)], compile_and_run, [''])
Simon Marlow's avatar
Simon Marlow committed
56
57
58

test('stack001', extra_run_opts('+RTS -K32m -RTS'), compile_and_run, [''])
test('stack002', extra_run_opts('+RTS -K32m -k4m -RTS'), compile_and_run, [''])
59

60
61
62
63
64
65
# run this test with very small stack chunks to exercise the stack
# overflow/underflow machinery.
test('stack003', [ omit_ways('ghci'), # uses unboxed tuples
                   extra_run_opts('500000 +RTS -kc1k -kb100 -K96m -RTS') ],
                 compile_and_run, [''])

66
test('atomicinc', [ c_src, only_ways(['normal']) ], compile_and_run, [''])
Simon Marlow's avatar
Simon Marlow committed
67
68
69
70

test('3424', # it's slow:
             [ skip_if_fast, only_ways(['normal','threaded1','ghci']) ],
             compile_and_run, [''])
Simon Marlow's avatar
Simon Marlow committed
71
72

# Test for out-of-range heap size
73
test('rtsflags001', [ only_ways(['normal']), exit_code(1), extra_run_opts('+RTS -H0m -RTS') ], compile_and_run, [''])
74
75

# Test to see if linker scripts link properly to real ELF files
Ian Lynagh's avatar
Ian Lynagh committed
76
77
test('T2615',
     [ if_platform('i386-unknown-mingw32',skip),
78
79
       # OS X doesn't seem to support linker scripts
       if_os('darwin', skip),
80
81
       # Solaris' linker does not support GNUish linker scripts
       if_os('solaris2', skip),
Ian Lynagh's avatar
Ian Lynagh committed
82
83
84
85
86
87
88
       cmd_prefix('$MAKE T2615-prep && ' +
                  # Add current directory to dlopen search path
                  'LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. '),
       extra_clean(['libfoo_T2615.so'])],
     compile_and_run,
     ['-package ghc'])

89
90
91
92
# omit dyn and profiling ways, because we don't build dyn_l or p_l
# variants of the RTS by default
test('traceEvent', [ omit_ways(['dyn'] + prof_ways), 
                     extra_run_opts('+RTS -ls -RTS') ], 
93
                   compile_and_run, ['-eventlog'])
Ian Lynagh's avatar
Ian Lynagh committed
94
95

test('T4059', normal, run_command, ['$MAKE -s --no-print-directory T4059'])
Simon Marlow's avatar
Simon Marlow committed
96

97
# Test for #4274
Simon Marlow's avatar
Simon Marlow committed
98
99
100
101
102
test('exec_signals', [
     if_platform('i386-unknown-mingw32',skip),
     cmd_prefix('$MAKE exec_signals-prep && ./exec_signals_prepare'),
     extra_clean(['exec_signals_child', 'exec_signals_prepare'])
    ], compile_and_run, [''])
103
104

test('return_mem_to_os', normal, compile_and_run, [''])
Simon Marlow's avatar
Simon Marlow committed
105
106
107

test('4850', extra_clean(['4850.o','4850.hi','4850']),
             run_command, ['$MAKE -s --no-print-directory 4850'])