haskell-distributed / haskell-distributed/distributed-process

Windows: tests aren't operational

Open
#435 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

network-transport-tcp
Dominant language
Haskell
Stars
751
Forks
99
Avg merge
45m
Merged PRs (30d)
2

Description

Windows 7 x64
Haskell platform 2014.2.0.0
network-transport-tcp-0.4.1

Target TestQC with flag use-mock-network:

C:\dev\haskell\aerospace_game\network-transport-tcp-0.4.2>cabal test TestQC
Re-configuring with test suites enabled. If this fails, please run configure
manually.
Resolving dependencies...
Configuring network-transport-tcp-0.4.2...
Preprocessing library network-transport-tcp-0.4.2...
[1 of 4] Compiling Network.Transport.TCP.Mock.Socket ( src\Network\Transport\TCP\Mock\Socket.hs, dist\build\Network\Tr
ansport\TCP\Mock\Socket.o )
[2 of 4] Compiling Network.Transport.TCP.Mock.Socket.ByteString ( src\Network\Transport\TCP\Mock\Socket\ByteString.hs,
 dist\build\Network\Transport\TCP\Mock\Socket\ByteString.o )
[3 of 4] Compiling Network.Transport.TCP.Internal ( src\Network\Transport\TCP\Internal.hs, dist\build\Network\Transpor
t\TCP\Internal.o )

src\Network\Transport\TCP\Internal.hs:37:5:
    Module
    `Network.Transport.TCP.Mock.Socket'
    does not export
    `socketPort'

Target TestTCP isn't operational (due lack of withSocketsDo):

C:\dev\haskell\aerospace_game\network-transport-tcp-0.4.2>cabal test TestTCP
Preprocessing library network-transport-tcp-0.4.2...
[1 of 2] Compiling Network.Transport.TCP.Internal ( src\Network\Transport\TCP\Internal.hs, dist\build\Network\Transpor
t\TCP\Internal.o )
[2 of 2] Compiling Network.Transport.TCP ( src\Network\Transport\TCP.hs, dist\build\Network\Transport\TCP.o )
[1 of 2] Compiling Network.Transport.TCP.Internal ( src\Network\Transport\TCP\Internal.hs, dist\build\Network\Transpor
t\TCP\Internal.p_o )
[2 of 2] Compiling Network.Transport.TCP ( src\Network\Transport\TCP.hs, dist\build\Network\Transport\TCP.p_o )
In-place registering network-transport-tcp-0.4.2...
Preprocessing test suite 'TestTCP' for network-transport-tcp-0.4.2...
[1 of 1] Compiling Main             ( tests\TestTCP.hs, dist\build\TestTCP\TestTCP-tmp\Main.o )
Linking dist\build\TestTCP\TestTCP.exe ...
Running 1 test suites...
Test suite TestTCP: RUNNING...
Running "EarlyDisconnect": TestTCP.exe: user error (Pattern match failure in do expression at tests\TestTCP.hs:108:7-2
1)
Trace:
0       Left getAddrInfo: does not exist (error 10093)

Test suite TestTCP: FAIL
Test suite logged to: dist\test\network-transport-tcp-0.4.2-TestTCP.log
0 of 1 test suites (0 of 1 test cases) passed.

With added withSocketsDo to main function:

C:\dev\haskell\aerospace_game\network-transport-tcp-0.4.2>cabal test TestTCP
Preprocessing library network-transport-tcp-0.4.2...
In-place registering network-transport-tcp-0.4.2...
Preprocessing test suite 'TestTCP' for network-transport-tcp-0.4.2...
[1 of 1] Compiling Main             ( tests\TestTCP.hs, dist\build\TestTCP\TestTCP-tmp\Main.o )
Linking dist\build\TestTCP\TestTCP.exe ...
Running 1 test suites...
Test suite TestTCP: RUNNING...
Running "EarlyDisconnect": Running "PingPong": TestTCP.exe: getConsoleScreenBufferInfo: invalid argument (Неверный дес
криптор.)
Trace:
0       Left getConsoleScreenBufferInfo: invalid argument (Неверный дескриптор.)

Test suite TestTCP: FAIL
Test suite logged to: dist\test\network-transport-tcp-0.4.2-TestTCP.log
0 of 1 test suites (0 of 1 test cases) passed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported failures with cabal test TestQC and cabal test TestTCP on the stated Windows environment. Inspect src\Network\Transport\TCP\Internal.hs, src\Network\Transport\TCP\Mock\Socket.hs, and tests\TestTCP.hs, including the reported failing lines. Done means the affected test suites compile and pass on Windows, including socket initialization and console output.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
distributed-systems, networking, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.