Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

build and testsuite failures with zlib 1.2.11 #653

Closed
LocutusOfBorg opened this issue Jun 11, 2017 · 3 comments
Closed

build and testsuite failures with zlib 1.2.11 #653

LocutusOfBorg opened this issue Jun 11, 2017 · 3 comments

Comments

@LocutusOfBorg
Copy link
Contributor

Hello, as said, with the new zlib websocketpp is not working anymore:

/usr/bin/ctest --force-new-ctest-process -j4
Test project /websocketpp-0.7.0/obj-x86_64-linux-gnu
      Start  1: test_connection
      Start  2: test_endpoint
      Start  3: test_permessage_deflate
      Start  4: test_http
 1/27 Test  #2: test_endpoint ..................................   Passed    0.01 sec
 2/27 Test  #3: test_permessage_deflate ........................***Failed    0.01 sec
Running 43 test cases...
/websocketpp-0.7.0/test/extension/permessage_deflate.cpp(555): error: in "compress_data_large": check v.ec == websocketpp::lib::error_code() has failed [websocketpp.extension.permessage-deflate:8 != system:0]
/websocketpp-0.7.0/test/extension/permessage_deflate.cpp(558): error: in "compress_data_large": check v.ec == websocketpp::lib::error_code() has failed [websocketpp.extension.permessage-deflate:8 != system:0]
/websocketpp-0.7.0/test/extension/permessage_deflate.cpp(559): error: in "compress_data_large": check compress_in == decompress_out has failed [************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************ != ]

*** 3 failures are detected in the test module "permessage_deflate"

 3/27 Test  #1: test_connection ................................   Passed    0.01 sec
 4/27 Test  #4: test_http ......................................   Passed    0.01 sec
      Start  5: test_logger
      Start  6: test_message_buffer
      Start  7: test_processor
      Start  8: test_processor_hybi00
 5/27 Test  #6: test_message_buffer ............................   Passed    0.00 sec
 6/27 Test  #5: test_logger ....................................   Passed    0.00 sec
 7/27 Test  #8: test_processor_hybi00 ..........................   Passed    0.00 sec
 8/27 Test  #7: test_processor .................................   Passed    0.00 sec
      Start  9: test_processor_hybi07
      Start 10: test_processor_hybi08
      Start 11: test_processor_hybi13
      Start 12: test_processor_extension_permessage_compress
 9/27 Test  #9: test_processor_hybi07 ..........................   Passed    0.00 sec
10/27 Test #10: test_processor_hybi08 ..........................   Passed    0.00 sec
11/27 Test #11: test_processor_hybi13 ..........................   Passed    0.01 sec
12/27 Test #12: test_processor_extension_permessage_compress ...   Passed    0.01 sec
      Start 13: test_random_none
      Start 14: test_random_random_device
      Start 15: test_roles_client
      Start 16: test_roles_server
13/27 Test #15: test_roles_client ..............................   Passed    0.00 sec
14/27 Test #14: test_random_random_device ......................   Passed    0.01 sec
15/27 Test #13: test_random_none ...............................   Passed    0.01 sec
16/27 Test #16: test_roles_server ..............................   Passed    0.00 sec
      Start 17: test_transport_asio_security
      Start 18: test_transport_iostream_base
      Start 19: test_transport_iostream_endpoint
      Start 20: test_transport_iostream_connection
17/27 Test #18: test_transport_iostream_base ...................   Passed    0.00 sec
18/27 Test #19: test_transport_iostream_endpoint ...............   Passed    0.00 sec
19/27 Test #17: test_transport_asio_security ...................   Passed    0.00 sec
20/27 Test #20: test_transport_iostream_connection .............   Passed    0.00 sec
      Start 21: test_transport_asio_base
      Start 22: test_close
      Start 23: test_error
      Start 24: test_frame
21/27 Test #23: test_error .....................................   Passed    0.00 sec
22/27 Test #21: test_transport_asio_base .......................   Passed    0.00 sec
23/27 Test #24: test_frame .....................................   Passed    0.00 sec
24/27 Test #22: test_close .....................................   Passed    0.01 sec
      Start 25: test_sha1
      Start 26: test_uri
      Start 27: test_utilities
