aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/iomgr
Commit message (Collapse)AuthorAge
* Fix test for multiple readsGravatar Craig Tiller2015-04-28
| | | | | | Previously this test assumed all bytes would be read in one request. Also update test to use grpc_init() so that we can enable tracing.
* Merge github.com:grpc/grpc into windows-fixesGravatar Craig Tiller2015-04-13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: BUILD src/core/iomgr/tcp_server.h src/core/iomgr/tcp_server_posix.c src/core/iomgr/tcp_server_windows.c src/core/security/server_secure_chttp2.c src/core/surface/completion_queue.c src/core/surface/completion_queue.h src/core/surface/server.c test/core/end2end/tests/cancel_after_invoke.c test/core/end2end/tests/cancel_test_helpers.h tools/run_tests/tests.json vsprojects/vs2013/Grpc.mak
| * Merge branch 'master' of github.com:grpc/grpc into freebsdGravatar Nicolas "Pixel" Noble2015-04-10
| |\
* | | Clean up alarm_test.c includesGravatar Craig Tiller2015-04-08
| | |
| | * Fix server shutdownGravatar Craig Tiller2015-04-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | A previous fix to make close() occur later can cause socket reuse by servers to fail as previous sockets are left asynchronously open. This change: - adds a callback to TCP server shutdown to signal that the server is completely shutdown - wait for that callback before destroying listeners in the server (and before destroying the server) - handles fallout
* | | Fix server shutdownGravatar Craig Tiller2015-04-07
| |/ |/| | | | | | | | | | | | | | | A previous fix to make close() occur later can cause socket reuse by servers to fail as previous sockets are left asynchronously open. This change: - adds a callback to TCP server shutdown to signal that the server is completely shutdown - wait for that callback before destroying listeners in the server (and before destroying the server) - handles fallout
| * FreeBSD preliminary work.Gravatar Nicolas Noble2015-03-16
|/ | | | | | | | -) You can't assume bash is installed. Scripts needs to be cleaned out of bashisms. -) You can't assume python is in /usr/bin. Use env instead. -) AF_INET is in sys/socket.h -) Added port_platform's basic structure for FreeBSD, based off Darwin. -) FreeBSD doesn't have and doesn't need libdl for OpenSSL.
* Guard headers tool.Gravatar Nicolas "Pixel" Noble2015-03-01
|
* Introduce slowdown factor for unit test deadlinesGravatar Craig Tiller2015-02-25
| | | | Dramatically lowers (eliminates maybe?) false negatives from ?SAN runs.
* Merge pull request #592 from ctiller/chex2Gravatar Nicolas Noble2015-02-20
|\ | | | | Fix TSAN reported error in fd_posix.c
* | 32 bit compilation fixes for coreGravatar Craig Tiller2015-02-19
| |
| * Fix a TSAN reported errorGravatar Craig Tiller2015-02-18
|/ | | | | | | | | | We now pass down pointers to closures instead of (callback, arg) pair elements separately. This allows us to store one word atomically, fixing a race condition. All call sites have been updated to the new API. No new allocations are incurred. grpc_fd_state is deleted to avoid any temptation to ever add anything there again.
* Add missing new-lines at end of fileGravatar Craig Tiller2015-02-18
|
* Update copyright to 2015Gravatar Craig Tiller2015-02-18
|
* Multi-completion-queue-serverGravatar Craig Tiller2015-02-12
| | | | | | Allow binding a different completion queue to each registered method. This will allow multiplexing for the C++ server between sync & async methods more easily.
* Epoll based multipollerGravatar David Klempner2015-02-10
| | | | | | | | | | | | | | This is a multipoller based on epoll rather than poll. Note that this implementation is aimed at correctness rather than performance, although it should immediately have better scalability to large numbers of FDs, both due to epoll's O(1) sized API and due to not needing to wake up polling threads to do interest set changes. One notable difference here is that we directly attach a wakeup fd rather than using the freelisting kick mechanism that the poll() based implementations use, because modifying the epoll set to use a different kick fd each time isn't free.
* Fix poll_kick_posix_test under asanGravatar David Klempner2015-02-02
| | | | | 1. Init the freelist_mu in the forced-fallback path 2. Free allocated memory in the test_over_free test case.
* Re-enabling errors on warning, disabling unused parameter warning, and ↵Gravatar Nicolas "Pixel" Noble2015-01-30
| | | | fixing all subsequent errors.
* Merge pull request #157 from dklempner/eventfdGravatar Craig Tiller2015-01-27
|\ | | | | Add support for eventfd based kicking on linux.
| * Rename poll_kick_test to poll_kick_posix_testGravatar David Klempner2015-01-26
| |
| * Merge branch 'master' into eventfdGravatar David Klempner2015-01-26
| |\ | | | | | | | | | | | | This includes nuking the special pollset_kick_windows.h, since it is no longer relevant.
| * | Refactor the pipe/eventfd abstractionGravatar David Klempner2015-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* | | run clang-formatGravatar Yang Gao2015-01-26
| |/ |/|
* | Bugfix connection code in testGravatar Craig Tiller2015-01-21
| |
* | Must init iomgrGravatar Craig Tiller2015-01-21
| |
| * Add support for eventfd based kicking on linux.Gravatar David Klempner2015-01-21
| | | | | | | | | | This adds support for eventfd based kicking, with the skeleton of support for runtime selection between eventfds and pipes.
* | Make this socket creation portableGravatar Craig Tiller2015-01-21
| |
* | This field is 8 bits on MacGravatar Craig Tiller2015-01-21
|/
* Cap the size of the poll kick freelist.Gravatar David Klempner2015-01-20
| | | | | This caps the size of the poll kick freelist at the arbitrary value of 25.
* Use clang-format-3.5Gravatar Craig Tiller2015-01-18
|
* Factor out the pollset kicking mechanism and eliminate shardingGravatar David Klempner2015-01-16
| | | | | | | | | 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.
* () --> (void)Gravatar Craig Tiller2015-01-15
|
* Unify signal handling in CGravatar Craig Tiller2015-01-14
|
* Remove libevent.Gravatar ctiller2015-01-09
| | | | | | | | | | | | | | | | | | | | | | | Fixed any exposed bugs across the stack. Add a poll() based implementation. Heavily leverages pollset infrastructure to allow small polls to be the norm. Exposes a mechanism to plug in epoll/kqueue for platforms where we have them. Simplify iomgr callbacks to return one bit of success or failure (instead of the multi valued result that was mostly unused previously). This will ease the burden on new implementations, and the previous system provided no real value anyway. Removed timeouts on endpoint read/write routines. This simplifies porting burden by providing a more orthogonal interface, and the functionality can always be replicated when desired by using an alarm combined with endpoint_shutdown. I'm fairly certain we ended up with this interface because it was convenient to do from libevent. Things that need attention still: - adding an fd to a pollset is O(n^2) - but this is probably ok given that we'll not use this for multipolling once platform specific implementations are added. - we rely on the backup poller too often - especially for SSL handshakes and for client connection establishment we should have a better mechanism ([] [] - Linux needs to use epoll for multiple fds, FreeBSD variants (including Darwin) need to use kqueue. ([] [] - Linux needs to use eventfd for poll kicking. ([] Change on 2015/01/07 by ctiller <ctiller@google.com> ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=83461069
* Add a --forever flag, to continuously run tests as things change.Gravatar ctiller2015-01-09
| | | | | | | Change on 2015/01/07 by ctiller <ctiller@google.com> ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=83451760
* Remove libevent.Gravatar ctiller2015-01-08
| | | | | | | | | | | | | | | | | | | | | | | Fixed any exposed bugs across the stack. Add a poll() based implementation. Heavily leverages pollset infrastructure to allow small polls to be the norm. Exposes a mechanism to plug in epoll/kqueue for platforms where we have them. Simplify iomgr callbacks to return one bit of success or failure (instead of the multi valued result that was mostly unused previously). This will ease the burden on new implementations, and the previous system provided no real value anyway. Removed timeouts on endpoint read/write routines. This simplifies porting burden by providing a more orthogonal interface, and the functionality can always be replicated when desired by using an alarm combined with endpoint_shutdown. I'm fairly certain we ended up with this interface because it was convenient to do from libevent. Things that need attention still: - adding an fd to a pollset is O(n^2) - but this is probably ok given that we'll not use this for multipolling once platform specific implementations are added. - we rely on the backup poller too often - especially for SSL handshakes and for client connection establishment we should have a better mechanism ([] [] - Linux needs to use epoll for multiple fds, FreeBSD variants (including Darwin) need to use kqueue. ([] [] - Linux needs to use eventfd for poll kicking. ([] Change on 2015/01/07 by ctiller <ctiller@google.com> ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=83461069
* Port [] alarm management to GRPC.Gravatar ctiller2014-12-29
| | | | | | | | | | | | | This change implements a platform independent alarm manager in alarm.c. It's integrated with iomgr, and some tests are cleaned up. The alarm implementation itself is a fairly direct port of LazyAlarmList from eventmanager. SpinLock has been replaced for now with gpr_mu, and other atomic operations have been dropped (again, for now). A majority of tests have been ported. Change on 2014/12/19 by ctiller <ctiller@google.com> ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=82551363
* Fix include guards.Gravatar ctiller2014-12-17
| | | | | | | Change on 2014/12/17 by ctiller <ctiller@google.com> ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=82354016
* Remove endpoint/ directories.Gravatar ctiller2014-12-17
| | | | | | | | | | Fold endpoint interface into iomgr, move secure_endpoint into security/. This will make it easier for endpoint to rely on some iomgr defined types (like pollset). Change on 2014/12/17 by ctiller <ctiller@google.com> ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=82338036
* Make alarm initialization take a timespec now.Gravatar ctiller2014-12-16
| | | | | | | | | This will allow combining of gpr_now() calls, and make it easier to test the alarm code in the future. Change on 2014/12/16 by ctiller <ctiller@google.com> ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=82246768
* GOAWAY & Reconnection support.Gravatar ctiller2014-12-15
| | | | | | | | | | | | Clients stay connected to a server after it shutdowns until all active calls have completed, and then they drop. After a GOAWAY or a disconnect, clients will attempt to re-resolve and reconnect to the server. Change on 2014/12/15 by ctiller <ctiller@google.com> ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=82178515
* Add time averaged stats for future alarm list work.Gravatar ctiller2014-12-15
| | | | | | | | | This is a trivial C89-ification of the []2 implementation of the same idea. Indeed the implementation files and tests have been branched from the [] versions. Change on 2014/12/15 by ctiller <ctiller@google.com> ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=82168822
* Simplify alarm API.Gravatar ctiller2014-12-15
| | | | | | | | | This change removes a corner case that needs to be handled (what happens if you add an alarm twice?). This corner case was never used, nor tested. Change on 2014/12/15 by ctiller <ctiller@google.com> ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=82168179
* Introducing iomgr.Gravatar ctiller2014-12-09
Move eventmanager and platform dependent endpoint functionality into a single library called 'iomgr'. This is primarily to prepare for a Windows port - where posix socket semantics lead to poor quality code. Mostly this is a code movement CL, with some small changes to help prepare the way for porting: - em style fd objects can only be held internally in iomgr, and own their memory - added grpc_iomgr_create_endpoint_pair() to accomodate the common pattern of creating a tcp endpoint from the output of socketpair - this will help keep our tests portable - separated em alarm interface into a separate file, as this part of event manager is needed higher up the stack - made the eventmanager bits a true singleton, simplifying API's across the stack as there's no longer a reason to carry a pointer there. Initial design document is here: https://docs.google.com/document/d/1VmafcHvvrP5kwtQkz84R5yXF7u7fW-9Pn0bkSUQHDt8/edit?disco=AAAAARNByxg Change on 2014/12/09 by ctiller <ctiller@google.com> ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=81716456