diff options
author | Alp Mestanogullari <alp@well-typed.com> | 2018-05-13 18:38:18 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-05-13 22:22:43 -0400 |
commit | ca3d3039386b145ae2835ca563b4c5a3497c25c9 (patch) | |
tree | 1c72f0eb51238d512de1e9f5989d7c3fc5ade1b9 | |
parent | 8f3c149d94814e4f278b08c562f06fc257eb3c43 (diff) | |
download | haskell-ca3d3039386b145ae2835ca563b4c5a3497c25c9.tar.gz |
Fix another batch of `./validate --slow` failures
A rather detailed summary can be found at:
https://gist.github.com/alpmestan/be82b47bb88b7dc9ff84105af9b1bb82
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: https://phabricator.haskell.org/D4636
18 files changed, 88 insertions, 29 deletions
diff --git a/testsuite/tests/cabal/cabal01/all.T b/testsuite/tests/cabal/cabal01/all.T index 8da74f5eed..9bf2eb13d5 100644 --- a/testsuite/tests/cabal/cabal01/all.T +++ b/testsuite/tests/cabal/cabal01/all.T @@ -24,5 +24,5 @@ def ignoreLdOutput(str): test('cabal01', [extra_files(['A.hs', 'B/', 'MainA.hs', 'Setup.lhs', 'c_src/', 'hello.c', 'test.cabal']), normalise_errmsg_fun(ignoreLdOutput)], - run_command, + run_command, ['$MAKE -s --no-print-directory cabal01 VANILLA=' + vanilla + ' PROF=' + prof + ' DYN=' + dyn + ' ' + cleanup]) diff --git a/testsuite/tests/dependent/should_compile/all.T b/testsuite/tests/dependent/should_compile/all.T index 5874d2e936..65853169bd 100644 --- a/testsuite/tests/dependent/should_compile/all.T +++ b/testsuite/tests/dependent/should_compile/all.T @@ -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. +test('dynamic-paper', + expect_broken_for(11330, ['profasm']), + compile, ['']) test('T11311', normal, compile, ['']) test('T11405', normal, compile, ['']) test('T11241', normal, compile, ['']) diff --git a/testsuite/tests/driver/T3007/all.T b/testsuite/tests/driver/T3007/all.T index bd9046cdd8..803357ba02 100644 --- a/testsuite/tests/driver/T3007/all.T +++ b/testsuite/tests/driver/T3007/all.T @@ -1 +1,4 @@ -test('T3007', [extra_files(['A/', 'B/'])], run_command, ['$MAKE -s --no-print-directory T3007']) +test('T3007', + extra_files(['A/', 'B/']), + run_command, + ['$MAKE -s --no-print-directory T3007']) diff --git a/testsuite/tests/driver/all.T b/testsuite/tests/driver/all.T index ba177c1ef7..714b6c4a1a 100644 --- a/testsuite/tests/driver/all.T +++ b/testsuite/tests/driver/all.T @@ -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']) diff --git a/testsuite/tests/ffi/should_fail/all.T b/testsuite/tests/ffi/should_fail/all.T index 944f172c02..ce72f177c3 100644 --- a/testsuite/tests/ffi/should_fail/all.T +++ b/testsuite/tests/ffi/should_fail/all.T @@ -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. +test('UnsafeReenter', + [omit_ways(['ghciext', 'ghci']), + exit_code(1), + expect_broken_for(14912, ['threaded1', 'threaded2', 'profthreaded']) + ], compile_and_run, ['-v0 UnsafeReenterC.c']) test('UnsafeReenterGhci', [exit_code(1), extra_files(['UnsafeReenter.hs', 'UnsafeReenterC.c']), expect_broken(13730)], run_command, diff --git a/testsuite/tests/indexed-types/should_compile/all.T b/testsuite/tests/indexed-types/should_compile/all.T index 1a5e5d4f5c..6074a3597e 100644 --- a/testsuite/tests/indexed-types/should_compile/all.T +++ b/testsuite/tests/indexed-types/should_compile/all.T @@ -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 diff --git a/testsuite/tests/numeric/should_compile/all.T b/testsuite/tests/numeric/should_compile/all.T index 56e319ffed..e7bc4c64c4 100644 --- a/testsuite/tests/numeric/should_compile/all.T +++ b/testsuite/tests/numeric/should_compile/all.T @@ -1,5 +1,8 @@ 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, ['']) diff --git a/testsuite/tests/patsyn/should_compile/T13350/all.T b/testsuite/tests/patsyn/should_compile/T13350/all.T index fa63e37c6f..e8d82a7a9a 100644 --- a/testsuite/tests/patsyn/should_compile/T13350/all.T +++ b/testsuite/tests/patsyn/should_compile/T13350/all.T @@ -1,4 +1,6 @@ # Test that importing COMPLETE sets from external packages works -test('T13350', extra_files(['T13350.hs', 'boolean']), run_command, +test('T13350', + extra_files(['T13350.hs', 'boolean']), + run_command, ['$MAKE -s --no-print-directory T13350']) diff --git a/testsuite/tests/rts/Makefile b/testsuite/tests/rts/Makefile index 630508542d..5077f325c1 100644 --- a/testsuite/tests/rts/Makefile +++ b/testsuite/tests/rts/Makefile @@ -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 endef @@ -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 : diff --git a/testsuite/tests/rts/T5435_asm.c b/testsuite/tests/rts/T5435_asm.c index 59b53b1c3e..90813aa839 100644 --- a/testsuite/tests/rts/T5435_asm.c +++ b/testsuite/tests/rts/T5435_asm.c @@ -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}; - +#else static void (*ctors[2])(void) __attribute__(( section(".ctors"), used, aligned(sizeof(void*)))) = {ctors2, ctors1}; // ctors run in reverse +#endif #endif diff --git a/testsuite/tests/rts/T5435_dyn_asm.stdout b/testsuite/tests/rts/T5435_dyn_asm.stdout index 1893d0f56a..429c314309 100644 --- a/testsuite/tests/rts/T5435_dyn_asm.stdout +++ b/testsuite/tests/rts/T5435_dyn_asm.stdout @@ -1,5 +1,3 @@ initArray1 initArray2 -ctors1 -ctors2 success diff --git a/testsuite/tests/rts/T5435_v_asm_a.stdout b/testsuite/tests/rts/T5435_v_asm_a.stdout new file mode 100644 index 0000000000..3124fa8559 --- /dev/null +++ b/testsuite/tests/rts/T5435_v_asm_a.stdout @@ -0,0 +1,3 @@ +initArray1 +initArray2 +success
\ No newline at end of file diff --git a/testsuite/tests/rts/T5435_v_asm.stdout-darwin b/testsuite/tests/rts/T5435_v_asm_a.stdout-darwin index 8827792585..8827792585 100644 --- a/testsuite/tests/rts/T5435_v_asm.stdout-darwin +++ b/testsuite/tests/rts/T5435_v_asm_a.stdout-darwin diff --git a/testsuite/tests/rts/T5435_v_asm.stdout-mingw32 b/testsuite/tests/rts/T5435_v_asm_a.stdout-mingw32 index 293bd12fb0..293bd12fb0 100644 --- a/testsuite/tests/rts/T5435_v_asm.stdout-mingw32 +++ b/testsuite/tests/rts/T5435_v_asm_a.stdout-mingw32 diff --git a/testsuite/tests/rts/T5435_v_asm_b.stdout b/testsuite/tests/rts/T5435_v_asm_b.stdout new file mode 100644 index 0000000000..318d66e12b --- /dev/null +++ b/testsuite/tests/rts/T5435_v_asm_b.stdout @@ -0,0 +1,3 @@ +ctors1 +ctors2 +success
\ No newline at end of file diff --git a/testsuite/tests/rts/all.T b/testsuite/tests/rts/all.T index 8fa2257b1c..a07179a4df 100644 --- a/testsuite/tests/rts/all.T +++ b/testsuite/tests/rts/all.T @@ -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'), expect_broken(11259))], - 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'), expect_broken(11259))], @@ -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']) diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T index 6a680f6290..f4f48d27ae 100644 --- a/testsuite/tests/typecheck/should_compile/all.T +++ b/testsuite/tests/typecheck/should_compile/all.T @@ -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']) diff --git a/testsuite/tests/typecheck/should_run/all.T b/testsuite/tests/typecheck/should_run/all.T index c4eb3dfcda..3cf70b6b32 100755 --- a/testsuite/tests/typecheck/should_run/all.T +++ b/testsuite/tests/typecheck/should_run/all.T @@ -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, ['']) |