snapframework / io-streams-haproxy

HAProxy protocol v1.5 support for io-streams
BSD 3-Clause "New" or "Revised" License
7 stars 17 forks source link

test/blackbox_local fails on mipsel #18

Open iliastsi opened 5 years ago

iliastsi commented 5 years ago

Hi!

test/blackbox_local fails on mipsel with the following error:

HUnitFailure (Just (SrcLoc {srcLocPackage = "main", srcLocModule = "System.IO.Streams.Network.HAProxy.Tests", srcLocFile = "test/System/IO/Streams/Network/HAProxy/Tests.hs", srcLocStartLine = 178, srcLocStartCol = 9, srcLocEndLine = 178, srcLocEndCol = 36})) (ExpectedButGot (Just "type") "Stream" "Datagram")

You can find complete logs here. Please let me know if I can help debugging this.

iliastsi commented 5 years ago

The problem here is that the code at https://github.com/snapframework/io-streams-haproxy/blob/master/src/System/IO/Streams/Network/HAProxy.hs#L76 which tries to compute the type of the socket does not take into account that SOCK_STREAM and SOCK_DGRAM are platform dependent and have different values on mips than on x86_64.