Skip to content
Snippets Groups Projects
Commit 47e541cc authored by Craig Tiller's avatar Craig Tiller
Browse files

Add a test of invalid values to bad_client

parent b67ef24d
No related branches found
No related tags found
No related merge requests found
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "src/core/surface/server.h" #include "src/core/surface/server.h"
#define PFX_STR "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" #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"
static void verifier(grpc_server *server, grpc_completion_queue *cq) { static void verifier(grpc_server *server, grpc_completion_queue *cq) {
while (grpc_server_has_open_connections(server)) { while (grpc_server_has_open_connections(server)) {
...@@ -90,6 +91,10 @@ int main(int argc, char **argv) { ...@@ -90,6 +91,10 @@ int main(int argc, char **argv) {
PFX_STR "\x00\x00\x04\x04\x00\x00\x00\x00\x00", 0); PFX_STR "\x00\x00\x04\x04\x00\x00\x00\x00\x00", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, GRPC_RUN_BAD_CLIENT_TEST(verifier,
PFX_STR "\x00\x00\x05\x04\x00\x00\x00\x00\x00", 0); PFX_STR "\x00\x00\x05\x04\x00\x00\x00\x00\x00", 0);
/* some settings values are illegal */
/* max frame size = 0 */
GRPC_RUN_BAD_CLIENT_TEST(verifier,
PFX_STR ONE_SETTING_HDR "\x00\x05\x00\x00\x00\x00", GRPC_BAD_CLIENT_DISCONNECT);
return 0; return 0;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment