[Git][ghc/ghc][wip/slowtest] 10 commits: Bump unix submodule

Ben Gamari gitlab at gitlab.haskell.org
Sun Jun 9 14:44:00 UTC 2019



Ben Gamari pushed to branch wip/slowtest at Glasgow Haskell Compiler / GHC


Commits:
6a22056e by Ben Gamari at 2019-06-09T14:43:52Z
Bump unix submodule

Marks posix002 as fragile in threaded2 way due to #16550.

- - - - -
aab7517d by Ben Gamari at 2019-06-09T14:43:52Z
testsuite: Fix omit_ways usage

omit_ways expects a list but this was broken in several cases.

- - - - -
b967b91b by Ben Gamari at 2019-06-09T14:43:52Z
testsuite: Mark threadstatus-T9333 as fragile in ghci way

As noted in #16555.

- - - - -
03b03fe9 by Ben Gamari at 2019-06-09T14:43:52Z
testsuite: Omit profasm way for cc017

cc017 requires TH but we can't load dynamic profiled objects.

- - - - -
27448d82 by Ben Gamari at 2019-06-09T14:43:52Z
testsuite: Skip T493 in ghci way.

T493 tests #493, which is an FFI test. FFI tests should be skipped
in ghci way.

- - - - -
3cd9488e by Ben Gamari at 2019-06-09T14:43:52Z
testsuite: Mark T16449_2 as broken due to #16742

- - - - -
2ce39c58 by Ben Gamari at 2019-06-09T14:43:52Z
testsuite: Mark T16737 as broken in ghci way due to #16541

- - - - -
f48ca831 by Ben Gamari at 2019-06-09T14:43:52Z
testsuite: Fix typo in flags of T7130

- - - - -
8a65b80e by Ben Gamari at 2019-06-09T14:43:52Z
Fix uses of #ifdef/#ifndef

The linter now enforces our preference for `#if defined()` and
`#if !defined()`.

- - - - -
0d999cbb by Ben Gamari at 2019-06-09T14:43:52Z
linters/check-makefiles: Limit lint to Makefiles

Previously we would apply this rule, which is only intended for
testsuite Makefiles, to all files. This lead to a number of
false-positives in all.T files.

- - - - -


17 changed files:

- .gitlab/linters/check-makefiles.py
- .gitlab/linters/linter.py
- aclocal.m4
- hadrian/src/Rules/Generate.hs
- includes/ghc.mk
- libraries/unix
- testsuite/driver/testlib.py
- testsuite/tests/codeGen/should_run/all.T
- testsuite/tests/concurrent/should_run/all.T
- testsuite/tests/driver/all.T
- testsuite/tests/ffi/should_compile/all.T
- testsuite/tests/ffi/should_run/all.T
- testsuite/tests/lib/integer/all.T
- testsuite/tests/programs/barton-mangler-bug/test.T
- testsuite/tests/rts/all.T
- testsuite/tests/typecheck/should_run/all.T
- testsuite/tests/utils/should_run/all.T


Changes:

=====================================
.gitlab/linters/check-makefiles.py
=====================================
@@ -12,7 +12,8 @@ from linter import run_linters, RegexpLinter
 
 linters = [
     RegexpLinter(r'--interactive',
-                 message = "Warning: Use `$(TEST_HC_OPTS_INTERACTIVE)` instead of `--interactive -ignore-dot-ghci -v0`.")
+                 message = "Warning: Use `$(TEST_HC_OPTS_INTERACTIVE)` instead of `--interactive -ignore-dot-ghci -v0`.",
+                 path_filter = lambda path: path == 'Makefile')
 ]
 
 if __name__ == '__main__':


