tempesta-tech / tempesta-test

Test suite for Tempesta FW
11 stars 4 forks source link

h2.test_h2_specs tests fails #250

Closed pale-emperor closed 2 years ago

pale-emperor commented 2 years ago

Еests works fine except h2.test_h2_specs

h2spec output during test:

Failures:

Generic tests for HTTP/2 server
  2. Streams and Multiplexing
    using source address 127.0.0.1:53198
    × 2: Sends a WINDOW_UPDATE frame on half-closed (remote) stream
      -> The endpoint MUST accept WINDOW_UPDATE frame.
         Expected: DATA frame
           Actual: HEADERS Frame (length:111, flags:0x05, stream_id:1)
    using source address 127.0.0.1:53200
    × 3: Sends a PRIORITY frame on half-closed (remote) stream
      -> The endpoint MUST accept PRIORITY frame.
         Expected: DATA frame
           Actual: HEADERS Frame (length:111, flags:0x05, stream_id:1)

Hypertext Transfer Protocol Version 2 (HTTP/2)
  4. HTTP Frames
    4.3. Header Compression and Decompression
      using source address 127.0.0.1:53302
      × 3: Sends a HEADERS frame to another stream while sending the header blocks
        -> The endpoint MUST terminate the connection with a connection error of type PROTOCOL_ERROR.
           Expected: GOAWAY Frame (Error Code: PROTOCOL_ERROR)
                     Connection closed
             Actual: HEADERS Frame (length:111, flags:0x05, stream_id:3)

  5. Streams and Multiplexing
    5.1. Stream States
      using source address 127.0.0.1:53324
      × 11: closed: Sends a DATA frame
        -> The endpoint MUST treat this as a connection error of type STREAM_CLOSED.
           Expected: GOAWAY Frame (Error Code: STREAM_CLOSED)
                     RST_STREAM Frame (Error Code: STREAM_CLOSED)
                     Connection closed
             Actual: Timeout
      using source address 127.0.0.1:53326
      × 12: closed: Sends a HEADERS frame
        -> The endpoint MUST treat this as a connection error of type STREAM_CLOSED.
           Expected: GOAWAY Frame (Error Code: STREAM_CLOSED)
                     Connection closed
             Actual: Timeout

    5.3. Stream Priority
      5.3.1. Stream Dependencies
        using source address 127.0.0.1:53338
        × 2: Sends PRIORITY frame that depend on itself
          -> The endpoint MUST treat this as a stream error of type PROTOCOL_ERROR.
             Expected: GOAWAY Frame (Error Code: PROTOCOL_ERROR)
                       RST_STREAM Frame (Error Code: PROTOCOL_ERROR)
                       Connection closed
               Actual: Timeout

    5.5. Extending HTTP/2
      using source address 127.0.0.1:53344
      × 2: Sends an unknown extension frame in the middle of a header block
        -> The endpoint MUST treat as a connection error of type PROTOCOL_ERROR.
           Expected: GOAWAY Frame (Error Code: PROTOCOL_ERROR)
                     Connection closed
             Actual: Timeout

  6. Frame Definitions
    6.2. HEADERS
      using source address 127.0.0.1:53354
      × 2: Sends a HEADERS frame to another stream while sending a HEADERS frame
        -> The endpoint MUST treat this as a connection error of type PROTOCOL_ERROR.
           Expected: GOAWAY Frame (Error Code: PROTOCOL_ERROR)
                     Connection closed
             Actual: HEADERS Frame (length:111, flags:0x05, stream_id:3)

    6.9. WINDOW_UPDATE
      6.9.1. The Flow-Control Window
        using source address 127.0.0.1:53412
        × 2: Sends multiple WINDOW_UPDATE frames increasing the flow control window to above 2^31-1
          -> The endpoint MUST sends a GOAWAY frame with a FLOW_CONTROL_ERROR code.
             Expected: GOAWAY Frame (Error Code: FLOW_CONTROL_ERROR)
               Actual: Timeout
        using source address 127.0.0.1:53414
        × 3: Sends multiple WINDOW_UPDATE frames increasing the flow control window to above 2^31-1 on a stream
          -> The endpoint MUST sends a RST_STREAM frame with a FLOW_CONTROL_ERROR code.
             Expected: RST_STREAM Frame (Error Code: FLOW_CONTROL_ERROR)
               Actual: Timeout

  8. HTTP Message Exchanges
    8.1. HTTP Request/Response Exchange
      using source address 127.0.0.1:53442
      × 1: Sends a second HEADERS frame without the END_STREAM flag
        -> The endpoint MUST respond with a stream error of type PROTOCOL_ERROR.
           Expected: GOAWAY Frame (Error Code: PROTOCOL_ERROR)
                     RST_STREAM Frame (Error Code: PROTOCOL_ERROR)
                     Connection closed
             Actual: Timeout

      8.1.2. HTTP Header Fields
        using source address 127.0.0.1:53444
        × 1: Sends a HEADERS frame that contains the header field name in uppercase letters
          -> The endpoint MUST respond with a stream error of type PROTOCOL_ERROR.
             Expected: GOAWAY Frame (Error Code: PROTOCOL_ERROR)
                       RST_STREAM Frame (Error Code: PROTOCOL_ERROR)
                       Connection closed
               Actual: HEADERS Frame (length:111, flags:0x05, stream_id:1)

        8.1.2.2. Connection-Specific Header Fields
          using source address 127.0.0.1:53456
          × 2: Sends a HEADERS frame that contains the TE header field with any value other than "trailers"
            -> The endpoint MUST respond with a stream error of type PROTOCOL_ERROR.
               Expected: GOAWAY Frame (Error Code: PROTOCOL_ERROR)
                         RST_STREAM Frame (Error Code: PROTOCOL_ERROR)
                         Connection closed
                 Actual: HEADERS Frame (length:111, flags:0x05, stream_id:1)

HPACK: Header Compression for HTTP/2
  4. Dynamic Table Management
    4.2. Maximum Table Size
      using source address 127.0.0.1:53482
      × 1: Sends a dynamic table size update at the end of header block
        -> The endpoint MUST treat this as a decoding error.
           Expected: GOAWAY Frame (Error Code: COMPRESSION_ERROR)
                     Connection closed
             Actual: HEADERS Frame (length:111, flags:0x05, stream_id:1)

Finished in 28.2347 seconds
146 tests, 127 passed, 5 skipped, 14 failed
pale-emperor commented 2 years ago

Also h2.test_h2_specs.H2Spec.test_h2_specs is returns ... ok But some tests inside h2spec failed. So we need add some checks for this testcase

krizhanovsky commented 2 years ago

I forked h2spec https://github.com/tempesta-tech/h2spec that we can explicitly define which tests to run in the suite and mask the tests, which we have known issues for.