You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2021/02/01 03:39:24 UTC

[GitHub] [trafficserver] randall opened a new pull request #7464: Upgrade Catch.hpp to v2.13.3

randall opened a new pull request #7464:
URL: https://github.com/apache/trafficserver/pull/7464


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] dragon512 commented on a change in pull request #7464: Upgrade Catch.hpp to v2.13.3

Posted by GitBox <gi...@apache.org>.
dragon512 commented on a change in pull request #7464:
URL: https://github.com/apache/trafficserver/pull/7464#discussion_r567974419



##########
File path: proxy/http2/unit_tests/test_Http2Frame.cc
##########
@@ -39,13 +39,13 @@ TEST_CASE("Http2Frame", "[http2][Http2Frame]")
     uint8_t hdr_block_len = sizeof(hdr_block);
 
     Http2PushPromiseFrame frame(id, flags, pp, hdr_block, hdr_block_len);
-    uint64_t written = frame.write_to(miob);
+    int64_t written = frame.write_to(miob);
 
     CHECK(written == HTTP2_FRAME_HEADER_LEN + sizeof(Http2StreamId) + hdr_block_len);
     CHECK(written == miob_r->read_avail());
 
     uint8_t buf[32] = {0};
-    uint64_t read   = miob_r->read(buf, written);
+    int64_t read    = miob_r->read(buf, written);

Review comment:
       I might have found the answer... it looks like we are having lots of size_t values as return values.. so you are getting a lot of these issues 
   
   ```
   unit_tests/test_Http2Frame.cc:44:19: error: comparison of integer expressions of different signedness: 'int64_t' {aka 'long int'} and 'size_t' {aka 'long unsigned int'} [-Werror=sign-compare]
        CHECK(written == HTTP2_FRAME_HEADER_LEN + sizeof(Http2StreamId) + hdr_block_len);
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] dragon512 commented on a change in pull request #7464: Upgrade Catch.hpp to v2.13.3

Posted by GitBox <gi...@apache.org>.
dragon512 commented on a change in pull request #7464:
URL: https://github.com/apache/trafficserver/pull/7464#discussion_r567969874



##########
File path: proxy/http2/unit_tests/test_Http2Frame.cc
##########
@@ -39,13 +39,13 @@ TEST_CASE("Http2Frame", "[http2][Http2Frame]")
     uint8_t hdr_block_len = sizeof(hdr_block);
 
     Http2PushPromiseFrame frame(id, flags, pp, hdr_block, hdr_block_len);
-    uint64_t written = frame.write_to(miob);
+    int64_t written = frame.write_to(miob);
 
     CHECK(written == HTTP2_FRAME_HEADER_LEN + sizeof(Http2StreamId) + hdr_block_len);
     CHECK(written == miob_r->read_avail());
 
     uint8_t buf[32] = {0};
-    uint64_t read   = miob_r->read(buf, written);
+    int64_t read    = miob_r->read(buf, written);

Review comment:
       Just a quick question on this on this looked odd. should `miob_r->read(buf, written);` return an unsigned?
   
   or does it return a signed so you are changing uint64_t to init64_t to avoid a warning?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] zwoop commented on pull request #7464: Upgrade Catch.hpp to v2.13.4

Posted by GitBox <gi...@apache.org>.
zwoop commented on pull request #7464:
URL: https://github.com/apache/trafficserver/pull/7464#issuecomment-784380211


   Cherry-picked to v9.1.x branch.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] SolidWallOfCode commented on a change in pull request #7464: Upgrade Catch.hpp to v2.13.3

Posted by GitBox <gi...@apache.org>.
SolidWallOfCode commented on a change in pull request #7464:
URL: https://github.com/apache/trafficserver/pull/7464#discussion_r568165950



##########
File path: proxy/http2/unit_tests/test_Http2Frame.cc
##########
@@ -39,13 +39,13 @@ TEST_CASE("Http2Frame", "[http2][Http2Frame]")
     uint8_t hdr_block_len = sizeof(hdr_block);
 
     Http2PushPromiseFrame frame(id, flags, pp, hdr_block, hdr_block_len);
-    uint64_t written = frame.write_to(miob);
+    int64_t written = frame.write_to(miob);
 
     CHECK(written == HTTP2_FRAME_HEADER_LEN + sizeof(Http2StreamId) + hdr_block_len);
     CHECK(written == miob_r->read_avail());
 
     uint8_t buf[32] = {0};
-    uint64_t read   = miob_r->read(buf, written);
+    int64_t read    = miob_r->read(buf, written);

Review comment:
       The answer is use `ssize_t`. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] dragon512 commented on a change in pull request #7464: Upgrade Catch.hpp to v2.13.3

Posted by GitBox <gi...@apache.org>.
dragon512 commented on a change in pull request #7464:
URL: https://github.com/apache/trafficserver/pull/7464#discussion_r567974419



##########
File path: proxy/http2/unit_tests/test_Http2Frame.cc
##########
@@ -39,13 +39,13 @@ TEST_CASE("Http2Frame", "[http2][Http2Frame]")
     uint8_t hdr_block_len = sizeof(hdr_block);
 
     Http2PushPromiseFrame frame(id, flags, pp, hdr_block, hdr_block_len);
-    uint64_t written = frame.write_to(miob);
+    int64_t written = frame.write_to(miob);
 
     CHECK(written == HTTP2_FRAME_HEADER_LEN + sizeof(Http2StreamId) + hdr_block_len);
     CHECK(written == miob_r->read_avail());
 
     uint8_t buf[32] = {0};
-    uint64_t read   = miob_r->read(buf, written);
+    int64_t read    = miob_r->read(buf, written);

Review comment:
       I might have found the answer... it looks like we are having lots of size_t values as return values.. so you are getting a lot of these issues 
   
   ```
   unit_tests/test_Http2Frame.cc:44:19: error: comparison of integer expressions of different signedness: 'int64_t' {aka 'long int'} and 'size_t' {aka 'long unsigned int'} [-Werror=sign-compare]
        CHECK(written == HTTP2_FRAME_HEADER_LEN + sizeof(Http2StreamId) + hdr_block_len);
   ```
   
   Makes me wish we had a std::length_t type to deal with this as size_t is not really the correct type.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] bryancall merged pull request #7464: Upgrade Catch.hpp to v2.13.4

Posted by GitBox <gi...@apache.org>.
bryancall merged pull request #7464:
URL: https://github.com/apache/trafficserver/pull/7464


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org