Commit ca3d3039 authored by Alp Mestanogullari's avatar Alp Mestanogullari 🦑 Committed by Ben Gamari
Browse files

Fix another batch of `./validate --slow` failures

A rather detailed summary can be found at:

This doesn't fix all expectation mismatches yet, but we're down to about
20 mismatches with my previous patch and this one, as opposed to ~150
when I got started.

Test Plan: ./validate --slow

Reviewers: bgamari, erikd, simonmar

Reviewed By: simonmar

Subscribers: thomie, carter

GHC Trac Issues: #14890

Differential Revision:
parent 8f3c149d
......@@ -24,5 +24,5 @@ def ignoreLdOutput(str):
[extra_files(['A.hs', 'B/', 'MainA.hs', 'Setup.lhs', 'c_src/', 'hello.c', 'test.cabal']),
['$MAKE -s --no-print-directory cabal01 VANILLA=' + vanilla + ' PROF=' + prof + ' DYN=' + dyn + ' ' + cleanup])
......@@ -10,7 +10,14 @@ test('RaeBlogPost', normal, compile, [''])
test('mkGADTVars', normal, compile, [''])
test('TypeLevelVec',normal,compile, [''])
test('T9632', normal, compile, [''])
test('dynamic-paper', normal, compile, ['']) # see #11330
# The dynamic-paper test fails in the profasm way if we don't increase
# the simplifier tick limit. If we do, we run out of stack
# space. If we increase the stack size enough with -K,
# we run out of simplifier ticks again. This is
# discussed in #11330.
expect_broken_for(11330, ['profasm']),
compile, [''])
test('T11311', normal, compile, [''])
test('T11405', normal, compile, [''])
test('T11241', normal, compile, [''])
test('T3007', [extra_files(['A/', 'B/'])], run_command, ['$MAKE -s --no-print-directory T3007'])
extra_files(['A/', 'B/']),
['$MAKE -s --no-print-directory T3007'])
......@@ -273,4 +273,8 @@ test('json', normal, compile_fail, ['-ddump-json'])
test('json2', normal, compile, ['-ddump-types -ddump-json'])
test('T13604', [], run_command, ['$MAKE -s --no-print-directory T13604'])
test('T13604a', [], run_command, ['$MAKE -s --no-print-directory T13604a'])
test('inline-check', normal, compile, ['-dinline-check foo -O -ddebug-output'])
# omitting hpc and profasm because they affect the
# inlining and unfoldings
test('inline-check', omit_ways(['hpc', 'profasm'])
, compile
, ['-dinline-check foo -O -ddebug-output'])
......@@ -14,7 +14,15 @@ test('T5664', normal, compile_fail, ['-v0'])
test('T7506', normal, compile_fail, [''])
test('T7243', normal, compile_fail, [''])
test('T10461', normal, compile_fail, [''])
test('UnsafeReenter', [omit_ways(['ghciext', 'ghci']), exit_code(1)], compile_and_run, ['-v0 UnsafeReenterC.c'])
# UnsafeReenter seems to just hang instead of erroring out
# with the threaded1, threaded2 and profthreaded ways,
# see #14912.
[omit_ways(['ghciext', 'ghci']),
expect_broken_for(14912, ['threaded1', 'threaded2', 'profthreaded'])
], compile_and_run, ['-v0 UnsafeReenterC.c'])
[exit_code(1), extra_files(['UnsafeReenter.hs', 'UnsafeReenterC.c']), expect_broken(13730)],
......@@ -192,8 +192,14 @@ test('T7489', normal, compile, [''])
test('T7585', normal, compile, [''])
test('T7282', normal, compile, [''])
test('T7804', normal, compile, [''])
test('T7837', expect_broken_for(9406, prof_ways), compile,
# This test has sometimes been marked as
# expect_broken_for(9406, prof_ways),
# so ticket #9406 can be used to track
# future failures as well.
test('T7837', normal, compile,
['-O -ddump-rule-firings'])
test('T4185', normal, compile, [''])
# Caused infinite loop in the compiler
test('T7116', normal, run_command, ['$MAKE -s --no-print-directory T7116'])
test('T7895', normal, compile, [''])
test('T7881', normal, compile, [''])
# For T8542, the hpc way adds extra annotations that prevent
# the appropriate expression to be detected, after
# desugaring, so we don't get the warning we expect.
test('T8542', omit_ways(['hpc']), compile, [''])
test('T10929', normal, compile, [''])
# Test that importing COMPLETE sets from external packages works
test('T13350', extra_files(['T13350.hs', 'boolean']), run_command,
extra_files(['T13350.hs', 'boolean']),
['$MAKE -s --no-print-directory T13350'])
......@@ -64,7 +64,7 @@ T9405:
define run_T5435_v
$(RM) T5435_load_v_$(1) T5435_v_$(1)$(exeext)
'$(TEST_HC)' $(TEST_HC_OPTS) -optc-D$(HostOS)_HOST_OS -v0 -c T5435_$(1).c -o T5435_load_v_$(1).o
'$(TEST_HC)' $(TEST_HC_OPTS) -optc-D$(HostOS)_HOST_OS -optc-DLOAD_CONSTR=$(2) -v0 -c T5435_$(1).c -o T5435_load_v_$(1).o
'$(TEST_HC)' $(TEST_HC_OPTS) -v0 T5435.hs -osuf main_v_$(1)_o -o T5435_v_$(1)$(exeext)
./T5435_v_$(1) v ./T5435_load_v_$(1).o
......@@ -78,11 +78,13 @@ endef
.PHONY: T5435_v_gcc
T5435_v_gcc :
$(call run_T5435_v,gcc)
$(call run_T5435_v,gcc,0)
.PHONY: T5435_v_asm
T5435_v_asm :
$(call run_T5435_v,asm)
.PHONY: T5435_v_asm_a T5435_v_asm_b
T5435_v_asm_a :
$(call run_T5435_v,asm,0)
T5435_v_asm_b :
$(call run_T5435_v,asm,1)
.PHONY: T5435_dyn_gcc
T5435_dyn_gcc :
......@@ -33,17 +33,19 @@ static void (*mod_init_func[2])(void) __attribute__((
#else /* ELF */
#if LOAD_CONSTR == 0
static void (*const init_array[2])(void) __attribute__((
section(".init_array"), // put it in the right section
used, // prevent GCC from optimizing this away
aligned(sizeof(void*)) // avoid slop between GCC's preloaded initializers and ours
= {initArray1, initArray2};
static void (*ctors[2])(void) __attribute__((
= {ctors2, ctors1}; // ctors run in reverse
\ No newline at end of file
\ No newline at end of file
......@@ -174,14 +174,7 @@ def checkDynAsm(actual_file, normaliser):
actual_raw = read_no_crs(actual_file)
actual_str = normaliser(actual_raw)
actual = actual_str.split()
if actual == ['initArray1', 'initArray2', 'ctors1', 'ctors2', 'success']:
return 1
elif actual == ['initArray1', 'initArray2', 'ctors2', 'ctors1', 'success']:
# gold seems to produce this ordering; this is slightly odd but if it's
# wrong it's not our fault. See #13883.
return 1
elif actual == ['ctors1', 'ctors2', 'initArray1', 'initArray2', 'success']:
if_verbose(1, 'T5435_dyn_asm detected old-style dlopen, see #8458')
if actual == ['initArray1', 'initArray2', 'success']:
return 1
elif opsys('darwin') and actual == ['modInitFunc1', 'modInitFunc2', 'success']:
return 1
......@@ -191,13 +184,22 @@ def checkDynAsm(actual_file, normaliser):
if_verbose(1, 'T5435_dyn_asm failed with %s, see all.T for details' % actual)
return 0
# T5435_v_asm got split into two tests because depending
# on the linker, .init_array and .ctors sections are loaded
# in a different order (but all entries within a section
# do get loaded in a deterministic order). So we test each
# separately now.
# These should have extra_clean() arguments, but I need
# to somehow extract out the name of DLLs to do that
test('T5435_v_asm', [extra_files(['T5435.hs', 'T5435_asm.c']),
test('T5435_v_asm_a', [extra_files(['T5435.hs', 'T5435_asm.c']),
when(arch('powerpc64') or arch('powerpc64le'),
run_command, ['$MAKE -s --no-print-directory T5435_v_asm'])
run_command, ['$MAKE -s --no-print-directory T5435_v_asm_a'])
# this one just needs to run on linux, as darwin/mingw32 are covered
# by the _a test already.
test('T5435_v_asm_b', [extra_files(['T5435.hs', 'T5435_asm.c']),
when(opsys('darwin') or opsys('mingw32'), skip)],
run_command, ['$MAKE -s --no-print-directory T5435_v_asm_b'])
test('T5435_v_gcc', [extra_files(['T5435.hs', 'T5435_gcc.c']),
when(arch('powerpc64') or arch('powerpc64le'),
......@@ -382,7 +384,12 @@ test('T12497', [ unless(opsys('mingw32'), skip)
run_command, ['$MAKE -s --no-print-directory T12497'])
test('T12903', [when(opsys('mingw32'), skip)], compile_and_run, [''])
test('T12903', [ when(opsys('mingw32'), skip)
# produces out of sequence samples in the profasm way
, expect_broken_for(15065, ['profasm'])
, omit_ways(['ghci'])
], compile_and_run, [''])
test('T13832', exit_code(1), compile_and_run, ['-threaded'])
test('T13894', normal, compile_and_run, [''])
test('T14497', normal, compile_and_run, ['-O'])
......@@ -591,7 +591,11 @@ test('MissingExportList01', normal, compile, [''])
test('MissingExportList02', normal, compile, [''])
test('T14488', normal, compile, [''])
test('T14590', normal, compile, ['-fdefer-type-errors -fno-max-valid-substitutions'])
test('T13032', omit_ways(['hpc']), compile, [''])
# We omit the hpc/profasm ways because this test checks the
# desugarer's output and these ways add some
# annotations/ticks that prevent it from giving the exact
# output we expect (T13032.stderr).
test('T13032', omit_ways(['hpc', 'profasm']), compile, [''])
test('T14273', normal, compile, ['-fdefer-type-errors -fno-max-valid-substitutions'])
test('T14732', normal, compile, [''])
test('T14774', [], run_command, ['$MAKE -s --no-print-directory T14774'])
......@@ -114,9 +114,16 @@ test('TypeOf', normal, compile_and_run, [''])
test('TypeRep', normal, compile_and_run, [''])
test('T11120', normal, compile_and_run, [''])
test('KindInvariant', normal, ghci_script, ['KindInvariant.script'])
# We omit the ghci way in these 3 tests because they use
# unboxed sums and ghci does not support those yet.
test('StrictPats', omit_ways(['ghci']), compile_and_run, [''])
test('T12809', omit_ways(['ghci']), compile_and_run, [''])
test('EtaExpandLevPoly', omit_ways(['ghci']), compile_and_run, [''])
test('EtaExpandLevPoly', [ omit_ways(['ghci'])
# triggers a core lint error in profiled ways
, expect_broken_for(15066, ['profasm', 'profthreaded'])
], compile_and_run, [''])
test('TestTypeableBinary', normal, compile_and_run, [''])
test('Typeable1', normal, compile_fail, [''])
test('TypeableEq', normal, compile_and_run, [''])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment