summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* fixes #1401 valgrind reports leaks in all testsGarrett D'Amore2021-01-03
| | | | | | | This arranges for nng_fini to be called via atexit in the test version of the library. It also cleans up some of the actual tests to reduce extraneous (and in some cases incorrect) calls to nng_fini.
* fixes #1398 integrate new acutest.h (#1400)Garrett D'Amore2021-01-03
|
* fixes #972 Very slow pull/push performance compared to ZMQGarrett D'Amore2020-12-27
| | | | | | | | | | This refactors the pipeline protocol to use lightweight mq instead of the more expensive message queue structure. It also provides nicer backpressure and buffering support. The test suite was updated and converted to NUTS as well. This won't completely close the gap, but it should help quite a bit.
* Convert list to new test framework; detached node fixes.Garrett D'Amore2020-11-24
| | | | | List nodes that are not part of a list should return NULL when asking for the next or previous item.
* New NUTS test framework (NNG Unit Test Support).Garrett D'Amore2020-11-23
| | | | | | | | | | | | | This is based on testutil/acutest, but is cleaner and fixes some short-comings. We will be adding more support for additional common paradigms to better facilitate transport tests. While here we added some more test cases, and fixed a possible symbol collision in the the stats framework (due to Linux use of a macro definition of "si_value" in a standard OS header). Test coverage may regress slightly as we are no longer using some of the legacy APIs.
* Work for test refactoring.Garrett D'Amore2020-11-18
| | | | | | | | | | | | | | | | | | | | | | There are a few major areas in this change. * CMake options are now located in a common cmake/NNGOptions.cmake file. This should make it easier for folks to figure out what the options are, and how they are used. * Tests are now scoped with their directory name, which should avoid possible name collisions with test names. * A number of tests have been either moved or incorporated into the newer testutil/acutest framework. We are moving away from my old c-convey framework to something easier to debug. * We use CMake directories a bit more extensively leading to a much cleaner CMake structure. It's not complete, but a big step in the right direction, and a preview of future work. * Tests are now run with verbose flags, so we get more test results in the CI/CD logs.
* fixes #1353 Move recvmax test for IPC into ipc testGarrett D'Amore2020-11-15
|
* fixes #1351 Move IPC dialer and listener props tests into new test suiteGarrett D'Amore2020-11-15
|
* fixes #1071 tran_chkopt can be cleaned upGarrett D'Amore2020-11-15
| | | | | | | | | | | | | | | | | This is a sweeping cleanup of the transport logic around options, and also harmonizes the names used when setting or getting options. Additionally, legacy methods are now moved into a separate file and can be elided via CMake or a preprocessor define. Fundamentally, the ability to set to transport options via the socket is deprecated; there are numerous problems with this and my earlier approaches to deal with this have been somewhat misguided. Further these approaches will not work with future protocol work that is planned (were some options need to be negotiated with peers at the time of connection establishment.) Documentation has been updated to reflect this. The test suites still make rather broad use of the older APIs, and will be converted later.
* fixes #1087 CMakeLists structural improvements desiredGarrett D'Amore2020-11-14
| | | | | This doesn't modularize all the tests yet, but it goes a long way in the right direction.
* fixes #1332 Test nng.ws failed, "Incorrect URL paths do not work"Garrett D'Amore2020-11-09
| | | | | | This moves some of the fragile tests to a new test suite that is a bit more careful with IPv4 vs. IPv6. Hopefully it will be a bit more resilient as a result.
* Clean up some warnings.Garrett D'Amore2020-11-08
|
* fixes #1041 Abstract socket address for IPCGarrett D'Amore2020-11-08
| | | | | | | | | | | | | | | | | | | | | | | | fixes #1326 Linux IPC could use fchmod fixes #1327 getsockname on ipc may not work This introduces an abstract:// style transport, which on Linux results in using the abstract socket with the given name (not including the leading NULL byte). A new NNG_AF_ABSTRACT is provided. Auto bind abstract sockets are also supported. While here we have inlined the aios for the POSIX ipc pipe objects, eliminating at least one set of failure paths, and have also performed various other cleanups. A unix:// alias is available on POSIX systems, which acts just like ipc:// (and is fact just an alias). This is supplied so that in the future we can add support for AF_UNIX on Windows. We've also absorbed the ipcperms test into the new ipc_test suite. Finally we are now enforcing that IPC path names on Windows are not over the maximum size, rather than just silently truncating them.
* fixes #1311 reduce wasted use for nni_aioGarrett D'Amore2020-10-31
| | | | | | | | | | fixes #1317 IPv6 listener get port is incorrect fixes #1319 Want symbolic service names This is phase 1 of reducing the memory foot-print of aios, and also of pipes. This removes the largest consumer the socket address information, from the aio, which was only used by a few consumers.
* fixes #1312 the nng.compat_ws test fails *frequently*Garrett D'Amore2020-10-31
| | | | | This test no longer offers any real value, and its fixed port allocation dependency makes it too brittle in CI/CD.
* fixes #1289 zerotier should have it's own copy of the id hashing codeGarrett D'Amore2020-08-16
| | | | | | | | | | | fixes #1288 id allocation can overallocate fixes #1126 consider removing lock from idhash This substantially refactors the id hash code, giving a cleaner API, and eliminating a extra locking as well as some wasteful allocations. The ZeroTier code has it's own copy, that is 64-bit friendly, as the rest of the consumers need only a simpler 32-bit API.
* fixes #1167 zerotier needs a chkoptGarrett D'Amore2020-08-09
|
* fixes #1279 Add support for ws4:// and ws6:// style websocket urlsGarrett D'Amore2020-08-08
| | | | fixes #1277 FreeBSD errors due to bad v4 vs. v6 assumptions
* resolve warnings building testGarrett D'Amore2020-08-08
|
* Prefix all tests with PROJECT_NAME (#1276)Hugo Lindström2020-08-07
|
* Add test code for bug1247.Garrett D'Amore2020-07-27
|
* fixes #1267 testutil cannot use ipc names on WindowsGarrett D'Amore2020-07-27
|
* fix #1252jeikabu2020-06-16
| | | | - nng_msg_clear should only clear the message body and not the head. Add test to verify
* nng: support NNG_OPT_IPC_PEER_PID on modern macOS systemsRichard Markiewicz2020-06-15
|
* fixes #1230 NNG_OPT_RECONNMAXT zero does not prevent exponential back-offGarrett D'Amore2020-05-24
|
* Tests for sending large amounts of data over NNG TLS streams.Garrett D'Amore2020-05-23
| | | | | This also starts the test framework NNG streams, so that we can test those more directly.
* Fix message realloc test off by one str comparisonDisconnect3d2020-04-13
|
* fixes #1201 Unexpected error return code: NNG_ENOMEMGarrett D'Amore2020-02-25
|
* fixes #1005 TLS 1.3 supportGarrett D'Amore2020-02-23
| | | | | | | | This introduces support for an external wolfSSL plugin, and generally creates the framework for pluggable TLS implementations. The wolfSSL engine is provided via an external module (git submodule), available either under a GPLv3 license or a commercial license.
* Survey test rewrite.Garrett D'Amore2020-02-05
| | | | | This bumps the coverage for survey up. While here fixed a few nits in req test, and removed the now pointless legacy survey and respond tests.
* Add possibility to explicitly set a tree handler as exclusive (#1158)Robert Bielik2020-01-27
| | | | - Default tree handler behavior is now non-exclusive - Add 'longest uri first' ordering for http handlers
* fixes #1163 compat tests are very brittleGarrett D'Amore2020-01-20
| | | | | | | This only addresses the newly rewitten compat_tcp test, but it sets the groundwork for the other tests, so that when they are updated to the new acutest.h they can use the new marry code to establish connections cleanly and safely.
* fixes #1145 nng_msg options should be removedGarrett D'Amore2020-01-19
|
* fixes #1142 raw mode use of message headers is inconsistentGarrett D'Amore2020-01-18
| | | | | | | | This correctly moves the entire protocol header for XREQ and XRESPONDENT protocols to the message header (not the body). This is where it should always have been. There is some small chance that applications which were coded to parse the header from the body will break. We don't think there are any such applications in use.
* Fix HTTP server root URI handling (#1140)Robert Bielik2020-01-18
| | | - Fixes #751
* Remove the old PUB/SUB tests.Garrett D'Amore2020-01-13
| | | | | | The new tests are more exhaustive, and cover everything. We also added a case for testing that posting messages that we didn't subscribe too doesn't raise the pollable flag.
* Add PUB/SUB test suite.Garrett D'Amore2020-01-12
| | | | | | | This gets near 100% coverage of the PUB/SUB protocols. The remaining uncovered bits will need to have a mock protocol that runs slower, so that we can inject both back pressure, and also so that we can inject "erroroneous" messages.
* XREQ and others race on TTL.Garrett D'Amore2020-01-11
| | | | | | | | | | The TTL in these cases should have been atomic. To facilitate things we actually introduce an atomic int for convenience. We also introduce a convenience nni_msg_must_append_u32() and nni_msg_header_must_append_u32(), so that we can eliminate some failure tests that cannot ever happen. Combined with a new test for xreq, we have 100% coverage for xreq and more coverage for the other REQ/REP protocols.
* fixes #1121 reconnect test failures (Darwin?)Garrett D'Amore2020-01-08
|
* fixes #1109 clocks can be off by a lot with sanitizerGarrett D'Amore2020-01-04
|
* Disable httpclient tests -- proxy caches are making this fail.Garrett D'Amore2020-01-02
|
* fixes #1088 REP protocol does not signal SENDFD properlyGarrett D'Amore2020-01-01
| | | | | We've also added some TEST_NNG_SEND_STR and TEST_NNG_RECV_STR to help with convenience when writing test code.
* fixes #1083 Random number improvementsGarrett D'Amore2020-01-01
|
* fixes #1081 Use after free possible in statsGarrett D'Amore2020-01-01
| | | | | | | fixes #1080 Desire better way to access statistics for NNG objects We've also added a test that uses some of this, in order to verify that the req protocol rejects invalid peers.
* Insert a cache control header to attempt to prevent caching.Garrett D'Amore2019-12-30
|
* fixes #1059 compat_tcp test sometimes times outGarrett D'Amore2019-12-29
|
* fixes #1065 resolver leaks work structuresGarrett D'Amore2019-12-29
| | | | | | This includes changes to support setting the sanitizer *correctly* (the old code CMake stuff didn't quite get it right), and addresses a number of failures in the test code found by the address sanitizer.
* fixes #986 ws_read_finish_str free invalid pointerGarrett D'Amore2019-12-28
| | | | | | Also, this has refactored the websocket stream test to the new acutest.h, and includes a much deeper test of fragmentation and reassembly of websocket streams.
* fixes #1057 reqpoll test fails (bad test logic) sometimesGarrett D'Amore2019-12-27
| | | | The reqpoll test is now moved into the common req/rep logic.
* Time calculations in acutest.h off by factor of 10.Garrett D'Amore2019-12-27
| | | | | Also, the MONOTONIC_RAW clock on linux is a poor choice for accurate timing. Use the normal MONOTONIC clock.