aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-08-31 15:53:36 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-08-31 15:53:36 -0700
commit1ebb7c885e55e16c8b65b7cb5c9ea08038cd67f4 (patch)
treea1267c94be1ca071ea393e889d84c13262ae4944 /test/core
parente28e140afd0cb76de807375f28684e3d963931c4 (diff)
Hand-written changes
Diffstat (limited to 'test/core')
-rwxr-xr-xtest/core/bad_client/gen_build_yaml.py (renamed from test/core/bad_client/gen_build_json.py)7
-rw-r--r--test/core/end2end/fixtures/h2_compress.c (renamed from test/core/end2end/fixtures/chttp2_fullstack_compression.c)0
-rw-r--r--test/core/end2end/fixtures/h2_fakesec.c (renamed from test/core/end2end/fixtures/chttp2_fake_security.c)0
-rw-r--r--test/core/end2end/fixtures/h2_full+poll.c (renamed from test/core/end2end/fixtures/chttp2_fullstack_with_poll.c)0
-rw-r--r--test/core/end2end/fixtures/h2_full.c (renamed from test/core/end2end/fixtures/chttp2_fullstack.c)0
-rw-r--r--test/core/end2end/fixtures/h2_oauth2.c (renamed from test/core/end2end/fixtures/chttp2_simple_ssl_with_oauth2_fullstack.c)0
-rw-r--r--test/core/end2end/fixtures/h2_proxy.c (renamed from test/core/end2end/fixtures/chttp2_fullstack_with_proxy.c)0
-rw-r--r--test/core/end2end/fixtures/h2_sockpair+trace.c (renamed from test/core/end2end/fixtures/chttp2_socket_pair_with_grpc_trace.c)0
-rw-r--r--test/core/end2end/fixtures/h2_sockpair.c (renamed from test/core/end2end/fixtures/chttp2_socket_pair.c)0
-rw-r--r--test/core/end2end/fixtures/h2_sockpair_1byte.c (renamed from test/core/end2end/fixtures/chttp2_socket_pair_one_byte_at_a_time.c)0
-rw-r--r--test/core/end2end/fixtures/h2_ssl+poll.c (renamed from test/core/end2end/fixtures/chttp2_simple_ssl_fullstack_with_poll.c)0
-rw-r--r--test/core/end2end/fixtures/h2_ssl.c (renamed from test/core/end2end/fixtures/chttp2_simple_ssl_fullstack.c)0
-rw-r--r--test/core/end2end/fixtures/h2_ssl_proxy.c (renamed from test/core/end2end/fixtures/chttp2_simple_ssl_fullstack_with_proxy.c)0
-rw-r--r--test/core/end2end/fixtures/h2_uds+poll.c (renamed from test/core/end2end/fixtures/chttp2_fullstack_uds_posix_with_poll.c)0
-rw-r--r--test/core/end2end/fixtures/h2_uds.c (renamed from test/core/end2end/fixtures/chttp2_fullstack_uds_posix.c)0
-rwxr-xr-xtest/core/end2end/gen_build_yaml.py (renamed from test/core/end2end/gen_build_json.py)71
-rw-r--r--test/core/end2end/tests/binary_metadata.c (renamed from test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c)0
-rw-r--r--test/core/end2end/tests/call_creds.c (renamed from test/core/end2end/tests/request_response_with_payload_and_call_creds.c)0
-rw-r--r--test/core/end2end/tests/cancel_after_client_done.c (renamed from test/core/end2end/tests/cancel_after_accept_and_writes_closed.c)0
-rw-r--r--test/core/end2end/tests/compressed_payload.c (renamed from test/core/end2end/tests/request_with_compressed_payload.c)0
-rw-r--r--test/core/end2end/tests/high_initial_seqno.c (renamed from test/core/end2end/tests/simple_request_with_high_initial_sequence_number.c)0
-rw-r--r--test/core/end2end/tests/large_metadata.c (renamed from test/core/end2end/tests/request_with_large_metadata.c)0
-rw-r--r--test/core/end2end/tests/metadata.c (renamed from test/core/end2end/tests/request_response_with_metadata_and_payload.c)0
-rw-r--r--test/core/end2end/tests/payload.c (renamed from test/core/end2end/tests/request_response_with_payload.c)0
-rw-r--r--test/core/end2end/tests/shutdown_finishes_calls.c (renamed from test/core/end2end/tests/early_server_shutdown_finishes_inflight_calls.c)0
-rw-r--r--test/core/end2end/tests/shutdown_finishes_tags.c (renamed from test/core/end2end/tests/early_server_shutdown_finishes_tags.c)0
-rw-r--r--test/core/end2end/tests/trailing_metadata.c (renamed from test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c)0
-rw-r--r--test/core/util/reconnect_server.c4
28 files changed, 45 insertions, 37 deletions
diff --git a/test/core/bad_client/gen_build_json.py b/test/core/bad_client/gen_build_yaml.py
index 33bf65ac04..02dda10be0 100755
--- a/test/core/bad_client/gen_build_json.py
+++ b/test/core/bad_client/gen_build_yaml.py
@@ -32,8 +32,8 @@
"""Generates the appropriate build.json data for all the end2end tests."""
-import simplejson
import collections
+import yaml
TestOptions = collections.namedtuple('TestOptions', 'flaky')
default_test_options = TestOptions(False)
@@ -58,6 +58,7 @@ def main():
'headers': [
'test/core/bad_client/bad_client.h'
],
+ 'vs_proj_dir': 'test',
'deps': [
'grpc_test_util_unsecure',
'grpc_unsecure',
@@ -72,7 +73,7 @@ def main():
'language': 'c',
'secure': 'no',
'src': ['test/core/bad_client/tests/%s.c' % t],
- 'flaky': 'invoke_large_request' in t,
+ 'vs_proj_dir': 'test',
'deps': [
'bad_client_test',
'grpc_test_util_unsecure',
@@ -82,7 +83,7 @@ def main():
]
}
for t in sorted(BAD_CLIENT_TESTS.keys())]}
- print simplejson.dumps(json, sort_keys=True, indent=2 * ' ')
+ print yaml.dump(json)
if __name__ == '__main__':
diff --git a/test/core/end2end/fixtures/chttp2_fullstack_compression.c b/test/core/end2end/fixtures/h2_compress.c
index 6e7a1faf55..6e7a1faf55 100644
--- a/test/core/end2end/fixtures/chttp2_fullstack_compression.c
+++ b/test/core/end2end/fixtures/h2_compress.c
diff --git a/test/core/end2end/fixtures/chttp2_fake_security.c b/test/core/end2end/fixtures/h2_fakesec.c
index 3e64cc08e8..3e64cc08e8 100644
--- a/test/core/end2end/fixtures/chttp2_fake_security.c
+++ b/test/core/end2end/fixtures/h2_fakesec.c
diff --git a/test/core/end2end/fixtures/chttp2_fullstack_with_poll.c b/test/core/end2end/fixtures/h2_full+poll.c
index 48feefc931..48feefc931 100644
--- a/test/core/end2end/fixtures/chttp2_fullstack_with_poll.c
+++ b/test/core/end2end/fixtures/h2_full+poll.c
diff --git a/test/core/end2end/fixtures/chttp2_fullstack.c b/test/core/end2end/fixtures/h2_full.c
index 0170dcf0e5..0170dcf0e5 100644
--- a/test/core/end2end/fixtures/chttp2_fullstack.c
+++ b/test/core/end2end/fixtures/h2_full.c
diff --git a/test/core/end2end/fixtures/chttp2_simple_ssl_with_oauth2_fullstack.c b/test/core/end2end/fixtures/h2_oauth2.c
index e61e276fff..e61e276fff 100644
--- a/test/core/end2end/fixtures/chttp2_simple_ssl_with_oauth2_fullstack.c
+++ b/test/core/end2end/fixtures/h2_oauth2.c
diff --git a/test/core/end2end/fixtures/chttp2_fullstack_with_proxy.c b/test/core/end2end/fixtures/h2_proxy.c
index 44083e2676..44083e2676 100644
--- a/test/core/end2end/fixtures/chttp2_fullstack_with_proxy.c
+++ b/test/core/end2end/fixtures/h2_proxy.c
diff --git a/test/core/end2end/fixtures/chttp2_socket_pair_with_grpc_trace.c b/test/core/end2end/fixtures/h2_sockpair+trace.c
index 588c4b23e1..588c4b23e1 100644
--- a/test/core/end2end/fixtures/chttp2_socket_pair_with_grpc_trace.c
+++ b/test/core/end2end/fixtures/h2_sockpair+trace.c
diff --git a/test/core/end2end/fixtures/chttp2_socket_pair.c b/test/core/end2end/fixtures/h2_sockpair.c
index 16a04fbebf..16a04fbebf 100644
--- a/test/core/end2end/fixtures/chttp2_socket_pair.c
+++ b/test/core/end2end/fixtures/h2_sockpair.c
diff --git a/test/core/end2end/fixtures/chttp2_socket_pair_one_byte_at_a_time.c b/test/core/end2end/fixtures/h2_sockpair_1byte.c
index 94fc36f5ec..94fc36f5ec 100644
--- a/test/core/end2end/fixtures/chttp2_socket_pair_one_byte_at_a_time.c
+++ b/test/core/end2end/fixtures/h2_sockpair_1byte.c
diff --git a/test/core/end2end/fixtures/chttp2_simple_ssl_fullstack_with_poll.c b/test/core/end2end/fixtures/h2_ssl+poll.c
index 2c605d1471..2c605d1471 100644
--- a/test/core/end2end/fixtures/chttp2_simple_ssl_fullstack_with_poll.c
+++ b/test/core/end2end/fixtures/h2_ssl+poll.c
diff --git a/test/core/end2end/fixtures/chttp2_simple_ssl_fullstack.c b/test/core/end2end/fixtures/h2_ssl.c
index 9193a09b17..9193a09b17 100644
--- a/test/core/end2end/fixtures/chttp2_simple_ssl_fullstack.c
+++ b/test/core/end2end/fixtures/h2_ssl.c
diff --git a/test/core/end2end/fixtures/chttp2_simple_ssl_fullstack_with_proxy.c b/test/core/end2end/fixtures/h2_ssl_proxy.c
index 8133a69a0c..8133a69a0c 100644
--- a/test/core/end2end/fixtures/chttp2_simple_ssl_fullstack_with_proxy.c
+++ b/test/core/end2end/fixtures/h2_ssl_proxy.c
diff --git a/test/core/end2end/fixtures/chttp2_fullstack_uds_posix_with_poll.c b/test/core/end2end/fixtures/h2_uds+poll.c
index 05b9ea0949..05b9ea0949 100644
--- a/test/core/end2end/fixtures/chttp2_fullstack_uds_posix_with_poll.c
+++ b/test/core/end2end/fixtures/h2_uds+poll.c
diff --git a/test/core/end2end/fixtures/chttp2_fullstack_uds_posix.c b/test/core/end2end/fixtures/h2_uds.c
index 59d39bbb0f..59d39bbb0f 100644
--- a/test/core/end2end/fixtures/chttp2_fullstack_uds_posix.c
+++ b/test/core/end2end/fixtures/h2_uds.c
diff --git a/test/core/end2end/gen_build_json.py b/test/core/end2end/gen_build_yaml.py
index 6f10b78dad..3fe2909493 100755
--- a/test/core/end2end/gen_build_json.py
+++ b/test/core/end2end/gen_build_yaml.py
@@ -32,8 +32,9 @@
"""Generates the appropriate build.json data for all the end2end tests."""
-import simplejson
+import yaml
import collections
+import hashlib
FixtureOptions = collections.namedtuple('FixtureOptions', 'fullstack includes_proxy dns_resolver secure platforms ci_mac')
@@ -42,22 +43,23 @@ socketpair_unsecure_fixture_options = default_unsecure_fixture_options._replace(
default_secure_fixture_options = default_unsecure_fixture_options._replace(secure=True)
uds_fixture_options = default_unsecure_fixture_options._replace(dns_resolver=False, platforms=['linux', 'mac', 'posix'])
+
# maps fixture name to whether it requires the security library
END2END_FIXTURES = {
- 'chttp2_fake_security': default_secure_fixture_options._replace(ci_mac=False),
- 'chttp2_fullstack': default_unsecure_fixture_options,
- 'chttp2_fullstack_compression': default_unsecure_fixture_options,
- 'chttp2_fullstack_uds_posix': uds_fixture_options,
- 'chttp2_fullstack_uds_posix_with_poll': uds_fixture_options._replace(platforms=['linux']),
- 'chttp2_fullstack_with_poll': default_unsecure_fixture_options._replace(platforms=['linux']),
- 'chttp2_fullstack_with_proxy': default_unsecure_fixture_options._replace(includes_proxy=True, ci_mac=False),
- 'chttp2_simple_ssl_fullstack': default_secure_fixture_options,
- 'chttp2_simple_ssl_fullstack_with_poll': default_secure_fixture_options._replace(platforms=['linux']),
- 'chttp2_simple_ssl_fullstack_with_proxy': default_secure_fixture_options._replace(includes_proxy=True, ci_mac=False),
- 'chttp2_simple_ssl_with_oauth2_fullstack': default_secure_fixture_options._replace(ci_mac=False),
- 'chttp2_socket_pair': socketpair_unsecure_fixture_options._replace(ci_mac=False),
- 'chttp2_socket_pair_one_byte_at_a_time': socketpair_unsecure_fixture_options._replace(ci_mac=False),
- 'chttp2_socket_pair_with_grpc_trace': socketpair_unsecure_fixture_options,
+ 'h2_fakesec': default_secure_fixture_options._replace(ci_mac=False),
+ 'h2_full': default_unsecure_fixture_options,
+ 'h2_compress': default_unsecure_fixture_options,
+ 'h2_uds': uds_fixture_options,
+ 'h2_uds+poll': uds_fixture_options._replace(platforms=['linux']),
+ 'h2_full+poll': default_unsecure_fixture_options._replace(platforms=['linux']),
+ 'h2_proxy': default_unsecure_fixture_options._replace(includes_proxy=True, ci_mac=False),
+ 'h2_ssl': default_secure_fixture_options,
+ 'h2_ssl+poll': default_secure_fixture_options._replace(platforms=['linux']),
+ 'h2_ssl_proxy': default_secure_fixture_options._replace(includes_proxy=True, ci_mac=False),
+ 'h2_oauth2': default_secure_fixture_options._replace(ci_mac=False),
+ 'h2_sockpair': socketpair_unsecure_fixture_options._replace(ci_mac=False),
+ 'h2_sockpair_1byte': socketpair_unsecure_fixture_options._replace(ci_mac=False),
+ 'h2_sockpair+trace': socketpair_unsecure_fixture_options,
}
TestOptions = collections.namedtuple('TestOptions', 'needs_fullstack needs_dns proxyable flaky secure')
@@ -67,7 +69,7 @@ connectivity_test_options = default_test_options._replace(needs_fullstack=True)
# maps test names to options
END2END_TESTS = {
'bad_hostname': default_test_options,
- 'cancel_after_accept_and_writes_closed': default_test_options,
+ 'cancel_after_client_done': default_test_options,
'cancel_after_accept': default_test_options,
'cancel_after_invoke': default_test_options,
'cancel_before_invoke': default_test_options,
@@ -76,8 +78,8 @@ END2END_TESTS = {
'channel_connectivity': connectivity_test_options._replace(proxyable=False),
'default_host': default_test_options._replace(needs_fullstack=True, needs_dns=True),
'disappearing_server': connectivity_test_options,
- 'early_server_shutdown_finishes_inflight_calls': default_test_options,
- 'early_server_shutdown_finishes_tags': default_test_options,
+ 'shutdown_finishes_calls': default_test_options,
+ 'shutdown_finishes_tags': default_test_options,
'empty_batch': default_test_options,
'graceful_server_shutdown': default_test_options,
'invoke_large_request': default_test_options,
@@ -86,19 +88,19 @@ END2END_TESTS = {
'no_op': default_test_options,
'ping_pong_streaming': default_test_options,
'registered_call': default_test_options,
- 'request_response_with_binary_metadata_and_payload': default_test_options,
- 'request_response_with_metadata_and_payload': default_test_options,
- 'request_response_with_payload_and_call_creds': default_test_options._replace(secure=True),
- 'request_response_with_payload': default_test_options,
- 'request_response_with_trailing_metadata_and_payload': default_test_options,
- 'request_with_compressed_payload': default_test_options._replace(proxyable=False),
+ 'binary_metadata': default_test_options,
+ 'metadata': default_test_options,
+ 'call_creds': default_test_options._replace(secure=True),
+ 'payload': default_test_options,
+ 'trailing_metadata': default_test_options,
+ 'compressed_payload': default_test_options._replace(proxyable=False),
'request_with_flags': default_test_options._replace(proxyable=False),
- 'request_with_large_metadata': default_test_options,
+ 'large_metadata': default_test_options,
'request_with_payload': default_test_options,
'server_finishes_request': default_test_options,
'simple_delayed_request': connectivity_test_options,
'simple_request': default_test_options,
- 'simple_request_with_high_initial_sequence_number': default_test_options,
+ 'high_initial_seqno': default_test_options,
}
@@ -147,6 +149,7 @@ def main():
'platforms': [ 'linux', 'mac', 'posix' ] if f.endswith('_posix') else END2END_FIXTURES[f].platforms,
'deps': sec_deps if END2END_FIXTURES[f].secure else unsec_deps,
'headers': ['test/core/end2end/end2end_tests.h'],
+ 'vs_proj_dir': 'test',
}
for f in sorted(END2END_FIXTURES.keys())] + [
{
@@ -157,7 +160,8 @@ def main():
'src': ['test/core/end2end/tests/%s.c' % t],
'headers': ['test/core/end2end/tests/cancel_test_helpers.h',
'test/core/end2end/end2end_tests.h'],
- 'deps': sec_deps if END2END_TESTS[t].secure else unsec_deps
+ 'deps': sec_deps if END2END_TESTS[t].secure else unsec_deps,
+ 'vs_proj_dir': 'test',
}
for t in sorted(END2END_TESTS.keys())] + [
{
@@ -168,7 +172,8 @@ def main():
"test/core/end2end/data/test_root_cert.c",
"test/core/end2end/data/server1_cert.c",
"test/core/end2end/data/server1_key.c"
- ]
+ ],
+ 'vs_proj_dir': 'test',
}
],
'targets': [
@@ -184,13 +189,14 @@ def main():
else without(END2END_FIXTURES[f].platforms, 'mac')),
'deps': [
'end2end_fixture_%s' % f,
- 'end2end_test_%s' % t] + sec_deps
+ 'end2end_test_%s' % t] + sec_deps,
+ 'vs_proj_dir': 'test',
}
for f in sorted(END2END_FIXTURES.keys())
for t in sorted(END2END_TESTS.keys())
if compatible(f, t)] + [
{
- 'name': '%s_%s_unsecure_test' % (f, t),
+ 'name': '%s_%s_nosec_test' % (f, t),
'build': 'test',
'language': 'c',
'secure': 'no',
@@ -202,11 +208,12 @@ def main():
else without(END2END_FIXTURES[f].platforms, 'mac')),
'deps': [
'end2end_fixture_%s' % f,
- 'end2end_test_%s' % t] + unsec_deps
+ 'end2end_test_%s' % t] + unsec_deps,
+ 'vs_proj_dir': 'test',
}
for f in sorted(END2END_FIXTURES.keys()) if not END2END_FIXTURES[f].secure
for t in sorted(END2END_TESTS.keys()) if compatible(f, t) and not END2END_TESTS[t].secure]}
- print simplejson.dumps(json, sort_keys=True, indent=2 * ' ')
+ print yaml.dump(json)
if __name__ == '__main__':
diff --git a/test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c b/test/core/end2end/tests/binary_metadata.c
index 2345f94044..2345f94044 100644
--- a/test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c
+++ b/test/core/end2end/tests/binary_metadata.c
diff --git a/test/core/end2end/tests/request_response_with_payload_and_call_creds.c b/test/core/end2end/tests/call_creds.c
index 75c5bba5bd..75c5bba5bd 100644
--- a/test/core/end2end/tests/request_response_with_payload_and_call_creds.c
+++ b/test/core/end2end/tests/call_creds.c
diff --git a/test/core/end2end/tests/cancel_after_accept_and_writes_closed.c b/test/core/end2end/tests/cancel_after_client_done.c
index 2430a6d218..2430a6d218 100644
--- a/test/core/end2end/tests/cancel_after_accept_and_writes_closed.c
+++ b/test/core/end2end/tests/cancel_after_client_done.c
diff --git a/test/core/end2end/tests/request_with_compressed_payload.c b/test/core/end2end/tests/compressed_payload.c
index 299943c548..299943c548 100644
--- a/test/core/end2end/tests/request_with_compressed_payload.c
+++ b/test/core/end2end/tests/compressed_payload.c
diff --git a/test/core/end2end/tests/simple_request_with_high_initial_sequence_number.c b/test/core/end2end/tests/high_initial_seqno.c
index 0067bb4bef..0067bb4bef 100644
--- a/test/core/end2end/tests/simple_request_with_high_initial_sequence_number.c
+++ b/test/core/end2end/tests/high_initial_seqno.c
diff --git a/test/core/end2end/tests/request_with_large_metadata.c b/test/core/end2end/tests/large_metadata.c
index 98e47aaf98..98e47aaf98 100644
--- a/test/core/end2end/tests/request_with_large_metadata.c
+++ b/test/core/end2end/tests/large_metadata.c
diff --git a/test/core/end2end/tests/request_response_with_metadata_and_payload.c b/test/core/end2end/tests/metadata.c
index a4cc27896c..a4cc27896c 100644
--- a/test/core/end2end/tests/request_response_with_metadata_and_payload.c
+++ b/test/core/end2end/tests/metadata.c
diff --git a/test/core/end2end/tests/request_response_with_payload.c b/test/core/end2end/tests/payload.c
index ff00ae6d9d..ff00ae6d9d 100644
--- a/test/core/end2end/tests/request_response_with_payload.c
+++ b/test/core/end2end/tests/payload.c
diff --git a/test/core/end2end/tests/early_server_shutdown_finishes_inflight_calls.c b/test/core/end2end/tests/shutdown_finishes_calls.c
index 233bc9bee2..233bc9bee2 100644
--- a/test/core/end2end/tests/early_server_shutdown_finishes_inflight_calls.c
+++ b/test/core/end2end/tests/shutdown_finishes_calls.c
diff --git a/test/core/end2end/tests/early_server_shutdown_finishes_tags.c b/test/core/end2end/tests/shutdown_finishes_tags.c
index 9b678a1754..9b678a1754 100644
--- a/test/core/end2end/tests/early_server_shutdown_finishes_tags.c
+++ b/test/core/end2end/tests/shutdown_finishes_tags.c
diff --git a/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c b/test/core/end2end/tests/trailing_metadata.c
index 8b764751f6..8b764751f6 100644
--- a/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c
+++ b/test/core/end2end/tests/trailing_metadata.c
diff --git a/test/core/util/reconnect_server.c b/test/core/util/reconnect_server.c
index a06cb50b3a..61535cc5c0 100644
--- a/test/core/util/reconnect_server.c
+++ b/test/core/util/reconnect_server.c
@@ -33,7 +33,6 @@
#include "test/core/util/reconnect_server.h"
-#include <arpa/inet.h>
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpc/support/host_port.h>
@@ -42,6 +41,7 @@
#include <grpc/support/time.h>
#include <string.h>
#include "src/core/iomgr/endpoint.h"
+#include "src/core/iomgr/sockaddr.h"
#include "src/core/iomgr/tcp_server.h"
#include "test/core/util/port.h"
@@ -116,7 +116,7 @@ void reconnect_server_start(reconnect_server *server, int port) {
addr.sin_family = AF_INET;
addr.sin_port = htons(port);
- inet_pton(AF_INET, "0.0.0.0", &addr.sin_addr);
+ memset(&addr.sin_addr, 0, sizeof(addr.sin_addr));
server->tcp_server = grpc_tcp_server_create();
port_added =