kazu-yamamoto / http2

HTTP/2.0 library including HPACK
BSD 3-Clause "New" or "Revised" License
86 stars 22 forks source link

Test failures with ghc-9.6.1 #61

Closed TristanCacqueray closed 1 year ago

TristanCacqueray commented 1 year ago

Hello, it seems like building http2 with ghc-9.6 causes the following test failure:

Failures:

  test/HTTP2/ClientSpec.hs:33:39:
  1) HTTP2.Client.client receives   an error if scheme is missing
       predicate failed on expected exception: HTTP2Error (ConnectionErrorIsReceived ProtocolError 1 "the header key is illegal")

  To rerun use: --match "/HTTP2.Client/client/receives an error if scheme is missing/"

  test/HTTP2/ClientSpec.hs:38:40:
  2) HTTP2.Client.client receives an error if authority is missing
       did not get expected exception: HTTP2Error

  To rerun use: --match "/HTTP2.Client/client/receives an error if authority is missing/"

  test/HTTP2/ClientSpec.hs:43:57:
  3) HTTP2.Client.client receives an error if authority and host are different
       did not get expected exception: HTTP2Error

  To rerun use: --match "/HTTP2.Client/client/receives an error if authority and host are different/"

  test/HTTP2/ServerSpec.hs:187:30:
  4) HTTP2.Server.server handles normal cases
       expected: Just (Status {statusCode = 404, statusMessage = "Not Found"})
        but got: Just (Status {statusCode = 200, statusMessage = "OK"})

  To rerun use: --match "/HTTP2.Server/server/handles normal cases/"

  test/HTTP2/ServerSpec.hs:187:30:
  5) HTTP2.Server.server should always send the connection preface first
       expected: Just (Status {statusCode = 404, statusMessage = "Not Found"})
        but got: Just (Status {statusCode = 200, statusMessage = "OK"})

  To rerun use: --match "/HTTP2.Server/server/should always send the connection preface first/"

Randomized with seed 806622849

Finished in 2.4628 seconds
31 examples, 5 failures
Test suite spec: FAIL
Test suite logged to: dist/test/http2-4.1.0-spec.log
2 of 3 test suites (2 of 3 test cases) passed.

Or perhaps this is caused by an incorrect version bound, here are the version used:

Configuring http2-4.1.0...
Flags chosen: devel=False, h2spec=False
Dependency array: using array-0.5.5.0
Dependency async: using async-2.2.4
Dependency base >=4.9 && <5: using base-4.18.0.0
Dependency bytestring >=0.10: using bytestring-0.11.4.0
Dependency case-insensitive: using case-insensitive-1.2.1.0
Dependency containers >=0.5: using containers-0.6.7
Dependency http-types: using http-types-0.12.3
Dependency network: using network-3.1.2.8
Dependency network-byte-order >=0.1.5: using network-byte-order-0.1.6
Dependency psqueues: using psqueues-0.2.7.3
Dependency stm: using stm-2.5.1.0
Dependency time-manager: using time-manager-0.0.0
Dependency unix-time: using unix-time-0.4.8
Dependency unliftio: using unliftio-0.2.24.0
Dependency async: using async-2.2.4
Dependency base >=4.9 && <5: using base-4.18.0.0
Dependency base16-bytestring >=1.0: using base16-bytestring-1.0.2.0
Dependency bytestring: using bytestring-0.11.4.0
Dependency cryptonite: using cryptonite-0.30
Dependency hspec >=1.3: using hspec-2.9.7
Dependency http-types: using http-types-0.12.3
Dependency http2: using http2-4.1.0
Dependency network: using network-3.1.2.8
Dependency network-run >=0.1.0: using network-run-0.2.4
Dependency typed-process: using typed-process-0.2.11.0
Dependency aeson >=2: using aeson-2.1.2.1
Dependency base >=4.9 && <5: using base-4.18.0.0
Dependency base16-bytestring >=1.0: using base16-bytestring-1.0.2.0
Dependency bytestring: using bytestring-0.11.4.0
Dependency directory: using directory-1.3.8.1
Dependency filepath: using filepath-1.4.100.1
Dependency hspec >=1.3: using hspec-2.9.7
Dependency http2: using http2-4.1.0
Dependency text: using text-2.0.2
Dependency unordered-containers: using unordered-containers-0.2.19.1
Dependency vector: using vector-0.12.3.1
Dependency Glob >=0.9: using Glob-0.10.2
Dependency aeson >=2: using aeson-2.1.2.1
Dependency aeson-pretty: using aeson-pretty-0.8.9
Dependency base >=4.9 && <5: using base-4.18.0.0
Dependency base16-bytestring >=1.0: using base16-bytestring-1.0.2.0
Dependency bytestring: using bytestring-0.11.4.0
Dependency directory: using directory-1.3.8.1
Dependency filepath: using filepath-1.4.100.1
Dependency hspec >=1.3: using hspec-2.9.7
Dependency http2: using http2-4.1.0
Dependency network-byte-order: using network-byte-order-0.1.6
Dependency text: using text-2.0.2
Dependency unordered-containers: using unordered-containers-0.2.19.1

Do you know what could be the issue?

kazu-yamamoto commented 1 year ago

I cannot reproduce this on macOS. What is your OS?

TristanCacqueray commented 1 year ago

This is happening on Linux fedora 6.0.16-300.fc37.x86_64 .

kazu-yamamoto commented 1 year ago

I cannot reproduce on Ubuntu: https://github.com/kazu-yamamoto/http2/actions/runs/4527872933/jobs/7974130814

kazu-yamamoto commented 1 year ago

I think some of errors should be fixed in v4.1.2.

TristanCacqueray commented 1 year ago

Thank you, v4.1.2 test passed!