From 47e541ccffc1de636e202401d234805502afcf1f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 7 Dec 2015 08:51:19 -0800 Subject: Add a test of invalid values to bad_client --- test/core/bad_client/tests/initial_settings_frame.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/core/bad_client/tests/initial_settings_frame.c b/test/core/bad_client/tests/initial_settings_frame.c index 827e93b67c..6ed15bbed1 100644 --- a/test/core/bad_client/tests/initial_settings_frame.c +++ b/test/core/bad_client/tests/initial_settings_frame.c @@ -35,6 +35,7 @@ #include "src/core/surface/server.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" static void verifier(grpc_server *server, grpc_completion_queue *cq) { while (grpc_server_has_open_connections(server)) { @@ -90,6 +91,10 @@ int main(int argc, char **argv) { PFX_STR "\x00\x00\x04\x04\x00\x00\x00\x00\x00", 0); GRPC_RUN_BAD_CLIENT_TEST(verifier, 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; } -- cgit v1.2.3