Haddock test suite failure -- can anyone guide me?

Zubin Duggal zubin at well-typed.com
Fri May 31 07:57:57 UTC 2024


You run this locally exactly the same as any other test, using

hadrian/build test --only=haddockHypsrcTest

or 

TEST="haddockHypsrcTest" hadrian/build test

I recommend accepting the changes by passing the `-a` option to hadrian,
and then looking over the changes locally using `git diff`.

The diffs reported by the test case itself can be confusing and I think
(not sure) that they are in reversed order to what you would normally
expect.

On 24/05/31 08:48, Simon Peyton Jones wrote:
>Dear Haddock experts
>
>I'm getting a failure on !12492
><https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12492> that I can't
>understand or debug.  Can someone guide me?
>
>Failure is this:
>/builds/ghc/ghc/tmp/ghctest-2jo7oz8x/test
>spaces/testsuite/tests/haddock/haddock_testsuite/haddockHypsrcTest.run
>haddockHypsrcTest [bad exit code (2)] (normal)
>
>A snip of the log is at the end of this message.
>
>I want to
>
>   - understand what it does
>   - repro it locally.
>
>Trying the latter, I tried with my HEAD build and did
>bash$ cd testsuite/tests/haddock/haddock_testsuite
>bash$ make hypsrcTest
>
>but that failed on almost all the tests it does, even though HEAD is
>presumably OK.
>
>I'm  stumped.  Any ideas?  The patch only changes the type checker!
>
>Thanks
>
>SImion
>
>This is the log from !12492
>
>Wrong exit code for haddockHypsrcTest()(expected 0 , actual 2 )
>Stdout ( haddockHypsrcTest ):
>[1 of 7] Compiling Test.Haddock.Process (
>/builds/ghc/ghc/testsuite/../utils/haddock/haddock-test/src/Test/Haddock/Process.hs,
>Test/Haddock/Process.o )
>[2 of 7] Compiling Test.Haddock.Utils (
>/builds/ghc/ghc/testsuite/../utils/haddock/haddock-test/src/Test/Haddock/Utils.hs,
>Test/Haddock/Utils.o )
>[3 of 7] Compiling Test.Haddock.Config (
>/builds/ghc/ghc/testsuite/../utils/haddock/haddock-test/src/Test/Haddock/Config.hs,
>Test/Haddock/Config.o )
>[4 of 7] Compiling Test.Haddock (
>/builds/ghc/ghc/testsuite/../utils/haddock/haddock-test/src/Test/Haddock.hs,
>Test/Haddock.o )
>[5 of 7] Compiling Test.Haddock.Xhtml (
>/builds/ghc/ghc/testsuite/../utils/haddock/haddock-test/src/Test/Haddock/Xhtml.hs,
>Test/Haddock/Xhtml.o )
>[6 of 7] Compiling Main (
>/builds/ghc/ghc/testsuite/../utils/haddock/hypsrc-test/Main.hs, Main.o )
>[7 of 7] Linking hypsrc-test
>Haddock version 2.30.0, (c) Simon Marlow 2006
>Ported to use the GHC API by David Waern 2006-2008
>9.11.20240530
>Generating documentation...
>Testing output files...
>Checking "src/TemplateHaskellSplices.html"... PASS
>Checking "src/Bug1091.html"... PASS
>Checking "src/Polymorphism.html"... PASS
>Checking "src/UsingQuasiquotes.html"... PASS
>Checking "src/Records.html"... PASS
>Checking "src/Quasiquoter.html"... PASS
>Checking "src/CPP.html"... PASS
>Checking "src/Operators.html"... PASS
>Checking "src/Literals.html"... PASS
>Checking "src/LinkingIdentifiers.html"... PASS
>Checking "src/Classes.html"... FAIL
>Checking "src/PositionPragmas.html"... PASS
>Checking "src/Types.html"... PASS
>Checking "src/TemplateHaskellQuasiquotes.html"... PASS
>Checking "src/Constructors.html"... FAIL
>Checking "src/Identifiers.html"... FAIL
>Diffing failed cases...
>Diff for file "src/Classes.html":
>1194c1194,1198
>< ><span class="hs-identifier hs-type"
>---
>> ><span class="annottext"
>> >a -> b -> a
>> forall a b. a -> b -> a
>> </span
>> ><span class="hs-identifier hs-var"
>1281c1285,1289
>< ><span class="hs-identifier hs-type"
>---
>> ><span class="annottext"
>> >a -> b -> a
>> forall a b. a -> b -> a
>> </span
>> ><span class="hs-identifier hs-var"
>1368c1376,1380
>< ><span class="hs-identifier hs-type"
>---
>> ><span class="annottext"
>> >b -> a -> b
>> forall a b. a -> b -> a
>> </span
>> ><span class="hs-identifier hs-var"
>1455c1467,1471
>< ><span class="hs-identifier hs-type"
>---
>> ><span class="annottext"
>> >b -> a -> b
>> forall a b. a -> b -> a
>> </span
>> ><span class="hs-identifier hs-var"
>Diff for file "src/Constructors.html":
>1325c1325,1329
>< ><span class="hs-operator hs-type"
>---
>> ><span class="annottext"
>> >([Int] -> Int) -> (Norf -> [Int]) -> Norf -> Int
>> forall b c a. (b -> c) -> (a -> b) -> a -> c
>> </span
>> ><span class="hs-operator hs-var"
>Diff for file "src/Identifiers.html":
>1190c1190,1194
>< ><span class="hs-operator hs-type"
>---
>> ><span class="annottext"
>> >(String -> IO ()) -> (Int -> String) -> Int -> IO ()
>> forall b c a. (b -> c) -> (a -> b) -> a -> c
>> </span
>> ><span class="hs-operator hs-var"
>1216,1217c1220,1224
>< ><a href="Identifiers.html#foo"
>< ><span class="hs-identifier hs-type"
>---
>> ><span class="annottext"
>> >Int -> Int -> Int
>> </span
>> ><a href="Identifiers.html#foo"
>> ><span class="hs-identifier hs-var"
>1260c1267,1271
>< ><span class="hs-operator hs-type"
>---
>> ><span class="annottext"
>> >(String -> IO ()) -> (Int -> String) -> Int -> IO ()
>> forall b c a. (b -> c) -> (a -> b) -> a -> c
>> </span
>> ><span class="hs-operator hs-var"
>1286,1287c1297,1301
>< ><a href="Identifiers.html#quux"
>< ><span class="hs-identifier hs-type"
>---
>> ><span class="annottext"
>> >Int -> Int
>> </span
>> ><a href="Identifiers.html#quux"
>> ><span class="hs-identifier hs-var"
>1319c1333,1337
>< ><span class="hs-operator hs-type"
>---
>> ><span class="annottext"
>> >(String -> IO ()) -> (Int -> String) -> Int -> IO ()
>> forall b c a. (b -> c) -> (a -> b) -> a -> c
>> </span
>> ><span class="hs-operator hs-var"
>1345,1346c1363,1367
>< ><a href="Identifiers.html#norf"
>< ><span class="hs-identifier hs-type"
>---
>> ><span class="annottext"
>> >Int -> Int -> Int -> Int
>> </span
>> ><a href="Identifiers.html#norf"
>> ><span class="hs-identifier hs-var"
>Stderr run ( haddockHypsrcTest ):
>gmake: *** [Makefile:68: hypsrcTest] Error 1
>*** unexpected failure for haddockHypsrcTest(normal)

>_______________________________________________
>ghc-devs mailing list
>ghc-devs at haskell.org
>http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs



More information about the ghc-devs mailing list