aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Nicolas Noble <nicolasnoble@users.noreply.github.com>2015-12-07 11:45:30 -0800
committerGravatar Nicolas Noble <nicolasnoble@users.noreply.github.com>2015-12-07 11:45:30 -0800
commit8a8a8760eb243fe758452a2e2bed6e2821b992f1 (patch)
tree34b08e58611cb5e775d90a78f1384d657acca320 /test
parent72e6c6837ee241771a734ec5feee43f53acfcbee (diff)
parent47e541ccffc1de636e202401d234805502afcf1f (diff)
Merge pull request #4294 from ctiller/test-bad-settings
Add a test of invalid values to bad_client
Diffstat (limited to 'test')
-rw-r--r--test/core/bad_client/tests/initial_settings_frame.c5
1 files changed, 5 insertions, 0 deletions
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;
}