Skip to content

Instantly share code, notes, and snippets.

@rrnewton
Last active November 16, 2015 10:56
Show Gist options
  • Save rrnewton/5f8b1db0a3f264ab48b7 to your computer and use it in GitHub Desktop.
Save rrnewton/5f8b1db0a3f264ab48b7 to your computer and use it in GitHub Desktop.
pacman test outputs
$ cabal test
Package has never been configured. Configuring with default flags. If this
fails, please run configure manually.
Resolving dependencies...
Configuring packman-0.2...
Preprocessing library packman-0.2...
[1 of 4] Compiling GHC.Packing.PackException ( dist/build/GHC/Packing/PackException.hs, dist/build/GHC/Packing/PackException.o )
[2 of 4] Compiling GHC.Packing.Type ( GHC/Packing/Type.hs, dist/build/GHC/Packing/Type.o )
[3 of 4] Compiling GHC.Packing.Core ( GHC/Packing/Core.hs, dist/build/GHC/Packing/Core.o )
[4 of 4] Compiling GHC.Packing ( GHC/Packing.hs, dist/build/GHC/Packing.o )
In-place registering packman-0.2...
Preprocessing test suite 'simpletest' for packman-0.2...
[1 of 1] Compiling Main ( Test/TestSerialisation.hs, dist/build/simpletest/simpletest-tmp/Main.o )
Linking dist/build/simpletest/simpletest ...
Preprocessing test suite 'testexceptions' for packman-0.2...
[1 of 1] Compiling Main ( Test/TestExceptions.hs, dist/build/testexceptions/testexceptions-tmp/Main.o )
Linking dist/build/testexceptions/testexceptions ...
Preprocessing test suite 'alltests' for packman-0.2...
[1 of 1] Compiling AllTests ( Test/AllTests.hs, dist/build/AllTests.o )
In-place registering alltests-0.2...
dist/build/alltestsStub/alltestsStub-tmp/alltestsStub.hs:2:8:
Could not find module ‘Distribution.Simple.Test.LibV09’
Perhaps you meant Distribution.Simple.Test (from Cabal-1.18.1.3)
Use -v to see a list of the files searched for.
$ stack test
NOTE: the test command is functionally equivalent to 'build --test'
Test suite alltests executable not found for packman
Test suite quickchecktest executable not found for packman
packman-0.2: test (suite: simpletest)
Test program for serialisation
Evaluating some fib expressions before and after packing
normal evaluation (take 3), should be
[10946,17711,28657]
[10946,17711,28657]
packing one part: OK [10946,17711,28657,46368,75025]
packing a function (2 arg.s): OK [10946,17711,28657]
packing a list function (2 arg.s, 1 supplied): OK [10946,17711,28657]
DONE
[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39]
packing an unevaluated array: OK [0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78]
packman-0.2: test (suite: testexceptions)
Running all tests
Test: eval. array:
Evaluated: [0,2,4]
Result: True
Test: duplicating an array of 128 elements:
Serialization Packet, size 1136
, program FP 11041979929670164844 16860066065255286010
, type fingerprintFP 16839314581385051109 2898575823478227491
0: 0x0000000000000003 0x0000000000018329 0x0000000000000080 0x0000000000000001
4: 0x0000...
now unpacking (deserialize):
unpacked, now evaluate
array (0,127) [(0,0),(1,2),(2,4),(3,6),(4,8),(5,10),(6,12),(7,14),(8,16),(9,18),(10,20),(11,22),(12,24),(13,26),(14,28),(15,30),(16,32),(17,34),(18,36),(19,38),(20,40),(21,42),(22,44),(23,46),(24,48),(25,50),(26,52),(27,54),(28,56),(29,58),(30,60),(31,62),(32,64),(33,66),(34,68),(35,70),(36,72),(37,74),(38,76),(39,78),(40,80),(41,82),(42,84),(43,86),(44,88),(45,90),(46,92),(47,94),(48,96),(49,98),(50,100),(51,102),(52,104),(53,106),(54,108),(55,110),(56,112),(57,114),(58,116),(59,118),(60,120),(61,122),(62,124),(63,126),(64,128),(65,130),(66,132),(67,134),(68,136),(69,138),(70,140),(71,142),(72,144),(73,146),(74,148),(75,150),(76,152),(77,154),(78,156),(79,158),(80,160),(81,162),(82,164),(83,166),(84,168),(85,170),(86,172),(87,174),(88,176),(89,178),(90,180),(91,182),(92,184),(93,186),(94,188),(95,190),(96,192),(97,194),(98,196),(99,198),(100,200),(101,202),(102,204),(103,206),(104,208),(105,210),(106,212),(107,214),(108,216),(109,218),(110,220),(111,222),(112,224),(113,226),(114,228),(115,230),(116,232),(117,234),(118,236),(119,238),(120,240),(121,242),(122,244),(123,246),(124,248),(125,250),(126,252),(127,254)]
Result: True
Test: packing a thread ID (unsupported):
expect exception:
Contains an unsupported closure type (whose implementation is missing)
Got: Contains an unsupported closure type (whose implementation is missing)
Result: True
Test: packing an MVar (should be cannotpack):
expect exception:
Data contain a closure that cannot be packed (MVar, TVar)
Got: Data contain a closure that cannot be packed (MVar, TVar)
Result: True
Test: deserialise other binary's data (binary mismatch):
expect exception:
Executable binaries do not match
Got: Executable binaries do not match
Result: True
Test: deserialise wrong type from file (type mismatch):
expect exception:
Packet data has unexpected type
Got: Packet data has unexpected type
Result: True
Test: deserialise truncated data. Expected: parse error:
expect exception:
Packet parse error
Got: Packet parse error
Result: True
Test: deserialise garbled data. Expected: garbled data:
expect exception:
Garbled data for deserialisation
testexceptions: unpackClosure: Found invalid marker 2827.
Got: Garbled data for deserialisation
Result: True
packman-0.2: test (suite: testmthread)
Multithreaded test program for serialisation
normal evaluation (take 3), should be
[10946,17711,28657]
[10946,17711,28657]
fork3704812e659d, waiting
: :::O::: :K OOO OOOKKKO1KKK K0 181 924723734865127166303017
5629:4:187853 0
1
O
O1KK
511946242198
done
Test suite failure for package packman-0.2
alltests: executable not found
quickchecktest: executable not found
Logs printed to console
$ stack test
NOTE: the test command is functionally equivalent to 'build --test'
random-1.1: configure
random-1.1: build
random-1.1: install
tf-random-0.5: configure
tf-random-0.5: build
tf-random-0.5: install
QuickCheck-2.7.6: configure
QuickCheck-2.7.6: build
QuickCheck-2.7.6: install
packman-0.2: configure (test)
Configuring packman-0.2...
packman-0.2: build (test)
Preprocessing library packman-0.2...
[2 of 4] Compiling GHC.Packing.Type ( GHC/Packing/Type.hs, .stack-work/dist/x86_64-linux/Cabal-1.18.1.5/build/GHC/Packing/Type.o ) [.stack-work/dist/x86_64-linux/Cabal-1.18.1.5/build/autogen/cabal_macros.h changed]
[3 of 4] Compiling GHC.Packing.Core ( GHC/Packing/Core.hs, .stack-work/dist/x86_64-linux/Cabal-1.18.1.5/build/GHC/Packing/Core.o ) [.stack-work/dist/x86_64-linux/Cabal-1.18.1.5/build/autogen/cabal_macros.h changed]
In-place registering packman-0.2...
Preprocessing test suite 'alltests' for packman-0.2...
[1 of 1] Compiling AllTests ( Test/AllTests.hs, .stack-work/dist/x86_64-linux/Cabal-1.18.1.5/build/AllTests.o )
In-place registering alltests-0.2...
[1 of 1] Compiling Main ( .stack-work/dist/x86_64-linux/Cabal-1.18.1.5/build/alltestsStub/alltestsStub-tmp/alltestsStub.hs, .stack-work/dist/x86_64-linux/Cabal-1.18.1.5/build/alltestsStub/alltestsStub-tmp/Main.o )
Linking .stack-work/dist/x86_64-linux/Cabal-1.18.1.5/build/alltestsStub/alltestsStub ...
Preprocessing test suite 'quickchecktest' for packman-0.2...
[1 of 1] Compiling QCTest ( Test/QCTest.hs, .stack-work/dist/x86_64-linux/Cabal-1.18.1.5/build/QCTest.o )
In-place registering quickchecktest-0.2...
[1 of 1] Compiling Main ( .stack-work/dist/x86_64-linux/Cabal-1.18.1.5/build/quickchecktestStub/quickchecktestStub-tmp/quickchecktestStub.hs, .stack-work/dist/x86_64-linux/Cabal-1.18.1.5/build/quickchecktestStub/quickchecktestStub-tmp/Main.o )
Linking .stack-work/dist/x86_64-linux/Cabal-1.18.1.5/build/quickchecktestStub/quickchecktestStub ...
Preprocessing test suite 'simpletest' for packman-0.2...
[1 of 1] Compiling Main ( Test/TestSerialisation.hs, .stack-work/dist/x86_64-linux/Cabal-1.18.1.5/build/simpletest/simpletest-tmp/Main.o )
Linking .stack-work/dist/x86_64-linux/Cabal-1.18.1.5/build/simpletest/simpletest ...
Preprocessing test suite 'testexceptions' for packman-0.2...
[1 of 1] Compiling Main ( Test/TestExceptions.hs, .stack-work/dist/x86_64-linux/Cabal-1.18.1.5/build/testexceptions/testexceptions-tmp/Main.o )
Linking .stack-work/dist/x86_64-linux/Cabal-1.18.1.5/build/testexceptions/testexceptions ...
Preprocessing test suite 'testmthread' for packman-0.2...
[1 of 1] Compiling Main ( Test/TestMThread.hs, .stack-work/dist/x86_64-linux/Cabal-1.18.1.5/build/testmthread/testmthread-tmp/Main.o )
Linking .stack-work/dist/x86_64-linux/Cabal-1.18.1.5/build/testmthread/testmthread ...
Test suite alltests executable not found for packman
Test suite quickchecktest executable not found for packman
packman-0.2: test (suite: simpletest)
Progress: 3/4Test program for serialisation
Evaluating some fib expressions before and after packing
normal evaluation (take 3), should be
[10946,17711,28657]
[10946,17711,28657]
packing one part: OK [10946,17711,28657,46368,75025]
packing a function (2 arg.s): OK [10946,17711,28657]
packing a list function (2 arg.s, 1 supplied): OK [10946,17711,28657]
DONE
[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39]
packing an unevaluated array: OK [0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78]
packman-0.2: test (suite: testexceptions)
Progress: 3/4Running all tests
Test: eval. array:
Evaluated: [0,2,4]
Result: True
Test: duplicating an array of 128 elements:
Serialization Packet, size 1136
, program FP 10974942625561469999 2696826341283802126
, type fingerprintFP 16839314581385051109 2898575823478227491
0: 0x0000000000000003 0x0000000000018fe9 0x0000000000000080 0x0000000000000001
4: 0x00000...
now unpacking (deserialize):
unpacked, now evaluate
array (0,127) [(0,0),(1,2),(2,4),(3,6),(4,8),(5,10),(6,12),(7,14),(8,16),(9,18),(10,20),(11,22),(12,24),(13,26),(14,28),(15,30),(16,32),(17,34),(18,36),(19,38),(20,40),(21,42),(22,44),(23,46),(24,48),(25,50),(26,52),(27,54),(28,56),(29,58),(30,60),(31,62),(32,64),(33,66),(34,68),(35,70),(36,72),(37,74),(38,76),(39,78),(40,80),(41,82),(42,84),(43,86),(44,88),(45,90),(46,92),(47,94),(48,96),(49,98),(50,100),(51,102),(52,104),(53,106),(54,108),(55,110),(56,112),(57,114),(58,116),(59,118),(60,120),(61,122),(62,124),(63,126),(64,128),(65,130),(66,132),(67,134),(68,136),(69,138),(70,140),(71,142),(72,144),(73,146),(74,148),(75,150),(76,152),(77,154),(78,156),(79,158),(80,160),(81,162),(82,164),(83,166),(84,168),(85,170),(86,172),(87,174),(88,176),(89,178),(90,180),(91,182),(92,184),(93,186),(94,188),(95,190),(96,192),(97,194),(98,196),(99,198),(100,200),(101,202),(102,204),(103,206),(104,208),(105,210),(106,212),(107,214),(108,216),(109,218),(110,220),(111,222),(112,224),(113,226),(114,228),(115,230),(116,232),(117,234),(118,236),(119,238),(120,240),(121,242),(122,244),(123,246),(124,248),(125,250),(126,252),(127,254)]
Result: True
Test: packing a thread ID (unsupported):
expect exception:
Contains an unsupported closure type (whose implementation is missing)
Got: Contains an unsupported closure type (whose implementation is missing)
Result: True
Test: packing an MVar (should be cannotpack):
expect exception:
Data contain a closure that cannot be packed (MVar, TVar)
Got: Data contain a closure that cannot be packed (MVar, TVar)
Result: True
Test: deserialise other binary's data (binary mismatch):
expect exception:
Executable binaries do not match
Got: Executable binaries do not match
Result: True
Test: deserialise wrong type from file (type mismatch):
expect exception:
Packet data has unexpected type
Got: Packet data has unexpected type
Result: True
Test: deserialise truncated data. Expected: parse error:
expect exception:
Packet parse error
Got: Packet parse error
Result: True
Test: deserialise garbled data. Expected: garbled data:
expect exception:
Garbled data for deserialisation
testexceptions: unpackClosure: Found invalid marker 2827.
Got: Garbled data for deserialisation
Result: True
packman-0.2: test (suite: testmthread)
Progress: 3/4Multithreaded test program for serialisation
normal evaluation (take 3), should be
[10946,17711,28657]
[10946,17711,28657]
13204f57869orked, waiting
: OK :1:::: ::::7 O 7OOOOKOOOO1KKKK KKKK1 2
1814817539306625116293510474046732281468
952180
3
91
done
Test suite failure for package packman-0.2
alltests: executable not found
quickchecktest: executable not found
Logs printed to console
@rrnewton
Copy link
Author