25/27 Test #27: test_utilities .................................   Passed    0.00 sec
26/27 Test #25: test_sha1 ......................................   Passed    0.01 sec
27/27 Test #26: test_uri .......................................   Passed    0.01 sec

96% tests passed, 1 tests failed out of 27

Total Test time (real) =   0.06 sec

The following tests FAILED:
	  3 - test_permessage_deflate (Failed)
Errors while running CTest
Makefile:86: recipe for target 'test' failed
make[2]: *** [test] Error 8
make[2]: Leaving directory '/websocketpp-0.7.0/obj-x86_64-linux-gnu'
@LocutusOfBorg
Copy link
Contributor Author

this is the failing test, that works with a combination of different toolchains (old-new boost 1.61 and 1.62, gcc-5/gcc-6, new and old cmake and so on)
the only difference triggering that failure is zlib version

BOOST_AUTO_TEST_CASE( compress_data_large ) {
    ext_vars v;

    std::string compress_in(600,'*');
    std::string compress_out;
    std::string decompress_out;

    websocketpp::http::attribute_list alist;

    alist["server_max_window_bits"] = "8";
    v.exts.set_server_max_window_bits(8,websocketpp::extensions::permessage_deflate::mode::smallest);

    v.exts.negotiate(alist);
    v.exts.init(true);

    v.ec = v.exts.compress(compress_in,compress_out);
    BOOST_CHECK_EQUAL( v.ec, websocketpp::lib::error_code() );

    v.ec = v.exts.decompress(reinterpret_cast<const uint8_t *>(compress_out.data()),compress_out.size(),decompress_out);
    BOOST_CHECK_EQUAL( v.ec, websocketpp::lib::error_code() );
    BOOST_CHECK_EQUAL( compress_in, decompress_out );

do you have any clue?
you can see the complete build failures here
https://launchpad.net/ubuntu/+source/websocketpp/0.7.0-8

@zaphoyd
Copy link
Owner

zaphoyd commented Jun 11, 2017

i've been able to reproduce this locally, will take a look

zaphoyd pushed a commit that referenced this issue Jun 11, 2017
…t a 256 bit window. Improve extension negotiation error checking and documentation. fixes #596 fixes #653
@LocutusOfBorg
Copy link
Contributor Author

it works correctly, I backported the two commits on top of 0.7.0 and I'll upload in a few hours

thanks a lot!

c72578 added a commit to c72578/rpmbuild that referenced this issue Jun 13, 2017
* Tue Jun 13 2017 Wolfgang Stöggl <c72578@yahoo.de> - 0.7.0-7
- Add patches to fix zlib test failure (test_permessage_deflate)
- Disable tests test_transport, test_transport_asio_timers

Fix build and test failures with zlib 1.2.11.
Fixes test_permessage_deflate
zaphoyd/websocketpp#653
Upstream patches, backported to websocketpp-0.7.0
zaphoyd/websocketpp@9ddb300
websocketpp-0.7.0-zlib-permessage-deflate.patch
zaphoyd/websocketpp@4cab5e5
websocketpp-0.7.0-minor-adjustments-to-recent-extension-negotiation.patch
c72578 added a commit to c72578/rpmbuild that referenced this issue Jun 13, 2017
Fix build and test failures with zlib 1.2.11.
Fixes test_permessage_deflate
zaphoyd/websocketpp#653
Upstream patches, backported to websocketpp-0.7.0
zaphoyd/websocketpp@9ddb300
websocketpp-0.7.0-zlib-permessage-deflate.patch
zaphoyd/websocketpp@4cab5e5
websocketpp-0.7.0-minor-adjustments-to-recent-extension-negotiation.patch
Disable the following tests, which fail occasionally:
test_transport, test_transport_asio_timers
websocketpp-0.7.0-disable-test_transport-test_transport_asio_timers.patch
rfric pushed a commit to DECENTfoundation/websocketpp that referenced this issue Jun 25, 2019
…t a 256 bit window. Improve extension negotiation error checking and documentation. fixes zaphoyd#596 fixes zaphoyd#653
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants