Commit Graph

300 Commits

Author SHA1 Message Date
Craig Tiller 4b6ab78f36 Merge github.com:google/grpc into async-api 2015-02-04 16:32:56 -08:00
Nicolas "Pixel" Noble 900dadb2df Merge branch 'master' of github.com:google/grpc into grpc-win32
Conflicts:
	include/grpc/support/time_win32.h
2015-02-04 23:41:51 +01:00
David Klempner 05fce429e2 Fix a memory leak and a gpr_strdup/free mismatch in json_test 2015-02-04 14:40:42 -08:00
David Klempner 2078a7ec58 Merge branch 'master' into source_cleanup 2015-02-04 13:33:47 -08:00
Craig Tiller 24fc2c4c5d Convert request_response_with_payload 2015-02-04 13:01:16 -08:00
Craig Tiller 6a60cba85e Add useful utilities 2015-02-04 13:00:17 -08:00
Craig Tiller a6347ea3e2 Remove invalid checks 2015-02-04 12:55:51 -08:00
Vijay Pai 3726098a22 Fling client needs to have 4 invocations of event_finish to make this
a real ping-pong test
2015-02-04 11:46:50 -08:00
Hongyu Chen 1ef06e6285 V0 implementation of census_get_active_ops(). 2015-02-04 10:36:04 -08:00
David Klempner 78b79920af Fix up feature test macros
Move all feature test macros to the start of the file and check that
they aren't already defined or defined to a lower value than the file
needs.

Projects should be allowed to put these in CFLAGS and we shouldn't break
when they do.
2015-02-04 10:18:59 -08:00
Julien Boeuf 0561896751 Addressing comments.
The new gpr_tmpfile API is actually much nicer to use. Thanks Nico!
2015-02-03 23:17:12 -08:00
Craig Tiller 30fd935a4f Merge github.com:google/grpc into async-api 2015-02-03 21:21:23 -08:00
Craig Tiller d27cf3b387 Merge github.com:google/grpc into async-api-new
Conflicts:
	Makefile
2015-02-03 21:20:45 -08:00
Craig Tiller 166e25002c First test passes 2015-02-03 20:14:41 -08:00
Craig Tiller ea61b07800 Updated the first test (which fails) 2015-02-03 19:19:27 -08:00
Nicolas "Pixel" Noble 21f627ad0a First draft of the win32 implementation of iomgr.
Caveats:
-) The win32 pollset isn't threadsafe (yet).
-) Only client code is implemented.
-) Only very simple code has been tested with it yet.
2015-02-04 02:13:04 +01:00
Craig Tiller 5a34d452f6 WIP simple_request 2015-02-03 14:29:22 -08:00
Craig Tiller 2c189e393c Fork tests into legacy/non-legacy 2015-02-03 13:56:55 -08:00
Craig Tiller fb189f826e Flesh out batch API 2015-02-03 12:07:07 -08:00
Nicolas "Pixel" Noble 4d33501a2e Cleaning out remains of google3. 2015-02-03 05:17:12 +01:00
Julien Boeuf 026a417def Adding support for loading the SSL roots from an environment variable.
- Had to add support for files and environment variables as well.
- I can't compile on windows so I'm sure there will be some issues.
- Tested end-to-end with the simple ssl fullstack test.
2015-02-02 18:36:37 -08:00
Nathaniel Manista 40562576bc Merge pull request #358 from dklempner/build 2015-02-02 17:08:44 -08:00
David Klempner f94838b0a3 Make several python scripts explicitly python2.7
I tried actually doing a build on my home desktop, and none of these
run with python 3.3, which is /usr/bin/python on my home desktop.
2015-02-02 17:03:14 -08:00
Craig Tiller c4f0ebe63b Prepare for the new batch call API.
Rename all core API functions that are on their way to deprecation with
an _old tag across all wrappings.
2015-02-02 15:39:31 -08:00
Craig Tiller 40d2a4307b Merge branch 'async-api-prep' of github.com:ctiller/grpc into async-api 2015-02-02 15:29:14 -08:00
Craig Tiller e863e1b855 Merge github.com:google/grpc into async-api 2015-02-02 14:43:23 -08:00
Craig Tiller 701c5843bc Fix tests to be a bit more sane 2015-02-02 14:03:06 -08:00
David Klempner ea6e8a65a2 Fix poll_kick_posix_test under asan
1. Init the freelist_mu in the forced-fallback path
2. Free allocated memory in the test_over_free test case.
2015-02-02 13:13:01 -08:00
Craig Tiller 9c5feda33d Cleanup output of tests 2015-02-02 12:55:31 -08:00
Craig Tiller a7cac78516 Prepare for the new batch call API.
Rename all core API functions that are on their way to deprecation with
an _old tag across all wrappings.
2015-02-02 10:16:30 -08:00
Craig Tiller 1e0d4c43d1 Rename & semantic fixup progress 2015-01-30 16:17:29 -08:00
Craig Tiller 4e551c4acf Init fix 2015-01-30 13:03:46 -08:00
Craig Tiller f25b0eea42 Init fix 2015-01-29 21:03:39 -08:00
Craig Tiller 44c02738ed Merge github.com:google/grpc into async-api
Conflicts:
	test/core/echo/echo_test.c
2015-01-29 21:01:47 -08:00
Nicolas "Pixel" Noble 2b16bc4656 Fixing echo test. 2015-01-30 04:39:06 +01:00
Craig Tiller a0935d9e36 Add missing wait 2015-01-29 17:36:37 -08:00
Nicolas "Pixel" Noble 213ed91850 Re-enabling errors on warning, disabling unused parameter warning, and fixing all subsequent errors. 2015-01-30 02:11:35 +01:00
Craig Tiller 4433e6e68d Fix echo test 2015-01-29 16:43:25 -08:00
Craig Tiller 44ad76fae1 Merge github.com:google/grpc into async-api
Conflicts:
	test/core/echo/client.c
2015-01-29 09:35:28 -08:00
Craig Tiller 9b3809f99f Merge pull request #168 from nicolasnoble/json
Replacing cJSON with our own code instead.
2015-01-29 09:17:02 -08:00
Nicolas "Pixel" Noble 3c63c0ced3 Adding a few more tests. 2015-01-29 05:32:05 +01:00
Nicolas "Pixel" Noble 08cd92a890 Adding a few more test to improve coverage. 2015-01-29 01:29:36 +01:00
David Klempner a8a0e5c4de Add a timeout to echo client's RPCs
This ensures that echo test fails in a timely manner rather than
hanging when it breaks.
2015-01-28 14:41:50 -08:00
Craig Tiller b9c98d4304 Merge github.com:google/grpc into async-api 2015-01-28 10:50:05 -08:00
Nicolas Noble 9574132019 Merge branch 'master' of github.com:google/grpc into json
Conflicts:
	Makefile
	build.json
	vsprojects/vs2013/grpc.vcxproj
	vsprojects/vs2013/grpc.vcxproj.filters
	vsprojects/vs2013/grpc_unsecure.vcxproj
	vsprojects/vs2013/grpc_unsecure.vcxproj.filters
2015-01-27 19:14:11 -08:00
Nicolas Noble 66b5bba25b Fixing a couple of minor bugs, and adding a few tests. 2015-01-27 19:12:26 -08:00
Alistair Veitch 4d9f3d7b63 Merge pull request #167 from maxwell-demon/master
Fix census_log_tests on platforms with only one core.
2015-01-27 17:31:23 -08:00
Craig Tiller 3b56a57b25 Merge pull request #157 from dklempner/eventfd
Add support for eventfd based kicking on linux.
2015-01-27 16:53:30 -08:00
Nicolas Noble 8c2be9bbff Addressing latest comments. 2015-01-28 01:11:24 +01:00
Craig Tiller cce17ac033 First compiling version of the new C api. 2015-01-27 13:54:14 -08:00
Yang Gao 3ed874c861 sync up with master 2015-01-27 11:39:14 -08:00
Craig Tiller 6437bd5037 Merge github.com:google/grpc into javascript 2015-01-27 10:18:09 -08:00
Craig Tiller 103481ec8a Add args 2015-01-27 10:18:04 -08:00
David Klempner e360568a70 Rename poll_kick_test to poll_kick_posix_test 2015-01-26 17:27:21 -08:00
Nicolas Noble f66ccc44d7 Merge branch 'master' of github.com:google/grpc into json 2015-01-26 17:03:08 -08:00
Nicolas Noble e04455a7ff Addressing comments. 2015-01-26 17:02:45 -08:00
David Klempner 6e8bdb9a02 Merge branch 'master' into eventfd
This includes nuking the special pollset_kick_windows.h, since it is no
longer relevant.
2015-01-26 15:37:23 -08:00
David Klempner 78dc6cdaeb Refactor the pipe/eventfd abstraction
This introduces the wakeup fd interface, corresponding approximately to
the existing Google version, complete with a ported giant detailed usage
comment.

