Merge pull request #4294 from ctiller/test-bad-settings

Add a test of invalid values to bad_client
pull/4316/head
Nicolas Noble 9 years ago
commit 8a8a8760eb
  1. 5
      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;
}

Loading…
Cancel
Save