diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2015-05-11 10:46:33 -0700 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2015-05-11 10:46:33 -0700 |
commit | 9ec7f5ab81b98408b1cd4094ff536358528534c0 (patch) | |
tree | 5ae068d99cc33863e5cb332b79558e428fa60f9d /test/core | |
parent | b122e2ec9ff9c32b9ced1efbc02a06bc64178d9f (diff) | |
parent | 34f9af40e985b5fea4cf65335d14066398f43e83 (diff) |
Merge github.com:grpc/grpc into churn-churn-churn-the-api-gently-down-the-stream
Diffstat (limited to 'test/core')
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 876782df84..876782df84 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 80922f3b6f..671f232ee3 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 0adc437db0..9222310aa3 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 0b20a97559..eb236e19c4 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 592dfd415f..ce6dc72508 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 6e100db185..02c238221f 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 a88ca0b5b7..523091f5a1 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 13bf31584d..f3f051018e 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 29c023c72a..f280d971f7 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 c293551663..2dc3f2330f 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 8801dae98a..7a6e274264 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 6237e29b12..19b017abcf 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 2a8cf098eb..309276aedd 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 98bcf9ada9..2e54f407bb 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 e25b115d33..1f074c703a 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 3f8112d341..cd86b08349 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 497bdccdbd..0e52c4ec98 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 c125664115..473b4f94ac 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 04c3d5293c..dc9c407deb 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 9569b73339..91d580341e 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 4478d6edfa..5f44704fa8 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 d04171c590..a483ef535a 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 97068edd01..fce53950db 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 }; @@ -180,7 +179,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; } @@ -276,7 +275,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)); @@ -325,7 +324,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 3627a43408..9c0e1d214b 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 8393929920..18a6da853c 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 5e2516fb73..0533b71da9 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 e025fd1a1e..184cda3f95 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 271bdc56ca..f1b670be5a 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 3b5393f660..5ef3133ebe 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 8eab534177..1f1f857bd9 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" |