The implementation has two layers, "specialized" and "fallback". The
specialized layer is intended to be a suitable platform specific
implementation like eventfd, whereas "fallback" is probably pipe, with
runtime detection of whether the specialized version works on this
system (currently stubbed out).
2015-01-26 15:02:51 -08:00
Nicolas Noble fee065c1c7 Merge branch 'master' of github.com:google/grpc into json
Conflicts:
	src/core/security/credentials.c
2015-01-26 11:41:12 -08:00
Yang Gao 5fd0d29dfe run clang-format 2015-01-26 00:19:48 -08:00
Craig Tiller da8774cee2 remove stale comment 2015-01-23 22:41:34 -08:00
Craig Tiller 715342eb19 Remove uses of sprintf 2015-01-23 15:42:33 -08:00
Craig Tiller 3385782a65 Remove uses of sprintf 2015-01-23 15:39:40 -08:00
Craig Tiller 8ddf31272d Remove uses of sprintf 2015-01-23 15:25:40 -08:00
Craig Tiller 03f75259c5 Remove uses of sprintf 2015-01-23 15:22:42 -08:00
Craig Tiller 28214ea1b2 Remove uses of sprintf 2015-01-23 15:17:07 -08:00
Craig Tiller 9bb2632309 Remove uses of sprintf 2015-01-23 15:12:08 -08:00
Craig Tiller 68cc1afda5 Remove uses of sprintf 2015-01-23 15:10:53 -08:00
Craig Tiller ec46f5fbd2 Remove use of *printf 2015-01-23 15:08:40 -08:00
Craig Tiller 7da8ef14c1 Add missing include 2015-01-23 15:07:22 -08:00
Craig Tiller 82df7446ae Remove use of sprintf 2015-01-23 15:06:44 -08:00
Craig Tiller 2be952ce28 Remove use of sprintf 2015-01-23 15:05:30 -08:00
Craig Tiller cf7bd708cf Remove use of sprintf 2015-01-23 15:04:53 -08:00
Craig Tiller 37d4eb56f0 Remove use of sprintf 2015-01-23 15:03:10 -08:00
jboeuf 10f4620e93 Merge pull request #179 from ctiller/kill-printf
Remove uses of sprintf
2015-01-23 14:28:14 -08:00
Craig Tiller b7b9c758ed Add constant for min bufsize for timeout encoding 2015-01-23 13:52:43 -08:00
murgatroid99 ab1103fbb3 Removed unnecessary test file 2015-01-23 13:28:08 -08:00
Craig Tiller 485d77628d Move string.h to internal code 2015-01-23 12:54:05 -08:00
murgatroid99 d10c0abaf6 Merge branch 'master' of github.com:google/grpc into merge_new_invoke_api 2015-01-23 09:11:39 -08:00
Craig Tiller 0a20771765 Update to the latest security API 2015-01-23 08:12:38 -08:00
Craig Tiller 3cc24a6d7f Merge github.com:google/grpc into javascript 2015-01-23 08:08:45 -08:00
Jan Tattermusch ac139dead1 Merge pull request #153 from ctiller/windows-fixes
Windows fixes
2015-01-23 07:44:02 -08:00
Craig Tiller e86076159c Fix indentation 2015-01-22 20:49:02 -08:00
Nicolas Noble 614c2bf99b Replacing cJSON with our own code instead. 2015-01-22 15:32:02 -08:00
maxwell-demon 164ac96024 Fix census_log_tests on platforms with only one core. 2015-01-22 23:20:48 +00:00
murgatroid99 b2c86aa8c4 Merge branch 'master' into merge_new_invoke_api 2015-01-22 11:02:49 -08:00
Craig Tiller 9497b3c1c4 Bugfix connection code in test 2015-01-21 22:10:26 -08:00
Craig Tiller 018afed1b3 Must init iomgr 2015-01-21 21:35:36 -08:00
David Klempner dbb4f942d0 Add support for eventfd based kicking on linux.
This adds support for eventfd based kicking, with the skeleton of
support for runtime selection between eventfds and pipes.
2015-01-21 17:45:18 -08:00
murgatroid99 48c9c4a59e Resolved merge conflicts with master 2015-01-21 17:12:04 -08:00
Craig Tiller 5d8fbe2663 Make this socket creation portable 2015-01-21 16:33:54 -08:00
Craig Tiller d19d850357 This field is 8 bits on Mac 2015-01-21 16:28:39 -08:00
Craig Tiller 0c0b60c322 Add platform ifdefs, fix up some MSVC warnings 2015-01-21 15:49:28 -08:00
Craig Tiller e005d22146 Const correctness fixes 2015-01-21 15:02:20 -08:00
Craig Tiller 59963419c4 Clean up formatting 2015-01-21 14:04:01 -08:00
Craig Tiller 3948412b15 Have echo server serve up some html 2015-01-21 13:53:16 -08:00
Craig Tiller 8a84be382a Echo server gets security 2015-01-21 13:53:16 -08:00
Craig Tiller 724b7c693a clang-format 2015-01-20 22:44:10 -08:00
Craig Tiller 8379a06f8d Merge branch 'new_invoke_api' of github.com:google/grpc into update-api
Conflicts:
	src/cpp/client/channel.cc
	src/cpp/stream/stream_context.cc
	src/cpp/stream/stream_context.h
	src/php/ext/grpc/call.c
	test/core/end2end/tests/max_concurrent_streams.c
