diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2015-05-11 09:13:27 -0700 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2015-05-11 09:13:27 -0700 |
commit | 5b9e7430d9e056b393ea6aec199260d763840ba5 (patch) | |
tree | eec1d00f3f8c41435d7732d6694f8eca4d7b30ec /test | |
parent | f7670f3054e4ed05715120728e345e4bb0a13d3d (diff) | |
parent | ad21fea239769e2a3be14ac56ee747eb0f3c13a3 (diff) |
Merge github.com:grpc/grpc into bye-bye-completion-queue-pie
Conflicts:
vsprojects/Grpc.mak
Diffstat (limited to 'test')
33 files changed, 26 insertions, 45 deletions
diff --git a/test/core/end2end/fixtures/chttp2_fullstack_uds.c b/test/core/end2end/fixtures/chttp2_fullstack_uds_posix.c index 53803b0f1d..53803b0f1d 100644 --- a/test/core/end2end/fixtures/chttp2_fullstack_uds.c +++ b/test/core/end2end/fixtures/chttp2_fullstack_uds_posix.c diff --git a/test/core/end2end/gen_build_json.py b/test/core/end2end/gen_build_json.py index e916f186e1..77b929ec18 100755 --- a/test/core/end2end/gen_build_json.py +++ b/test/core/end2end/gen_build_json.py @@ -36,15 +36,19 @@ import simplejson import collections +FixtureOptions = collections.namedtuple('FixtureOptions', 'secure platforms') +default_unsecure_fixture_options = FixtureOptions(False, ['windows', 'posix']) +default_secure_fixture_options = FixtureOptions(True, ['windows', 'posix']) + # maps fixture name to whether it requires the security library END2END_FIXTURES = { - 'chttp2_fake_security': True, - 'chttp2_fullstack': False, - 'chttp2_fullstack_uds': False, - 'chttp2_simple_ssl_fullstack': True, - 'chttp2_simple_ssl_with_oauth2_fullstack': True, - 'chttp2_socket_pair': False, - 'chttp2_socket_pair_one_byte_at_a_time': False, + 'chttp2_fake_security': default_secure_fixture_options, + 'chttp2_fullstack': default_unsecure_fixture_options, + 'chttp2_fullstack_uds_posix': FixtureOptions(False, ['posix']), + 'chttp2_simple_ssl_fullstack': default_secure_fixture_options, + 'chttp2_simple_ssl_with_oauth2_fullstack': default_secure_fixture_options, + 'chttp2_socket_pair': default_unsecure_fixture_options, + 'chttp2_socket_pair_one_byte_at_a_time': default_unsecure_fixture_options, } TestOptions = collections.namedtuple('TestOptions', 'flaky secure') @@ -90,8 +94,9 @@ def main(): 'name': 'end2end_fixture_%s' % f, 'build': 'private', 'language': 'c', - 'secure': 'check' if END2END_FIXTURES[f] else 'no', - 'src': ['test/core/end2end/fixtures/%s.c' % f] + 'secure': 'check' if END2END_FIXTURES[f].secure else 'no', + 'src': ['test/core/end2end/fixtures/%s.c' % f], + 'platforms': [ 'posix' ] if f.endswith('_posix') else [ 'windows', 'posix' ], } for f in sorted(END2END_FIXTURES.keys())] + [ { @@ -121,6 +126,7 @@ def main(): 'language': 'c', 'src': [], 'flaky': END2END_TESTS[t].flaky, + 'platforms': END2END_FIXTURES[f].platforms, 'deps': [ 'end2end_fixture_%s' % f, 'end2end_test_%s' % t, @@ -140,6 +146,7 @@ def main(): 'secure': 'no', 'src': [], 'flaky': 'invoke_large_request' in t, + 'platforms': END2END_FIXTURES[f].platforms, 'deps': [ 'end2end_fixture_%s' % f, 'end2end_test_%s' % t, @@ -149,7 +156,7 @@ def main(): 'gpr' ] } - for f in sorted(END2END_FIXTURES.keys()) if not END2END_FIXTURES[f] + for f in sorted(END2END_FIXTURES.keys()) if not END2END_FIXTURES[f].secure for t in sorted(END2END_TESTS.keys()) if not END2END_TESTS[t].secure]} print simplejson.dumps(json, sort_keys=True, indent=2 * ' ') diff --git a/test/core/end2end/tests/bad_hostname.c b/test/core/end2end/tests/bad_hostname.c index c43dfff625..e145d2e95b 100644 --- a/test/core/end2end/tests/bad_hostname.c +++ b/test/core/end2end/tests/bad_hostname.c @@ -35,7 +35,6 @@ #include <stdio.h> #include <string.h> -#include <unistd.h> #include "src/core/support/string.h" #include <grpc/byte_buffer.h> diff --git a/test/core/end2end/tests/cancel_after_accept.c b/test/core/end2end/tests/cancel_after_accept.c index 3cd8114b32..2f06988a9a 100644 --- a/test/core/end2end/tests/cancel_after_accept.c +++ b/test/core/end2end/tests/cancel_after_accept.c @@ -35,7 +35,6 @@ #include <stdio.h> #include <string.h> -#include <unistd.h> #include <grpc/byte_buffer.h> #include <grpc/support/alloc.h> diff --git a/test/core/end2end/tests/cancel_after_accept_and_writes_closed.c b/test/core/end2end/tests/cancel_after_accept_and_writes_closed.c index 57c696c76c..cb3bed064e 100644 --- a/test/core/end2end/tests/cancel_after_accept_and_writes_closed.c +++ b/test/core/end2end/tests/cancel_after_accept_and_writes_closed.c @@ -35,7 +35,6 @@ #include <stdio.h> #include <string.h> -#include <unistd.h> #include <grpc/byte_buffer.h> #include <grpc/support/alloc.h> diff --git a/test/core/end2end/tests/cancel_after_invoke.c b/test/core/end2end/tests/cancel_after_invoke.c index 33b117222b..618d9e97e3 100644 --- a/test/core/end2end/tests/cancel_after_invoke.c +++ b/test/core/end2end/tests/cancel_after_invoke.c @@ -35,7 +35,6 @@ #include <stdio.h> #include <string.h> -#include <unistd.h> #include <grpc/byte_buffer.h> #include <grpc/support/alloc.h> diff --git a/test/core/end2end/tests/cancel_before_invoke.c b/test/core/end2end/tests/cancel_before_invoke.c index cb7ba4d3e2..9c9d6aadcc 100644 --- a/test/core/end2end/tests/cancel_before_invoke.c +++ b/test/core/end2end/tests/cancel_before_invoke.c @@ -35,7 +35,6 @@ #include <stdio.h> #include <string.h> -#include <unistd.h> #include <grpc/byte_buffer.h> #include <grpc/support/alloc.h> diff --git a/test/core/end2end/tests/cancel_in_a_vacuum.c b/test/core/end2end/tests/cancel_in_a_vacuum.c index 84c0ad2191..1bc393aba7 100644 --- a/test/core/end2end/tests/cancel_in_a_vacuum.c +++ b/test/core/end2end/tests/cancel_in_a_vacuum.c @@ -35,7 +35,6 @@ #include <stdio.h> #include <string.h> -#include <unistd.h> #include <grpc/byte_buffer.h> #include <grpc/support/alloc.h> diff --git a/test/core/end2end/tests/census_simple_request.c b/test/core/end2end/tests/census_simple_request.c index a45757438b..9fb75910f0 100644 --- a/test/core/end2end/tests/census_simple_request.c +++ b/test/core/end2end/tests/census_simple_request.c @@ -35,7 +35,6 @@ #include <stdio.h> #include <string.h> -#include <unistd.h> #include "src/core/support/string.h" #include <grpc/byte_buffer.h> diff --git a/test/core/end2end/tests/disappearing_server.c b/test/core/end2end/tests/disappearing_server.c index 4ac36b81c2..5cb9845604 100644 --- a/test/core/end2end/tests/disappearing_server.c +++ b/test/core/end2end/tests/disappearing_server.c @@ -35,7 +35,6 @@ #include <stdio.h> #include <string.h> -#include <unistd.h> #include <grpc/byte_buffer.h> #include <grpc/support/alloc.h> diff --git a/test/core/end2end/tests/early_server_shutdown_finishes_inflight_calls.c b/test/core/end2end/tests/early_server_shutdown_finishes_inflight_calls.c index 90713d189b..ed7e3d9086 100644 --- a/test/core/end2end/tests/early_server_shutdown_finishes_inflight_calls.c +++ b/test/core/end2end/tests/early_server_shutdown_finishes_inflight_calls.c @@ -35,7 +35,6 @@ #include <stdio.h> #include <string.h> -#include <unistd.h> #include <grpc/byte_buffer.h> #include <grpc/support/alloc.h> diff --git a/test/core/end2end/tests/early_server_shutdown_finishes_tags.c b/test/core/end2end/tests/early_server_shutdown_finishes_tags.c index 5515bd8ae2..9d14b549a2 100644 --- a/test/core/end2end/tests/early_server_shutdown_finishes_tags.c +++ b/test/core/end2end/tests/early_server_shutdown_finishes_tags.c @@ -35,7 +35,6 @@ #include <stdio.h> #include <string.h> -#include <unistd.h> #include <grpc/byte_buffer.h> #include <grpc/support/alloc.h> diff --git a/test/core/end2end/tests/empty_batch.c b/test/core/end2end/tests/empty_batch.c index 3b8e33c265..a57f921efb 100644 --- a/test/core/end2end/tests/empty_batch.c +++ b/test/core/end2end/tests/empty_batch.c @@ -35,7 +35,6 @@ #include <stdio.h> #include <string.h> -#include <unistd.h> #include "src/core/support/string.h" #include <grpc/byte_buffer.h> diff --git a/test/core/end2end/tests/graceful_server_shutdown.c b/test/core/end2end/tests/graceful_server_shutdown.c index eb853c96cd..d98aca989b 100644 --- a/test/core/end2end/tests/graceful_server_shutdown.c +++ b/test/core/end2end/tests/graceful_server_shutdown.c @@ -35,7 +35,6 @@ #include <stdio.h> #include <string.h> -#include <unistd.h> #include <grpc/byte_buffer.h> #include <grpc/support/alloc.h> diff --git a/test/core/end2end/tests/invoke_large_request.c b/test/core/end2end/tests/invoke_large_request.c index 8d0b1fa725..40322e22dc 100644 --- a/test/core/end2end/tests/invoke_large_request.c +++ b/test/core/end2end/tests/invoke_large_request.c @@ -35,7 +35,6 @@ #include <stdio.h> #include <string.h> -#include <unistd.h> #include <grpc/byte_buffer.h> #include <grpc/support/alloc.h> diff --git a/test/core/end2end/tests/max_concurrent_streams.c b/test/core/end2end/tests/max_concurrent_streams.c index 56d81a1130..82e50cd4f6 100644 --- a/test/core/end2end/tests/max_concurrent_streams.c +++ b/test/core/end2end/tests/max_concurrent_streams.c @@ -35,7 +35,6 @@ #include <stdio.h> #include <string.h> -#include <unistd.h> #include <grpc/byte_buffer.h> #include <grpc/support/alloc.h> diff --git a/test/core/end2end/tests/max_message_length.c b/test/core/end2end/tests/max_message_length.c index d2be9afae4..489f542740 100644 --- a/test/core/end2end/tests/max_message_length.c +++ b/test/core/end2end/tests/max_message_length.c @@ -35,7 +35,6 @@ #include <stdio.h> #include <string.h> -#include <unistd.h> #include <grpc/byte_buffer.h> #include <grpc/support/alloc.h> diff --git a/test/core/end2end/tests/no_op.c b/test/core/end2end/tests/no_op.c index ec38924fcf..000d2ffa2a 100644 --- a/test/core/end2end/tests/no_op.c +++ b/test/core/end2end/tests/no_op.c @@ -35,7 +35,6 @@ #include <stdio.h> #include <string.h> -#include <unistd.h> #include <grpc/byte_buffer.h> #include <grpc/support/alloc.h> diff --git a/test/core/end2end/tests/ping_pong_streaming.c b/test/core/end2end/tests/ping_pong_streaming.c index 6fad1f6d5f..78b07850b9 100644 --- a/test/core/end2end/tests/ping_pong_streaming.c +++ b/test/core/end2end/tests/ping_pong_streaming.c @@ -35,7 +35,6 @@ #include <stdio.h> #include <string.h> -#include <unistd.h> #include <grpc/byte_buffer.h> #include <grpc/support/alloc.h> diff --git a/test/core/end2end/tests/registered_call.c b/test/core/end2end/tests/registered_call.c index 3ffcf00978..4b44454614 100644 --- a/test/core/end2end/tests/registered_call.c +++ b/test/core/end2end/tests/registered_call.c @@ -35,7 +35,6 @@ #include <stdio.h> #include <string.h> -#include <unistd.h> #include "src/core/support/string.h" #include <grpc/byte_buffer.h> diff --git a/test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c b/test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c index 891efdac06..b3090c484e 100644 --- a/test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c +++ b/test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c @@ -35,7 +35,6 @@ #include <stdio.h> #include <string.h> -#include <unistd.h> #include <grpc/byte_buffer.h> #include <grpc/support/alloc.h> diff --git a/test/core/end2end/tests/request_response_with_metadata_and_payload.c b/test/core/end2end/tests/request_response_with_metadata_and_payload.c index 2fe9211512..5eb9480c78 100644 --- a/test/core/end2end/tests/request_response_with_metadata_and_payload.c +++ b/test/core/end2end/tests/request_response_with_metadata_and_payload.c @@ -35,7 +35,6 @@ #include <stdio.h> #include <string.h> -#include <unistd.h> #include <grpc/byte_buffer.h> #include <grpc/support/alloc.h> diff --git a/test/core/end2end/tests/request_response_with_payload.c b/test/core/end2end/tests/request_response_with_payload.c index cfc33eb5b0..5daf2838e5 100644 --- a/test/core/end2end/tests/request_response_with_payload.c +++ b/test/core/end2end/tests/request_response_with_payload.c @@ -35,7 +35,6 @@ #include <stdio.h> #include <string.h> -#include <unistd.h> #include <grpc/byte_buffer.h> #include <grpc/support/alloc.h> diff --git a/test/core/end2end/tests/request_response_with_payload_and_call_creds.c b/test/core/end2end/tests/request_response_with_payload_and_call_creds.c index 75d7b62a25..3d4595f3bd 100644 --- a/test/core/end2end/tests/request_response_with_payload_and_call_creds.c +++ b/test/core/end2end/tests/request_response_with_payload_and_call_creds.c @@ -35,7 +35,6 @@ #include <stdio.h> #include <string.h> -#include <unistd.h> #include <grpc/grpc_security.h> #include <grpc/byte_buffer.h> @@ -55,7 +54,7 @@ static const char overridden_iam_selector[] = "overridden_selector"; typedef enum { NONE, OVERRIDE, - DELETE + DESTROY } override_mode; enum { TIMEOUT = 200000 }; @@ -176,7 +175,7 @@ static void request_response_with_payload_and_call_creds( GPR_ASSERT(creds != NULL); GPR_ASSERT(grpc_call_set_credentials(c, creds) == GRPC_CALL_OK); break; - case DELETE: + case DESTROY: GPR_ASSERT(grpc_call_set_credentials(c, NULL) == GRPC_CALL_OK); break; } @@ -271,7 +270,7 @@ static void request_response_with_payload_and_call_creds( GRPC_IAM_AUTHORITY_SELECTOR_METADATA_KEY, overridden_iam_selector)); break; - case DELETE: + case DESTROY: GPR_ASSERT(!contains_metadata(&request_metadata_recv, GRPC_IAM_AUTHORIZATION_TOKEN_METADATA_KEY, iam_token)); @@ -320,7 +319,7 @@ void test_request_response_with_payload_and_overridden_call_creds( void test_request_response_with_payload_and_deleted_call_creds( grpc_end2end_test_config config) { - request_response_with_payload_and_call_creds(__FUNCTION__, config, DELETE); + request_response_with_payload_and_call_creds(__FUNCTION__, config, DESTROY); } void grpc_end2end_tests(grpc_end2end_test_config config) { diff --git a/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c b/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c index 1c1ea36341..4daa17a972 100644 --- a/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c +++ b/test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c @@ -35,7 +35,6 @@ #include <stdio.h> #include <string.h> -#include <unistd.h> #include <grpc/byte_buffer.h> #include <grpc/support/alloc.h> diff --git a/test/core/end2end/tests/request_with_large_metadata.c b/test/core/end2end/tests/request_with_large_metadata.c index 06452dc1fb..634179222e 100644 --- a/test/core/end2end/tests/request_with_large_metadata.c +++ b/test/core/end2end/tests/request_with_large_metadata.c @@ -35,7 +35,6 @@ #include <stdio.h> #include <string.h> -#include <unistd.h> #include <grpc/byte_buffer.h> #include <grpc/support/alloc.h> diff --git a/test/core/end2end/tests/request_with_payload.c b/test/core/end2end/tests/request_with_payload.c index 6f1a618bde..534e2713db 100644 --- a/test/core/end2end/tests/request_with_payload.c +++ b/test/core/end2end/tests/request_with_payload.c @@ -35,7 +35,6 @@ #include <stdio.h> #include <string.h> -#include <unistd.h> #include <grpc/byte_buffer.h> #include <grpc/support/alloc.h> diff --git a/test/core/end2end/tests/simple_delayed_request.c b/test/core/end2end/tests/simple_delayed_request.c index 030e358db4..6a5c9c5b1a 100644 --- a/test/core/end2end/tests/simple_delayed_request.c +++ b/test/core/end2end/tests/simple_delayed_request.c @@ -35,7 +35,6 @@ #include <stdio.h> #include <string.h> -#include <unistd.h> #include <grpc/byte_buffer.h> #include <grpc/support/alloc.h> diff --git a/test/core/end2end/tests/simple_request.c b/test/core/end2end/tests/simple_request.c index aa6e506d1a..0b0ea689d7 100644 --- a/test/core/end2end/tests/simple_request.c +++ b/test/core/end2end/tests/simple_request.c @@ -35,7 +35,6 @@ #include <stdio.h> #include <string.h> -#include <unistd.h> #include "src/core/support/string.h" #include <grpc/byte_buffer.h> diff --git a/test/core/end2end/tests/simple_request_with_high_initial_sequence_number.c b/test/core/end2end/tests/simple_request_with_high_initial_sequence_number.c index 6c24fff02e..73dca0f6f8 100644 --- a/test/core/end2end/tests/simple_request_with_high_initial_sequence_number.c +++ b/test/core/end2end/tests/simple_request_with_high_initial_sequence_number.c @@ -35,7 +35,6 @@ #include <stdio.h> #include <string.h> -#include <unistd.h> #include "src/core/support/string.h" #include <grpc/byte_buffer.h> diff --git a/test/core/fling/server.c b/test/core/fling/server.c index 57e702eaad..b608f071dd 100644 --- a/test/core/fling/server.c +++ b/test/core/fling/server.c @@ -39,7 +39,10 @@ #include <stdlib.h> #include <string.h> #include <time.h> +#ifndef _WIN32 +/* This is for _exit() below, which is temporary. */ #include <unistd.h> +#endif #include "test/core/util/grpc_profiler.h" #include "test/core/util/test_config.h" @@ -166,6 +169,8 @@ static void start_send_status(void) { tag(FLING_SERVER_SEND_STATUS_FOR_STREAMING))); } +/* We have some sort of deadlock, so let's not exit gracefully for now. + When that is resolved, please remove the #include <unistd.h> above. */ static void sigint_handler(int x) { _exit(0); } int main(int argc, char **argv) { diff --git a/test/core/iomgr/sockaddr_utils_test.c b/test/core/iomgr/sockaddr_utils_test.c index 9f5e954b9d..9212f01c3f 100644 --- a/test/core/iomgr/sockaddr_utils_test.c +++ b/test/core/iomgr/sockaddr_utils_test.c @@ -34,7 +34,6 @@ #include "src/core/iomgr/sockaddr_utils.h" #include <errno.h> -#include <netinet/in.h> #include <string.h> #include <grpc/support/alloc.h> diff --git a/test/core/security/secure_endpoint_test.c b/test/core/security/secure_endpoint_test.c index f7bd3cb4ae..6477454e8a 100644 --- a/test/core/security/secure_endpoint_test.c +++ b/test/core/security/secure_endpoint_test.c @@ -35,8 +35,6 @@ #include <fcntl.h> #include <sys/types.h> -#include <sys/socket.h> -#include <unistd.h> #include "src/core/security/secure_endpoint.h" #include "src/core/iomgr/endpoint_pair.h" |