diff options
author | Craig Tiller <ctiller@google.com> | 2016-03-25 13:38:14 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-03-25 13:38:14 -0700 |
commit | f40df23eebdc0fb367ea265be98a4f86b6efbc94 (patch) | |
tree | bdad84361157815b91138e2a6ebdbedefe7c19c7 /test/core/bad_client | |
parent | b7b20fee9649c57df0aef8cb54f85465312bab80 (diff) |
Auto-changes
Diffstat (limited to 'test/core/bad_client')
-rw-r--r-- | test/core/bad_client/bad_client.c | 8 | ||||
-rw-r--r-- | test/core/bad_client/tests/badreq.c | 8 | ||||
-rw-r--r-- | test/core/bad_client/tests/connection_prefix.c | 8 | ||||
-rw-r--r-- | test/core/bad_client/tests/headers.c | 8 | ||||
-rw-r--r-- | test/core/bad_client/tests/initial_settings_frame.c | 8 | ||||
-rw-r--r-- | test/core/bad_client/tests/server_registered_method.c | 2 | ||||
-rw-r--r-- | test/core/bad_client/tests/simple_request.c | 8 | ||||
-rw-r--r-- | test/core/bad_client/tests/unknown_frame.c | 8 | ||||
-rw-r--r-- | test/core/bad_client/tests/window_overflow.c | 17 |
9 files changed, 41 insertions, 34 deletions
diff --git a/test/core/bad_client/bad_client.c b/test/core/bad_client/bad_client.c index ba1901301c..c7130f9580 100644 --- a/test/core/bad_client/bad_client.c +++ b/test/core/bad_client/bad_client.c @@ -36,9 +36,9 @@ #include "src/core/channel/channel_stack.h" #include "src/core/channel/http_server_filter.h" #include "src/core/iomgr/endpoint_pair.h" +#include "src/core/support/string.h" #include "src/core/surface/completion_queue.h" #include "src/core/surface/server.h" -#include "src/core/support/string.h" #include "src/core/transport/chttp2_transport.h" #include <grpc/support/alloc.h> @@ -155,9 +155,9 @@ void grpc_run_bad_client_test(grpc_bad_client_server_side_validator validator, grpc_exec_ctx_finish(&exec_ctx); } grpc_server_shutdown_and_notify(a.server, a.cq, NULL); - GPR_ASSERT(grpc_completion_queue_pluck(a.cq, NULL, - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + a.cq, NULL, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(a.server); grpc_completion_queue_destroy(a.cq); gpr_slice_buffer_destroy(&outgoing); diff --git a/test/core/bad_client/tests/badreq.c b/test/core/bad_client/tests/badreq.c index 6d59d25b92..024a1e7953 100644 --- a/test/core/bad_client/tests/badreq.c +++ b/test/core/bad_client/tests/badreq.c @@ -35,8 +35,8 @@ #include <string.h> -#include "test/core/end2end/cq_verifier.h" #include "src/core/surface/server.h" +#include "test/core/end2end/cq_verifier.h" #define PFX_STR \ "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" \ @@ -45,9 +45,9 @@ static void verifier(grpc_server *server, grpc_completion_queue *cq, void *registered_method) { while (grpc_server_has_open_connections(server)) { - GPR_ASSERT(grpc_completion_queue_next(cq, - GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), - NULL).type == GRPC_QUEUE_TIMEOUT); + GPR_ASSERT(grpc_completion_queue_next( + cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), NULL) + .type == GRPC_QUEUE_TIMEOUT); } } diff --git a/test/core/bad_client/tests/connection_prefix.c b/test/core/bad_client/tests/connection_prefix.c index 66ff8c2936..8d74124b19 100644 --- a/test/core/bad_client/tests/connection_prefix.c +++ b/test/core/bad_client/tests/connection_prefix.c @@ -31,15 +31,15 @@ * */ -#include "test/core/bad_client/bad_client.h" #include "src/core/surface/server.h" +#include "test/core/bad_client/bad_client.h" static void verifier(grpc_server *server, grpc_completion_queue *cq, void *registered_method) { while (grpc_server_has_open_connections(server)) { - GPR_ASSERT(grpc_completion_queue_next(cq, - GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), - NULL).type == GRPC_QUEUE_TIMEOUT); + GPR_ASSERT(grpc_completion_queue_next( + cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), NULL) + .type == GRPC_QUEUE_TIMEOUT); } } diff --git a/test/core/bad_client/tests/headers.c b/test/core/bad_client/tests/headers.c index 2186a4ffcb..81a07de442 100644 --- a/test/core/bad_client/tests/headers.c +++ b/test/core/bad_client/tests/headers.c @@ -31,8 +31,8 @@ * */ -#include "test/core/bad_client/bad_client.h" #include "src/core/surface/server.h" +#include "test/core/bad_client/bad_client.h" #define PFX_STR \ "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" \ @@ -41,9 +41,9 @@ static void verifier(grpc_server *server, grpc_completion_queue *cq, void *registered_method) { while (grpc_server_has_open_connections(server)) { - GPR_ASSERT(grpc_completion_queue_next(cq, - GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), - NULL).type == GRPC_QUEUE_TIMEOUT); + GPR_ASSERT(grpc_completion_queue_next( + cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), NULL) + .type == GRPC_QUEUE_TIMEOUT); } } diff --git a/test/core/bad_client/tests/initial_settings_frame.c b/test/core/bad_client/tests/initial_settings_frame.c index fb6149cc3b..108b0bd398 100644 --- a/test/core/bad_client/tests/initial_settings_frame.c +++ b/test/core/bad_client/tests/initial_settings_frame.c @@ -31,8 +31,8 @@ * */ -#include "test/core/bad_client/bad_client.h" #include "src/core/surface/server.h" +#include "test/core/bad_client/bad_client.h" #define PFX_STR "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" #define ONE_SETTING_HDR "\x00\x00\x06\x04\x00\x00\x00\x00\x00" @@ -40,9 +40,9 @@ static void verifier(grpc_server *server, grpc_completion_queue *cq, void *registered_method) { while (grpc_server_has_open_connections(server)) { - GPR_ASSERT(grpc_completion_queue_next(cq, - GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), - NULL).type == GRPC_QUEUE_TIMEOUT); + GPR_ASSERT(grpc_completion_queue_next( + cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), NULL) + .type == GRPC_QUEUE_TIMEOUT); } } diff --git a/test/core/bad_client/tests/server_registered_method.c b/test/core/bad_client/tests/server_registered_method.c index dc6ecc51f0..19dfeb3355 100644 --- a/test/core/bad_client/tests/server_registered_method.c +++ b/test/core/bad_client/tests/server_registered_method.c @@ -35,8 +35,8 @@ #include <string.h> -#include "test/core/end2end/cq_verifier.h" #include "src/core/surface/server.h" +#include "test/core/end2end/cq_verifier.h" #define PFX_STR \ "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" \ diff --git a/test/core/bad_client/tests/simple_request.c b/test/core/bad_client/tests/simple_request.c index c04319edc5..f90ffea188 100644 --- a/test/core/bad_client/tests/simple_request.c +++ b/test/core/bad_client/tests/simple_request.c @@ -35,8 +35,8 @@ #include <string.h> -#include "test/core/end2end/cq_verifier.h" #include "src/core/surface/server.h" +#include "test/core/end2end/cq_verifier.h" #define PFX_STR \ "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" \ @@ -108,9 +108,9 @@ static void verifier(grpc_server *server, grpc_completion_queue *cq, static void failure_verifier(grpc_server *server, grpc_completion_queue *cq, void *registered_method) { while (grpc_server_has_open_connections(server)) { - GPR_ASSERT(grpc_completion_queue_next(cq, - GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), - NULL).type == GRPC_QUEUE_TIMEOUT); + GPR_ASSERT(grpc_completion_queue_next( + cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), NULL) + .type == GRPC_QUEUE_TIMEOUT); } } diff --git a/test/core/bad_client/tests/unknown_frame.c b/test/core/bad_client/tests/unknown_frame.c index 2ef340eeb5..cc8e2157f2 100644 --- a/test/core/bad_client/tests/unknown_frame.c +++ b/test/core/bad_client/tests/unknown_frame.c @@ -31,8 +31,8 @@ * */ -#include "test/core/bad_client/bad_client.h" #include "src/core/surface/server.h" +#include "test/core/bad_client/bad_client.h" #define PFX_STR \ "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" \ @@ -41,9 +41,9 @@ static void verifier(grpc_server *server, grpc_completion_queue *cq, void *registered_method) { while (grpc_server_has_open_connections(server)) { - GPR_ASSERT(grpc_completion_queue_next(cq, - GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), - NULL).type == GRPC_QUEUE_TIMEOUT); + GPR_ASSERT(grpc_completion_queue_next( + cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), NULL) + .type == GRPC_QUEUE_TIMEOUT); } } diff --git a/test/core/bad_client/tests/window_overflow.c b/test/core/bad_client/tests/window_overflow.c index 646d5c5f4c..0ac161097f 100644 --- a/test/core/bad_client/tests/window_overflow.c +++ b/test/core/bad_client/tests/window_overflow.c @@ -60,9 +60,9 @@ static void verifier(grpc_server *server, grpc_completion_queue *cq, void *registered_method) { while (grpc_server_has_open_connections(server)) { - GPR_ASSERT(grpc_completion_queue_next(cq, - GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), - NULL).type == GRPC_QUEUE_TIMEOUT); + GPR_ASSERT(grpc_completion_queue_next( + cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), NULL) + .type == GRPC_QUEUE_TIMEOUT); } } @@ -90,8 +90,15 @@ int main(int argc, char **argv) { addbuf(PFX_STR, sizeof(PFX_STR) - 1); for (i = 0; i < NUM_FRAMES; i++) { - uint8_t hdr[9] = {(uint8_t)(FRAME_SIZE >> 16), (uint8_t)(FRAME_SIZE >> 8), - (uint8_t)FRAME_SIZE, 0, 0, 0, 0, 0, 1}; + uint8_t hdr[9] = {(uint8_t)(FRAME_SIZE >> 16), + (uint8_t)(FRAME_SIZE >> 8), + (uint8_t)FRAME_SIZE, + 0, + 0, + 0, + 0, + 0, + 1}; addbuf(hdr, sizeof(hdr)); for (j = 0; j < MESSAGES_PER_FRAME; j++) { uint8_t message[5] = {0, 0, 0, 0, 0}; |