2015-01-20 22:43:32 -08:00
Julien Boeuf 8fbcc4391e Changing the SSL (Server) Credentials API.
- Changed the unsigned char * + size to NULL terminated strings which
  makes sense for the PEM format. I may change TSI later (but the impact
  will hopefully be much more limited).
- Added a way to pass multiple key/cert pairs to servers which is needed
  when hosting more than one domain.
- Removed the C++ SSL credentials tests as we are going to have an
  option to not specify the roots which will then be derived from the
  environment (well-known platform dependent locations and/or
  environment variable).
- Fixed the php build which is the only one added in the run_test.py.
  This change will certainly break node, python and ruby.
2015-01-20 22:18:15 -08:00
David Klempner fd99dd3475 Cap the size of the poll kick freelist.
This caps the size of the poll kick freelist at the arbitrary value of
25.
2015-01-20 17:18:39 -08:00
Craig Tiller bcfa267b5f Release server creds 2015-01-19 18:23:30 -08:00
Craig Tiller f97170716f Merge github.com:google/grpc into sec 2015-01-19 16:19:19 -08:00
Craig Tiller 64761f8af6 clang-format 2015-01-19 15:33:02 -08:00
Craig Tiller 64f65458e3 Allow secure connections with fling server 2015-01-19 15:18:10 -08:00
Craig Tiller ecd49345b5 Use clang-format-3.5 2015-01-18 14:36:47 -08:00
Craig Tiller 59140fc116 Explicitly name the target language.
Instead of C++ or not C++, name C++ and C, in preparation for being able to name other languages in the future.
2015-01-18 10:12:17 -08:00
vjpai a537ae465b Merge pull request #70 from ctiller/benchmark
Opportunistically use perftools if installed.
2015-01-16 16:44:49 -08:00
David Klempner 7f3ed1eda1 Factor out the pollset kicking mechanism and eliminate sharding
This change pulls out a separate pollset_kick module, which currently
uses a freelist of pipes dynamically assigned to pollsets when they
enter polling rather than the previous racy sharding mechanism.

We ultimately may wish to eliminate the dynamic assignment for multipoll
sets, but this should be sufficient for the moment.
2015-01-16 15:42:31 -08:00
Craig Tiller 29fa1c2fa4 Compile fix 2015-01-16 15:26:11 -08:00
Craig Tiller 5188535a26 Merge branch 'new_invoke_api' of github.com:google/grpc into update-api 2015-01-16 15:24:17 -08:00
Craig Tiller 33a0b83af3 clang compile fixes 2015-01-16 15:14:10 -08:00
Yang Gao aa6f993841 Merge pull request #88 from ctiller/shutdown
Add an optional server shutdown event.
2015-01-16 14:05:27 -08:00
Craig Tiller 4ffdcd56ce Add an optional server shutdown event.
Allows servers to expedite shutdown once all in-progress calls are
completed. We may want to eventually remove grpc_server_shutdown in
preference to this.
2015-01-16 11:34:55 -08:00
Craig Tiller 4853791a84 Build fix 2015-01-16 09:57:49 -08:00
Craig Tiller 7b01878736 Fix returned status
The client should return status deadline exceeded when the deadline is
exceeded (not cancelled status)
2015-01-16 09:53:39 -08:00
Craig Tiller 7132d51b2e Include some useful help text 2015-01-16 09:00:12 -08:00
Craig Tiller c8c8bfa403 Merge branch 'new_invoke_api' of github.com:google/grpc into update
Conflicts:
	src/core/surface/call.c
	test/core/end2end/tests/thread_stress.c
	tools/run_tests/run_tests.py