rrnewton commented Sep 3, 2015

I tried globally installing it and then using a raw ghci, but got:

Loading package primitive-0.6 ... linking ... done.
Loading package packman-0.2 ... can't load .so/.DLL for: /u/rrnewton/.cabal/lib/x86_64-linux-ghc-7.8.4/packman-0.2/libHSpackman-0.2-ghc7.8.4.so (/u/rrnewton/.cabal/lib/x86_64-linux-ghc-7.8.4/packman-0.2/libHSpackman-0.2-ghc7.8.4.so: undefined symbol: ZCMain_main_info)

@rrnewton
Copy link
Author

rrnewton commented Sep 3, 2015

Ok, building compiled programs with a global install of pacman on ghc 7.8.4 lets me run simple programs where I serialize and then deserialize. E.g. the string "hi":

$ ./pac
Serialization Packet, size 2
, program FP 13665012456145349312 5463162573823526029
, type fingerprintFP 17029791997198391546 10504398448001533142
0:  0x0000000000000001  0x00000000002fd778

"hi"

@michaxm
Copy link

michaxm commented Oct 5, 2015

... undefined symbol: ZCMain_main_info

I've had the same problem when using Template Haskell - worked when I gave up using both.

@jberthold
Copy link

Sorry, just saw this test report... (I am not a stack user yet, btw, and had no problems with my - somewhat special - setup)
About the ZCMain_main_info, I have noted this in issue #3. Hope to have some time in the coming weeks to look into this.

@michaxm
Copy link

michaxm commented Nov 16, 2015

Since it bothered me, I had a look into the test suites as well. As far as I can tell, this is no stack problem, "cabal test" runs into the same issues. The failing test suites use the detailed cabal test suite type, which I would love to use myself, but to my knowledge has been defunct forever and it does not seem something has changed in the last few years.

Since you seem to know better: how can you run these test suites with cabal successfully? special versions, parameters? Otherwise I suggest a switch to the basic api: jberthold/packman#7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment