From 2123974071e502cde2dea3a457dccfe66af58bc1 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 23 Mar 2016 16:33:28 -0700 Subject: [PATCH] Merge fixes --- Makefile | 71 +++++-------------- build.yaml | 24 ++----- .../0299ca2580e4398d170c4a336e0c33eb2cd9d427 | 0 .../05e613853d64a9669ea3cf41b0de777dc24931ba | 0 .../069352518a1d1baa05f317c677d275cefda2ac97 | 0 .../0c5b7c2569410b526605e308309a7f36574e530d | 0 .../0ef3d0a84360bb5ad66274f1226f5cb273ecdbcf | 0 .../1e1273f90187fdf5df3625764245610f86af6aa4 | 0 .../33f4ea0c7ea27c37d8f95cfa64d282370efdafd2 | 0 .../35f0c561297cfc840ddaeebb9fc61091f4eadece | 0 .../39b19c41ba537f37511eff7727733715db432e76 | 0 .../3e3c4756d5e40b5aa250954cbac86b826e70a7ac | 0 .../3fb034e66ee5494a67acae1b4e6ff64ba92a2046 | 0 .../487725eb38511c79a9340bf4560a1411061fa6fa | 0 .../4b1f1f79a0bfa3f942479dd5f8edb59a7c257c55 | 0 .../5028c56a5116a186b7343ff59567b47347a0796d | 0 .../5b6292bdf009b0daecbc90b85cca30a88c36eec5 | 0 .../657368df512ca6294b9df16adf935a3f374a8be2 | 0 .../81f59a12b458ec3604035cb962165c604d1355e6 | 0 .../8f41c50e88ee8c17ecad3d41d63d38fb12aca0b9 | 0 .../97e4499d450c95660de86747f527e670f2012548 | 0 .../aa3bbb876eafa8ad8ca4ff2eabc6dd94341d2441 | 0 .../b04fea5c041c707db0ad9c09a81672557b52cc47 | 0 .../c55ce9995b002e88a102ae2891a71e8bacb346c8 | 0 .../ca5a0c00b8969310acb73d15ad0d0c602f1bd0c2 | 0 .../d4c3e4cf5d035596433c30eaabbd2b2925f4b453 | 0 .../d936dad71c129cf659097dc3db64550c4dd467f4 | 0 .../fc5d4b9117ba9e87388174aee4f4970bdfe8d066 | 0 .../{request_corpus => corpus}/request1.txt | 0 .../{response_corpus => corpus}/response1.txt | 0 test/core/http/{request_fuzzer.c => fuzzer.c} | 12 ++-- test/core/http/response_fuzzer.c | 50 ------------- ...est_fuzzer_test.sh => http_fuzzer_test.sh} | 2 +- .../runners/http_response_fuzzer_test.sh | 32 --------- tools/run_tests/sources_and_headers.json | 24 ++----- 35 files changed, 36 insertions(+), 179 deletions(-) rename test/core/http/{response_corpus => corpus}/0299ca2580e4398d170c4a336e0c33eb2cd9d427 (100%) rename test/core/http/{response_corpus => corpus}/05e613853d64a9669ea3cf41b0de777dc24931ba (100%) rename test/core/http/{response_corpus => corpus}/069352518a1d1baa05f317c677d275cefda2ac97 (100%) rename test/core/http/{response_corpus => corpus}/0c5b7c2569410b526605e308309a7f36574e530d (100%) rename test/core/http/{response_corpus => corpus}/0ef3d0a84360bb5ad66274f1226f5cb273ecdbcf (100%) rename test/core/http/{response_corpus => corpus}/1e1273f90187fdf5df3625764245610f86af6aa4 (100%) rename test/core/http/{response_corpus => corpus}/33f4ea0c7ea27c37d8f95cfa64d282370efdafd2 (100%) rename test/core/http/{response_corpus => corpus}/35f0c561297cfc840ddaeebb9fc61091f4eadece (100%) rename test/core/http/{response_corpus => corpus}/39b19c41ba537f37511eff7727733715db432e76 (100%) rename test/core/http/{response_corpus => corpus}/3e3c4756d5e40b5aa250954cbac86b826e70a7ac (100%) rename test/core/http/{response_corpus => corpus}/3fb034e66ee5494a67acae1b4e6ff64ba92a2046 (100%) rename test/core/http/{response_corpus => corpus}/487725eb38511c79a9340bf4560a1411061fa6fa (100%) rename test/core/http/{response_corpus => corpus}/4b1f1f79a0bfa3f942479dd5f8edb59a7c257c55 (100%) rename test/core/http/{response_corpus => corpus}/5028c56a5116a186b7343ff59567b47347a0796d (100%) rename test/core/http/{response_corpus => corpus}/5b6292bdf009b0daecbc90b85cca30a88c36eec5 (100%) rename test/core/http/{response_corpus => corpus}/657368df512ca6294b9df16adf935a3f374a8be2 (100%) rename test/core/http/{response_corpus => corpus}/81f59a12b458ec3604035cb962165c604d1355e6 (100%) rename test/core/http/{response_corpus => corpus}/8f41c50e88ee8c17ecad3d41d63d38fb12aca0b9 (100%) rename test/core/http/{response_corpus => corpus}/97e4499d450c95660de86747f527e670f2012548 (100%) rename test/core/http/{response_corpus => corpus}/aa3bbb876eafa8ad8ca4ff2eabc6dd94341d2441 (100%) rename test/core/http/{response_corpus => corpus}/b04fea5c041c707db0ad9c09a81672557b52cc47 (100%) rename test/core/http/{response_corpus => corpus}/c55ce9995b002e88a102ae2891a71e8bacb346c8 (100%) rename test/core/http/{response_corpus => corpus}/ca5a0c00b8969310acb73d15ad0d0c602f1bd0c2 (100%) rename test/core/http/{response_corpus => corpus}/d4c3e4cf5d035596433c30eaabbd2b2925f4b453 (100%) rename test/core/http/{response_corpus => corpus}/d936dad71c129cf659097dc3db64550c4dd467f4 (100%) rename test/core/http/{response_corpus => corpus}/fc5d4b9117ba9e87388174aee4f4970bdfe8d066 (100%) rename test/core/http/{request_corpus => corpus}/request1.txt (100%) rename test/core/http/{response_corpus => corpus}/response1.txt (100%) rename test/core/http/{request_fuzzer.c => fuzzer.c} (89%) delete mode 100644 test/core/http/response_fuzzer.c rename tools/fuzzer/runners/{http_request_fuzzer_test.sh => http_fuzzer_test.sh} (93%) delete mode 100644 tools/fuzzer/runners/http_response_fuzzer_test.sh diff --git a/Makefile b/Makefile index d3b5ef88801..b974126a974 100644 --- a/Makefile +++ b/Makefile @@ -928,9 +928,8 @@ grpc_verify_jwt: $(BINDIR)/$(CONFIG)/grpc_verify_jwt hpack_parser_fuzzer_test: $(BINDIR)/$(CONFIG)/hpack_parser_fuzzer_test hpack_parser_test: $(BINDIR)/$(CONFIG)/hpack_parser_test hpack_table_test: $(BINDIR)/$(CONFIG)/hpack_table_test +http_fuzzer_test: $(BINDIR)/$(CONFIG)/http_fuzzer_test http_parser_test: $(BINDIR)/$(CONFIG)/http_parser_test -http_request_fuzzer_test: $(BINDIR)/$(CONFIG)/http_request_fuzzer_test -http_response_fuzzer_test: $(BINDIR)/$(CONFIG)/http_response_fuzzer_test httpcli_format_request_test: $(BINDIR)/$(CONFIG)/httpcli_format_request_test httpcli_test: $(BINDIR)/$(CONFIG)/httpcli_test httpscli_test: $(BINDIR)/$(CONFIG)/httpscli_test @@ -7798,98 +7797,66 @@ endif endif -HTTP_PARSER_TEST_SRC = \ - test/core/http/parser_test.c \ +HTTP_FUZZER_TEST_SRC = \ + test/core/http/fuzzer.c \ -HTTP_PARSER_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(HTTP_PARSER_TEST_SRC)))) +HTTP_FUZZER_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(HTTP_FUZZER_TEST_SRC)))) ifeq ($(NO_SECURE),true) # You can't build secure targets if you don't have OpenSSL. -$(BINDIR)/$(CONFIG)/http_parser_test: openssl_dep_error +$(BINDIR)/$(CONFIG)/http_fuzzer_test: openssl_dep_error else -$(BINDIR)/$(CONFIG)/http_parser_test: $(HTTP_PARSER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/http_fuzzer_test: $(HTTP_FUZZER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(HTTP_PARSER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/http_parser_test + $(Q) $(LDXX) $(LDFLAGS) $(HTTP_FUZZER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -lFuzzer -o $(BINDIR)/$(CONFIG)/http_fuzzer_test endif -$(OBJDIR)/$(CONFIG)/test/core/http/parser_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/http/fuzzer.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a -deps_http_parser_test: $(HTTP_PARSER_TEST_OBJS:.o=.dep) +deps_http_fuzzer_test: $(HTTP_FUZZER_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(HTTP_PARSER_TEST_OBJS:.o=.dep) +-include $(HTTP_FUZZER_TEST_OBJS:.o=.dep) endif endif -HTTP_REQUEST_FUZZER_TEST_SRC = \ - test/core/http/request_fuzzer.c \ - -HTTP_REQUEST_FUZZER_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(HTTP_REQUEST_FUZZER_TEST_SRC)))) -ifeq ($(NO_SECURE),true) - -# You can't build secure targets if you don't have OpenSSL. - -$(BINDIR)/$(CONFIG)/http_request_fuzzer_test: openssl_dep_error - -else - - - -$(BINDIR)/$(CONFIG)/http_request_fuzzer_test: $(HTTP_REQUEST_FUZZER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a - $(E) "[LD] Linking $@" - $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(HTTP_REQUEST_FUZZER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -lFuzzer -o $(BINDIR)/$(CONFIG)/http_request_fuzzer_test - -endif - -$(OBJDIR)/$(CONFIG)/test/core/http/request_fuzzer.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a - -deps_http_request_fuzzer_test: $(HTTP_REQUEST_FUZZER_TEST_OBJS:.o=.dep) - -ifneq ($(NO_SECURE),true) -ifneq ($(NO_DEPS),true) --include $(HTTP_REQUEST_FUZZER_TEST_OBJS:.o=.dep) -endif -endif - - -HTTP_RESPONSE_FUZZER_TEST_SRC = \ - test/core/http/response_fuzzer.c \ +HTTP_PARSER_TEST_SRC = \ + test/core/http/parser_test.c \ -HTTP_RESPONSE_FUZZER_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(HTTP_RESPONSE_FUZZER_TEST_SRC)))) +HTTP_PARSER_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(HTTP_PARSER_TEST_SRC)))) ifeq ($(NO_SECURE),true) # You can't build secure targets if you don't have OpenSSL. -$(BINDIR)/$(CONFIG)/http_response_fuzzer_test: openssl_dep_error +$(BINDIR)/$(CONFIG)/http_parser_test: openssl_dep_error else -$(BINDIR)/$(CONFIG)/http_response_fuzzer_test: $(HTTP_RESPONSE_FUZZER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/http_parser_test: $(HTTP_PARSER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(HTTP_RESPONSE_FUZZER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -lFuzzer -o $(BINDIR)/$(CONFIG)/http_response_fuzzer_test + $(Q) $(LD) $(LDFLAGS) $(HTTP_PARSER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/http_parser_test endif -$(OBJDIR)/$(CONFIG)/test/core/http/response_fuzzer.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/http/parser_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a -deps_http_response_fuzzer_test: $(HTTP_RESPONSE_FUZZER_TEST_OBJS:.o=.dep) +deps_http_parser_test: $(HTTP_PARSER_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(HTTP_RESPONSE_FUZZER_TEST_OBJS:.o=.dep) +-include $(HTTP_PARSER_TEST_OBJS:.o=.dep) endif endif diff --git a/build.yaml b/build.yaml index bd75088cc6c..76a126c9470 100644 --- a/build.yaml +++ b/build.yaml @@ -1575,40 +1575,28 @@ targets: - grpc - gpr_test_util - gpr -- name: http_parser_test - build: test - language: c - src: - - test/core/http/parser_test.c - deps: - - grpc_test_util - - grpc - - gpr_test_util - - gpr -- name: http_request_fuzzer_test +- name: http_fuzzer_test build: fuzzer language: c src: - - test/core/http/request_fuzzer.c + - test/core/http/fuzzer.c deps: - grpc_test_util - grpc - gpr_test_util - gpr corpus_dirs: - - test/core/http/request_corpus -- name: http_response_fuzzer_test - build: fuzzer + - test/core/http/corpus +- name: http_parser_test + build: test language: c src: - - test/core/http/response_fuzzer.c + - test/core/http/parser_test.c deps: - grpc_test_util - grpc - gpr_test_util - gpr - corpus_dirs: - - test/core/http/response_corpus - name: httpcli_format_request_test build: test language: c diff --git a/test/core/http/response_corpus/0299ca2580e4398d170c4a336e0c33eb2cd9d427 b/test/core/http/corpus/0299ca2580e4398d170c4a336e0c33eb2cd9d427 similarity index 100% rename from test/core/http/response_corpus/0299ca2580e4398d170c4a336e0c33eb2cd9d427 rename to test/core/http/corpus/0299ca2580e4398d170c4a336e0c33eb2cd9d427 diff --git a/test/core/http/response_corpus/05e613853d64a9669ea3cf41b0de777dc24931ba b/test/core/http/corpus/05e613853d64a9669ea3cf41b0de777dc24931ba similarity index 100% rename from test/core/http/response_corpus/05e613853d64a9669ea3cf41b0de777dc24931ba rename to test/core/http/corpus/05e613853d64a9669ea3cf41b0de777dc24931ba diff --git a/test/core/http/response_corpus/069352518a1d1baa05f317c677d275cefda2ac97 b/test/core/http/corpus/069352518a1d1baa05f317c677d275cefda2ac97 similarity index 100% rename from test/core/http/response_corpus/069352518a1d1baa05f317c677d275cefda2ac97 rename to test/core/http/corpus/069352518a1d1baa05f317c677d275cefda2ac97 diff --git a/test/core/http/response_corpus/0c5b7c2569410b526605e308309a7f36574e530d b/test/core/http/corpus/0c5b7c2569410b526605e308309a7f36574e530d similarity index 100% rename from test/core/http/response_corpus/0c5b7c2569410b526605e308309a7f36574e530d rename to test/core/http/corpus/0c5b7c2569410b526605e308309a7f36574e530d diff --git a/test/core/http/response_corpus/0ef3d0a84360bb5ad66274f1226f5cb273ecdbcf b/test/core/http/corpus/0ef3d0a84360bb5ad66274f1226f5cb273ecdbcf similarity index 100% rename from test/core/http/response_corpus/0ef3d0a84360bb5ad66274f1226f5cb273ecdbcf rename to test/core/http/corpus/0ef3d0a84360bb5ad66274f1226f5cb273ecdbcf diff --git a/test/core/http/response_corpus/1e1273f90187fdf5df3625764245610f86af6aa4 b/test/core/http/corpus/1e1273f90187fdf5df3625764245610f86af6aa4 similarity index 100% rename from test/core/http/response_corpus/1e1273f90187fdf5df3625764245610f86af6aa4 rename to test/core/http/corpus/1e1273f90187fdf5df3625764245610f86af6aa4 diff --git a/test/core/http/response_corpus/33f4ea0c7ea27c37d8f95cfa64d282370efdafd2 b/test/core/http/corpus/33f4ea0c7ea27c37d8f95cfa64d282370efdafd2 similarity index 100% rename from test/core/http/response_corpus/33f4ea0c7ea27c37d8f95cfa64d282370efdafd2 rename to test/core/http/corpus/33f4ea0c7ea27c37d8f95cfa64d282370efdafd2 diff --git a/test/core/http/response_corpus/35f0c561297cfc840ddaeebb9fc61091f4eadece b/test/core/http/corpus/35f0c561297cfc840ddaeebb9fc61091f4eadece similarity index 100% rename from test/core/http/response_corpus/35f0c561297cfc840ddaeebb9fc61091f4eadece rename to test/core/http/corpus/35f0c561297cfc840ddaeebb9fc61091f4eadece diff --git a/test/core/http/response_corpus/39b19c41ba537f37511eff7727733715db432e76 b/test/core/http/corpus/39b19c41ba537f37511eff7727733715db432e76 similarity index 100% rename from test/core/http/response_corpus/39b19c41ba537f37511eff7727733715db432e76 rename to test/core/http/corpus/39b19c41ba537f37511eff7727733715db432e76 diff --git a/test/core/http/response_corpus/3e3c4756d5e40b5aa250954cbac86b826e70a7ac b/test/core/http/corpus/3e3c4756d5e40b5aa250954cbac86b826e70a7ac similarity index 100% rename from test/core/http/response_corpus/3e3c4756d5e40b5aa250954cbac86b826e70a7ac rename to test/core/http/corpus/3e3c4756d5e40b5aa250954cbac86b826e70a7ac diff --git a/test/core/http/response_corpus/3fb034e66ee5494a67acae1b4e6ff64ba92a2046 b/test/core/http/corpus/3fb034e66ee5494a67acae1b4e6ff64ba92a2046 similarity index 100% rename from test/core/http/response_corpus/3fb034e66ee5494a67acae1b4e6ff64ba92a2046 rename to test/core/http/corpus/3fb034e66ee5494a67acae1b4e6ff64ba92a2046 diff --git a/test/core/http/response_corpus/487725eb38511c79a9340bf4560a1411061fa6fa b/test/core/http/corpus/487725eb38511c79a9340bf4560a1411061fa6fa similarity index 100% rename from test/core/http/response_corpus/487725eb38511c79a9340bf4560a1411061fa6fa rename to test/core/http/corpus/487725eb38511c79a9340bf4560a1411061fa6fa diff --git a/test/core/http/response_corpus/4b1f1f79a0bfa3f942479dd5f8edb59a7c257c55 b/test/core/http/corpus/4b1f1f79a0bfa3f942479dd5f8edb59a7c257c55 similarity index 100% rename from test/core/http/response_corpus/4b1f1f79a0bfa3f942479dd5f8edb59a7c257c55 rename to test/core/http/corpus/4b1f1f79a0bfa3f942479dd5f8edb59a7c257c55 diff --git a/test/core/http/response_corpus/5028c56a5116a186b7343ff59567b47347a0796d b/test/core/http/corpus/5028c56a5116a186b7343ff59567b47347a0796d similarity index 100% rename from test/core/http/response_corpus/5028c56a5116a186b7343ff59567b47347a0796d rename to test/core/http/corpus/5028c56a5116a186b7343ff59567b47347a0796d diff --git a/test/core/http/response_corpus/5b6292bdf009b0daecbc90b85cca30a88c36eec5 b/test/core/http/corpus/5b6292bdf009b0daecbc90b85cca30a88c36eec5 similarity index 100% rename from test/core/http/response_corpus/5b6292bdf009b0daecbc90b85cca30a88c36eec5 rename to test/core/http/corpus/5b6292bdf009b0daecbc90b85cca30a88c36eec5 diff --git a/test/core/http/response_corpus/657368df512ca6294b9df16adf935a3f374a8be2 b/test/core/http/corpus/657368df512ca6294b9df16adf935a3f374a8be2 similarity index 100% rename from test/core/http/response_corpus/657368df512ca6294b9df16adf935a3f374a8be2 rename to test/core/http/corpus/657368df512ca6294b9df16adf935a3f374a8be2 diff --git a/test/core/http/response_corpus/81f59a12b458ec3604035cb962165c604d1355e6 b/test/core/http/corpus/81f59a12b458ec3604035cb962165c604d1355e6 similarity index 100% rename from test/core/http/response_corpus/81f59a12b458ec3604035cb962165c604d1355e6 rename to test/core/http/corpus/81f59a12b458ec3604035cb962165c604d1355e6 diff --git a/test/core/http/response_corpus/8f41c50e88ee8c17ecad3d41d63d38fb12aca0b9 b/test/core/http/corpus/8f41c50e88ee8c17ecad3d41d63d38fb12aca0b9 similarity index 100% rename from test/core/http/response_corpus/8f41c50e88ee8c17ecad3d41d63d38fb12aca0b9 rename to test/core/http/corpus/8f41c50e88ee8c17ecad3d41d63d38fb12aca0b9 diff --git a/test/core/http/response_corpus/97e4499d450c95660de86747f527e670f2012548 b/test/core/http/corpus/97e4499d450c95660de86747f527e670f2012548 similarity index 100% rename from test/core/http/response_corpus/97e4499d450c95660de86747f527e670f2012548 rename to test/core/http/corpus/97e4499d450c95660de86747f527e670f2012548 diff --git a/test/core/http/response_corpus/aa3bbb876eafa8ad8ca4ff2eabc6dd94341d2441 b/test/core/http/corpus/aa3bbb876eafa8ad8ca4ff2eabc6dd94341d2441 similarity index 100% rename from test/core/http/response_corpus/aa3bbb876eafa8ad8ca4ff2eabc6dd94341d2441 rename to test/core/http/corpus/aa3bbb876eafa8ad8ca4ff2eabc6dd94341d2441 diff --git a/test/core/http/response_corpus/b04fea5c041c707db0ad9c09a81672557b52cc47 b/test/core/http/corpus/b04fea5c041c707db0ad9c09a81672557b52cc47 similarity index 100% rename from test/core/http/response_corpus/b04fea5c041c707db0ad9c09a81672557b52cc47 rename to test/core/http/corpus/b04fea5c041c707db0ad9c09a81672557b52cc47 diff --git a/test/core/http/response_corpus/c55ce9995b002e88a102ae2891a71e8bacb346c8 b/test/core/http/corpus/c55ce9995b002e88a102ae2891a71e8bacb346c8 similarity index 100% rename from test/core/http/response_corpus/c55ce9995b002e88a102ae2891a71e8bacb346c8 rename to test/core/http/corpus/c55ce9995b002e88a102ae2891a71e8bacb346c8 diff --git a/test/core/http/response_corpus/ca5a0c00b8969310acb73d15ad0d0c602f1bd0c2 b/test/core/http/corpus/ca5a0c00b8969310acb73d15ad0d0c602f1bd0c2 similarity index 100% rename from test/core/http/response_corpus/ca5a0c00b8969310acb73d15ad0d0c602f1bd0c2 rename to test/core/http/corpus/ca5a0c00b8969310acb73d15ad0d0c602f1bd0c2 diff --git a/test/core/http/response_corpus/d4c3e4cf5d035596433c30eaabbd2b2925f4b453 b/test/core/http/corpus/d4c3e4cf5d035596433c30eaabbd2b2925f4b453 similarity index 100% rename from test/core/http/response_corpus/d4c3e4cf5d035596433c30eaabbd2b2925f4b453 rename to test/core/http/corpus/d4c3e4cf5d035596433c30eaabbd2b2925f4b453 diff --git a/test/core/http/response_corpus/d936dad71c129cf659097dc3db64550c4dd467f4 b/test/core/http/corpus/d936dad71c129cf659097dc3db64550c4dd467f4 similarity index 100% rename from test/core/http/response_corpus/d936dad71c129cf659097dc3db64550c4dd467f4 rename to test/core/http/corpus/d936dad71c129cf659097dc3db64550c4dd467f4 diff --git a/test/core/http/response_corpus/fc5d4b9117ba9e87388174aee4f4970bdfe8d066 b/test/core/http/corpus/fc5d4b9117ba9e87388174aee4f4970bdfe8d066 similarity index 100% rename from test/core/http/response_corpus/fc5d4b9117ba9e87388174aee4f4970bdfe8d066 rename to test/core/http/corpus/fc5d4b9117ba9e87388174aee4f4970bdfe8d066 diff --git a/test/core/http/request_corpus/request1.txt b/test/core/http/corpus/request1.txt similarity index 100% rename from test/core/http/request_corpus/request1.txt rename to test/core/http/corpus/request1.txt diff --git a/test/core/http/response_corpus/response1.txt b/test/core/http/corpus/response1.txt similarity index 100% rename from test/core/http/response_corpus/response1.txt rename to test/core/http/corpus/response1.txt diff --git a/test/core/http/request_fuzzer.c b/test/core/http/fuzzer.c similarity index 89% rename from test/core/http/request_fuzzer.c rename to test/core/http/fuzzer.c index ff960484db5..0aa95ee9e4d 100644 --- a/test/core/http/request_fuzzer.c +++ b/test/core/http/fuzzer.c @@ -36,15 +36,15 @@ #include -#include "src/core/httpcli/parser.h" +#include "src/core/http/parser.h" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { - grpc_httpcli_parser parser; - grpc_httpcli_parser_init(&parser); + grpc_http_parser parser; + grpc_http_parser_init(&parser); gpr_slice slice = gpr_slice_from_copied_buffer((const char *)data, size); - grpc_httpcli_parser_parse(&parser, slice); - grpc_httpcli_parser_eof(&parser); + grpc_http_parser_parse(&parser, slice); + grpc_http_parser_eof(&parser); gpr_slice_unref(slice); - grpc_httpcli_parser_destroy(&parser); + grpc_http_parser_destroy(&parser); return 0; } diff --git a/test/core/http/response_fuzzer.c b/test/core/http/response_fuzzer.c deleted file mode 100644 index ff960484db5..00000000000 --- a/test/core/http/response_fuzzer.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * - * Copyright 2015-2016, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include -#include - -#include - -#include "src/core/httpcli/parser.h" - -int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { - grpc_httpcli_parser parser; - grpc_httpcli_parser_init(&parser); - gpr_slice slice = gpr_slice_from_copied_buffer((const char *)data, size); - grpc_httpcli_parser_parse(&parser, slice); - grpc_httpcli_parser_eof(&parser); - gpr_slice_unref(slice); - grpc_httpcli_parser_destroy(&parser); - return 0; -} diff --git a/tools/fuzzer/runners/http_request_fuzzer_test.sh b/tools/fuzzer/runners/http_fuzzer_test.sh similarity index 93% rename from tools/fuzzer/runners/http_request_fuzzer_test.sh rename to tools/fuzzer/runners/http_fuzzer_test.sh index fbcd8303796..afbc4f4c955 100644 --- a/tools/fuzzer/runners/http_request_fuzzer_test.sh +++ b/tools/fuzzer/runners/http_fuzzer_test.sh @@ -29,4 +29,4 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -bins/$config/http_request_fuzzer_test -max_total_time=60 fuzzer_output test/core/http/request_corpus +bins/$config/http_fuzzer_test -max_total_time=60 fuzzer_output test/core/http/corpus diff --git a/tools/fuzzer/runners/http_response_fuzzer_test.sh b/tools/fuzzer/runners/http_response_fuzzer_test.sh deleted file mode 100644 index 8e3f4943704..00000000000 --- a/tools/fuzzer/runners/http_response_fuzzer_test.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -# Copyright 2016, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -bins/$config/http_response_fuzzer_test -max_total_time=60 fuzzer_output test/core/http/response_corpus diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 2e5e5e7cdbf..3ec51db5986 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -939,25 +939,9 @@ ], "headers": [], "language": "c", - "name": "http_parser_test", - "src": [ - "test/core/http/parser_test.c" - ], - "third_party": false, - "type": "target" - }, - { - "deps": [ - "gpr", - "gpr_test_util", - "grpc", - "grpc_test_util" - ], - "headers": [], - "language": "c", - "name": "http_request_fuzzer_test", + "name": "http_fuzzer_test", "src": [ - "test/core/http/request_fuzzer.c" + "test/core/http/fuzzer.c" ], "third_party": false, "type": "target" @@ -971,9 +955,9 @@ ], "headers": [], "language": "c", - "name": "http_response_fuzzer_test", + "name": "http_parser_test", "src": [ - "test/core/http/response_fuzzer.c" + "test/core/http/parser_test.c" ], "third_party": false, "type": "target"