2015-01-15 22:57:02 -08:00
Julien Boeuf b222b4d978 Changing size type in Transport Security (TSI) from uint32_t to size_t:
Will remove grpc impedance mismatch.
2015-01-15 22:47:49 -08:00
Craig Tiller 297fafa078 Opportunistically use perftools if installed.
Allows us to collect profiles of the open source build using gprof.
2015-01-15 15:46:39 -08:00
Craig Tiller 3eef2c4bcb clang-format 2015-01-15 11:37:54 -08:00
Craig Tiller 32946d37e0 () --> (void) 2015-01-15 11:37:30 -08:00
Craig Tiller d7f2c2b1c7 clang-format 2015-01-15 10:18:47 -08:00
Craig Tiller a2075b90d7 Remove calls to grpc_call_accept from C core tests.
This call is deprecated.
2015-01-15 10:16:35 -08:00
Craig Tiller 408c7383cc clang-format 2015-01-14 16:25:47 -08:00
Craig Tiller ca75796811 Fling test uses grpc_call_invoke 2015-01-14 16:17:05 -08:00
Craig Tiller 240d02c076 Echo test uses grpc_call_invoke 2015-01-14 16:16:52 -08:00
Craig Tiller 09b637538f clang-format 2015-01-14 13:02:09 -08:00
Craig Tiller 465e2e11d1 Merge github.com:google/grpc into api 2015-01-14 13:01:46 -08:00
Yang Gao 5680ff4687 Run clang-format-all.sh 2015-01-14 12:14:21 -08:00
Craig Tiller e1e2475b69 Unify signal handling in C 2015-01-14 11:21:00 -08:00
Craig Tiller 6d43445a1a Merge github.com:google/grpc into api 2015-01-14 11:19:09 -08:00
Nicolas "Pixel" Noble 80d68c09c4 Fixing test_config.c
Now all the gpr tests build and run under win32.
2015-01-13 20:14:43 -08:00
Craig Tiller 5c35008ea1 Unify signal handling in C 2015-01-13 17:26:27 -08:00
Craig Tiller bf444937c6 Fix ordering problem leading to flaky test 2015-01-13 17:13:08 -08:00
Craig Tiller fc84e7b28e Fix tag matching bug 2015-01-13 16:49:44 -08:00
Craig Tiller 9c0307bd4f Update test to grpc_call_invoke 2015-01-13 16:49:24 -08:00
Craig Tiller 97f7fca5ff Remove calls to grpc_call_start_invoke 2015-01-13 16:36:31 -08:00
Craig Tiller cbbac9b10d Compile fix 2015-01-13 16:13:43 -08:00
Craig Tiller 40fc7a6632 clang-format codebase 2015-01-13 16:11:58 -08:00
Craig Tiller 375605b65f Merge github.com:google/grpc into api 2015-01-13 16:11:30 -08:00
Craig Tiller 80fa15c151 Moving prototype from Google to GitHub
I'd started some prototyping work on this change before the move to
GitHub; this change restores things.
2015-01-13 16:10:49 -08:00
Craig Tiller 21b19a552c Fix formatting 2015-01-13 12:39:32 -08:00
Craig Tiller 1ee7cb0c0b Merge github.com:google/grpc into format 2015-01-13 12:39:00 -08:00
Craig Tiller b5dcec5a2e clang-format codebase 2015-01-13 11:13:42 -08:00
Craig Tiller 770f60a475 Merge github.com:google/grpc into testcpp 2015-01-12 17:44:43 -08:00
nnoble 5f2ecb355d Splitting grpc_test_util into gpr_test_util.
Change on 2015/01/12 by nnoble <nnoble@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=83801564
2015-01-12 17:36:57 -08:00
ctiller 570d1f4425 Return bound port number from grpc_server_add_http2_port.
Allows tests to bind to port 0 and still have clients connect to them.
	Change on 2015/01/12 by ctiller <ctiller@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=83800669
2015-01-12 17:36:57 -08:00
Craig Tiller edd10d2596 Make this file usable from C++ 2015-01-12 16:40:51 -08:00
hongyu 99e317a8f8 grpc census hash_table test coverage improvements.
Change on 2015/01/12 by hongyu <hongyu@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=83786701
2015-01-12 14:11:52 -08:00