=====================================
.gitlab/linters/linter.py
=====================================
@@ -73,13 +73,14 @@ class RegexpLinter(LineLinter):
     A :class:`RegexpLinter` produces the given warning message for
     all lines matching the given regular expression.
     """
-    def __init__(self, regex, message):
+    def __init__(self, regex, message, path_filter=lambda path: True):
         LineLinter.__init__(self)
         self.re = re.compile(regex)
         self.message = message
+        self.path_filter = path_filter
 
     def lint_line(self, path, line_no, line):
-        if self.re.search(line):
+        if self.path_filter(path) and self.re.search(line):
             w = Warning(path=path, line_no=line_no, line_content=line[:-1],
                         message=self.message)
             self.add_warning(w)


=====================================
aclocal.m4
=====================================
@@ -866,7 +866,7 @@ case $TargetPlatform in
       esac ;;
     i386-unknown-mingw32) fptools_cv_leading_underscore=yes;;
     x86_64-unknown-mingw32) fptools_cv_leading_underscore=no;;
-    *) AC_RUN_IFELSE([AC_LANG_SOURCE([[#ifdef HAVE_NLIST_H
+    *) AC_RUN_IFELSE([AC_LANG_SOURCE([[#if defined(HAVE_NLIST_H)
 #include <nlist.h>
 struct nlist xYzzY1[] = {{"xYzzY1", 0},{0}};
 struct nlist xYzzY2[] = {{"_xYzzY2", 0},{0}};
@@ -876,7 +876,7 @@ int main(argc, argv)
 int argc;
 char **argv;
 {
-#ifdef HAVE_NLIST_H
+#if defined(HAVE_NLIST_H)
     if(nlist(argv[0], xYzzY1) == 0 && xYzzY1[0].n_value != 0)
         exit(1);
     if(nlist(argv[0], xYzzY2) == 0 && xYzzY2[0].n_value != 0)
@@ -1650,16 +1650,16 @@ then
     [fptools_cv_timer_create_works],
     [AC_TRY_RUN([
 #include <stdio.h>
-#ifdef HAVE_STDLIB_H
+#if defined(HAVE_STDLIB_H)
 #include <stdlib.h>
 #endif
-#ifdef HAVE_TIME_H
+#if defined(HAVE_TIME_H)
 #include <time.h>
 #endif
-#ifdef HAVE_SIGNAL_H
+#if defined(HAVE_SIGNAL_H)
 #include <signal.h>
 #endif
-#ifdef HAVE_UNISTD_H
+#if defined(HAVE_UNISTD_H)
 #include <unistd.h>
 #endif
 


=====================================
hadrian/src/Rules/Generate.hs
=====================================
@@ -233,7 +233,7 @@ generateGhcPlatformH = do
     targetVendor   <- getSetting TargetVendor
     ghcUnreg       <- getFlag    GhcUnregisterised
     return . unlines $
-        [ "#ifndef __GHCPLATFORM_H__"
+        [ "#if !defined(__GHCPLATFORM_H__)"
         , "#define __GHCPLATFORM_H__"
         , ""
         , "#define BuildPlatform_TYPE  " ++ cppify hostPlatform
@@ -386,7 +386,7 @@ generateGhcAutoconfH = do
     ccLlvmBackend    <- getSetting CcLlvmBackend
     ccClangBackend   <- getSetting CcClangBackend
     return . unlines $
-        [ "#ifndef __GHCAUTOCONF_H__"
+        [ "#if !defined(__GHCAUTOCONF_H__)")
         , "#define __GHCAUTOCONF_H__" ]
         ++ configHContents ++
         [ "\n#define TABLES_NEXT_TO_CODE 1" | tablesNextToCode && not ghcUnreg ]
@@ -422,7 +422,7 @@ generateGhcBootPlatformH = do
     targetOs       <- getSetting TargetOs
     targetVendor   <- getSetting TargetVendor
     return $ unlines
-        [ "#ifndef __PLATFORM_H__"
+        [ "#if !defined(__PLATFORM_H__)")
         , "#define __PLATFORM_H__"
         , ""
         , "#define BuildPlatform_NAME  " ++ show buildPlatform
@@ -464,10 +464,10 @@ generateGhcVersionH = do
     patchLevel1 <- getSetting ProjectPatchLevel1
     patchLevel2 <- getSetting ProjectPatchLevel2
     return . unlines $
-        [ "#ifndef __GHCVERSION_H__"
+        [ "#if !defined(__GHCVERSION_H__)")
         , "#define __GHCVERSION_H__"
         , ""
-        , "#ifndef __GLASGOW_HASKELL__"
+        , "#if !defined(__GLASGOW_HASKELL__)")
         , "# define __GLASGOW_HASKELL__ " ++ version
         , "#endif"
         , ""]


=====================================
includes/ghc.mk
=====================================
@@ -57,7 +57,7 @@ endif
 
 $(includes_H_VERSION) : mk/project.mk | $$(dir $$@)/.
 	@echo "Creating $@..."
-	@echo "#ifndef __GHCVERSION_H__"  > $@
+	@echo "#if !defined(__GHCVERSION_H__)"  > $@)
 	@echo "#define __GHCVERSION_H__" >> $@
 	@echo >> $@
 	@echo "#define __GLASGOW_HASKELL__ $(ProjectVersionInt)" >> $@
@@ -92,7 +92,7 @@ else
 
 $(includes_H_CONFIG) : mk/config.h mk/config.mk includes/ghc.mk | $$(dir $$@)/.
 	@echo "Creating $@..."
-	@echo "#ifndef __GHCAUTOCONF_H__"  >$@
+	@echo "#if !defined(__GHCAUTOCONF_H__)"  >$@)
 	@echo "#define __GHCAUTOCONF_H__" >>$@
 #
 #	Copy the contents of mk/config.h, turning '#define PACKAGE_FOO
@@ -125,7 +125,7 @@ endif
 $(includes_H_PLATFORM) : includes/Makefile | $$(dir $$@)/.
 	$(call removeFiles,$@)
 	@echo "Creating $@..."
-	@echo "#ifndef __GHCPLATFORM_H__"  >$@
+	@echo "#if !defined(__GHCPLATFORM_H__)"  >$@)
 	@echo "#define __GHCPLATFORM_H__" >>$@
 	@echo >> $@
 	@echo "#define BuildPlatform_TYPE  $(HostPlatform_CPP)" >> $@


=====================================
libraries/unix
=====================================
@@ -1 +1 @@
-Subproject commit a102df29c107e8f853129dd40fbbb487e1818149
+Subproject commit 167d9ae32ed82ab2b54b4aeaf0cae564015635da


=====================================
testsuite/driver/testlib.py
=====================================
@@ -274,6 +274,7 @@ def omit_ways( ways ):
     return lambda name, opts, w=ways: _omit_ways( name, opts, w )
 
 def _omit_ways( name, opts, ways ):
+    assert ways.__class__ is list
     opts.omit_ways += ways
 
 # -----


=====================================
testsuite/tests/codeGen/should_run/all.T
=====================================
@@ -195,4 +195,4 @@ test('T15892',
         extra_run_opts('+RTS -G1 -A32k -RTS') ],
      compile_and_run, ['-O'])
 test('T16617', normal, compile_and_run, [''])
-test('T16449_2', exit_code(1), compile_and_run, [''])
+test('T16449_2', [expect_broken_for(16742, ['dyn', 'ghci', 'optasm', 'threaded2']), exit_code(1)], compile_and_run, [''])


=====================================
testsuite/tests/concurrent/should_run/all.T
=====================================
@@ -88,7 +88,7 @@ test('T7970', normal, compile_and_run, [''])
 test('AtomicPrimops', normal, compile_and_run, [''])
 
 # test uses 2 threads and yield, scheduling can vary with threaded2
-test('threadstatus-9333', [omit_ways(['threaded2'])], compile_and_run, [''])
+test('threadstatus-9333', [fragile_for(16555, ['ghci']), omit_ways(['threaded2'])], compile_and_run, [''])
 
 test('T9379', normal, compile_and_run, [''])
 
@@ -239,7 +239,7 @@ test('conc067', ignore_stdout, compile_and_run, [''])
 
 # omit threaded2, the behaviour of this test is non-deterministic with more
 # than one CPU.
-test('conc068', [ omit_ways('threaded2'), exit_code(1) ], compile_and_run, [''])
+test('conc068', [ omit_ways(['threaded2']), exit_code(1) ], compile_and_run, [''])
 
 test('setnumcapabilities001',
      [ only_ways(['threaded1','threaded2']),


=====================================
testsuite/tests/driver/all.T
=====================================
@@ -170,7 +170,7 @@ test( 'T4114d', [fobject_code, expect_broken_for(4114, ['ghci'])], compile_and_r
 test('T5584', [], makefile_test, [])
 test('T5198', [], makefile_test, [])
 test('T7060', [], makefile_test, [])
-test('T7130', normal, compile_fail, ['-fflul-laziness'])
+test('T7130', normal, compile_fail, ['-ffull-laziness'])
 test('T7563', when(unregisterised(), skip), makefile_test, [])
 test('T6037',
      # The testsuite doesn't know how to set a non-Unicode locale on Windows or Mac OS X
@@ -270,4 +270,6 @@ test('inline-check', omit_ways(['hpc', 'profasm'])
 
 test('T14452', [], makefile_test, [])
 test('T15396', normal, compile_and_run, ['-package ghc'])
-test('T16737', [extra_files(['T16737include/'])], compile_and_run, ['-optP=-isystem -optP=T16737include'])
+test('T16737',
+     [extra_files(['T16737include/']), expect_broken_for(16541, ['ghci'])],
+     compile_and_run, ['-optP=-isystem -optP=T16737include'])


=====================================
testsuite/tests/ffi/should_compile/all.T
=====================================
@@ -35,7 +35,8 @@ test('T11983', [omit_ways(['ghci'])], compile, ['T11983.c'])
 test('T14125', normal, compile, [''])
 test(
     'cc017',
-    normal,
+    # We need TH but can't load profiled dynamic objects
+    when(ghc_dynamic(), omit_ways(['profasm'])),
     compile,
     [
         '-optc=-DC -optcxx=-DCXX -optcxx=-std=c++11'


=====================================
testsuite/tests/ffi/should_run/all.T
=====================================
@@ -207,4 +207,4 @@ test('PrimFFIInt16', [omit_ways(['ghci'])], compile_and_run, ['PrimFFIInt16_c.c'
 
 test('PrimFFIWord16', [omit_ways(['ghci'])], compile_and_run, ['PrimFFIWord16_c.c'])
 
-test('T493', [], compile_and_run, ['T493_c.c'])
+test('T493', [omit_ways(['ghci'])], compile_and_run, ['T493_c.c'])


=====================================
testsuite/tests/lib/integer/all.T
=====================================
@@ -1,8 +1,8 @@
 test('integerBits', normal, compile_and_run, [''])
 test('integerConversions', normal, compile_and_run, [''])
 # skip ghci as it doesn't support unboxed tuples
-test('integerGmpInternals', [reqlib('integer-gmp'), omit_ways('ghci')], compile_and_run, [''])
-test('plusMinusInteger', [omit_ways('ghci')], compile_and_run, [''])
+test('integerGmpInternals', [reqlib('integer-gmp'), omit_ways(['ghci'])], compile_and_run, [''])
+test('plusMinusInteger', [omit_ways(['ghci'])], compile_and_run, [''])
 test('integerConstantFolding', normal, makefile_test, ['integerConstantFolding'])
 test('fromToInteger', [], makefile_test, ['fromToInteger'])
 test('IntegerConversionRules', [], makefile_test, ['IntegerConversionRules'])


=====================================
testsuite/tests/programs/barton-mangler-bug/test.T
=====================================
@@ -8,7 +8,7 @@ test('barton-mangler-bug',
                    'Plot.hi',              'Plot.o',
                    'PlotExample.hi',       'PlotExample.o',
                    'TypesettingTricks.hi', 'TypesettingTricks.o']),
-      omit_ways('debug') # Fails for debug way due to annotation linting timeout
+      omit_ways(['debug']) # Fails for debug way due to annotation linting timeout
       ],
      multimod_compile_and_run, ['Main', ''])
 


=====================================
testsuite/tests/rts/all.T
=====================================
@@ -93,7 +93,7 @@ test('stack002', [extra_files(['stack001.hs']),
 
 # run this test with very small stack chunks to exercise the stack
 # overflow/underflow machinery.
-test('stack003', [ omit_ways('ghci'), # uses unboxed tuples
+test('stack003', [ omit_ways(['ghci']), # uses unboxed tuples
                    extra_run_opts('500000 +RTS -kc1k -kb100 -K96m -RTS') ],
                  compile_and_run, [''])
 


=====================================
testsuite/tests/typecheck/should_run/all.T
=====================================
@@ -96,7 +96,7 @@ test('T6117', normal, compile_and_run, [''])
 test('T5751', normal, compile_and_run, [''])
 test('T5913', normal, compile_and_run, [''])
 test('T7748', normal, compile_and_run, [''])
-test('T7861', [omit_ways('debug'), exit_code(1)], compile_and_run, [''])
+test('T7861', [omit_ways(['debug']), exit_code(1)], compile_and_run, [''])
 test('TcTypeNatSimpleRun', normal, compile_and_run, [''])
 test('TcTypeSymbolSimpleRun', normal, compile_and_run, [''])
 test('T8119', normal, ghci_script, ['T8119.script'])


=====================================
testsuite/tests/utils/should_run/all.T
=====================================
@@ -1,6 +1,6 @@
 test('T14854',
      [only_ways(threaded_ways),
-      omit_ways('ghci'),
+      omit_ways(['ghci']),
       reqlib('random'),
       ignore_stderr],
      compile_and_run,



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/dc663608d5ae43036a4bfbcfe30eab65c307dad7...0d999cbbf6276542c9d76010a85dda5a1459be0c

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/dc663608d5ae43036a4bfbcfe30eab65c307dad7...0d999cbbf6276542c9d76010a85dda5a1459be0c
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190609/beef6e1c/attachment-0001.html>


More information about the ghc-commits mailing list