Commit Graph

25 Commits

Author SHA1 Message Date
Michael Grunder 04a27f4800
We can run SSL tests everywhere except mingw/Windows (#859) 2020-07-31 09:16:32 -07:00
Michael Grunder d8ff72387d
Move SSL management to a distinct private pointer. (#855)
We need to allow our users to use redisContext->privdata as context
for any RESP3 PUSH messages, which means we can't use it for managing
SSL connections.

Bulletpoints:

* Create a secondary redisContext member for internal use only called
  privctx and rename the redisContextFuncs->free_privdata accordingly.

* Adds a `free_privdata` function pointer so the user can tie allocated
  memory to the lifetime of a redisContext (like they can already do
  with redisAsyncContext)

* Enables SSL tests in .travis.yml
2020-07-29 11:53:03 -07:00
Michael Grunder 2e7d7cbabd
Resp3 oob push support (#841)
Proper support for RESP3 PUSH messages.

By default, PUSH messages are now intercepted and the reply memory freed.  
This means existing code should work unchanged when connecting to Redis
>= 6.0.0 even if `CLIENT TRACKING` were then enabled.

Additionally, we define two callbacks users can configure if they wish to handle
these messages in a custom way:

void redisPushFn(void *privdata, void *reply);
void redisAsyncPushFn(redisAsyncContext *ac, void *reply);

See #825
2020-07-19 18:54:42 -07:00
Michael Grunder 1864e76ea7
Some Windows quality of life improvments. (#846)
* Don't try to ignore SIGPIPE in Windows (it doesn't exist).
* Add an include to our win32.h compatibility header.
* Enable building examples on Travis in Windows.

See #831
2020-07-10 12:53:52 -07:00
Michael Grunder 08593db1f2
Non Linux CI fixes (#844)
* Switch to memurai for Windows tests

* Switch to macports from brew.
2020-07-08 17:06:30 -07:00
Michael Grunder b484021859
Fix USE_SSL=1 make/cmake on OSX and CMake tests (#789)
* Fix linker problems when building with SSL enabled on OSX
* Corrects `HIREDIS_SSL=ON` to `USE_SSL=ON` so we test building with
  SSL enabled on travis.
2020-04-13 09:32:32 -07:00
Michael Grunder cc9d032971
Win32 tests and timeout fix (#776)
Unit tests in Windows and a Windows timeout fix

This commit gets our unit tests compiling and running on Windows as well as removes a duplicated `timeval` -> `DWORD` conversion logic in sockcompat.c 

There are minor differences in behavior between Linux and Windows to note:

1.  In Windows, opening a non-existent hangs forever in WSAPoll whereas
    it correctly returns with a "Connection refused" error on Linux.
    For that reason, I simply skip this test in Windows.

    It may be related to this known issue:
    https://daniel.haxx.se/blog/2012/10/10/wsapoll-is-broken/

2.  Timeouts are handled slightly differently in Windows and Linux.  
    In Linux, we intentionally set REDIS_ERR_IO for connection
    timeouts whereas in Windows we set REDIS_ERR_TIMEOUT.  It may be
    prudent to fix this discrepancy although there are almost certainly
    users relying on the current behavior.
2020-04-02 22:41:34 -07:00
michael-grunder a1405e172a Add release pattern for automatic CI 2020-03-14 15:09:37 -07:00
Michael Grunder 38675d23cc
Housekeeping fixes (#764)
Housekeeping

* Check for C++ (#758, #750) 
* Include `alloc.h` in `make install` and `cmake`
* Add a `.def` file for Windows (#760)
* Include allocation wrappers referenced in adapter headers
* Fix minor syntax errors and typos in README
* Fix CI in Windows by properly escaping arguments (#761)
2020-02-27 21:29:05 -08:00
Mark Nunberg ff4fa45422
Merge pull request #697 from yossigo/resp3
Port RESP3 support from Redis.
2019-08-27 06:59:32 -04:00
Marcus Geelnard bbbafc5324 Travis: Add a Windows MSVC 2017 compilation test 2019-08-09 11:49:02 +02:00
Marcus Geelnard 687997c410 Travis: Add a MinGW cross compilation test 2019-08-09 11:49:02 +02:00
Yossi Gottlieb 91de9c975a RESP3 support changes from Redis.
This corresponds to commits d5c54f0b..bea09a7f in the redis repository.
2019-08-04 12:13:04 +03:00
Mark Nunberg ffceb87ec3 SSL: build in travis 2019-02-21 12:09:17 -05:00
Justin Brewer 93261d465f Update .travis-ci.yml to use cmake
Signed-off-by: Justin Brewer <jzb0012@auburn.edu>
2019-02-20 05:01:09 -05:00
Jan-Erik Rediger f861d9dc50 chore: Build only branches bors needs 2017-11-07 09:26:02 +01:00
Jan-Erik Rediger 9deb78140f chore(CI): Exclude valgrind jobs on OSX 2016-06-20 11:08:34 +02:00
Ted Nyman 16a459d008 Add a before_script for the OS X environment 2016-06-19 22:05:34 -07:00
Ted Nyman fa3774081e Test on Travis for both linux and osx 2016-06-19 21:49:44 -07:00
Jan-Erik Rediger a9a0af1d35 Use container-based Travis by installing packages through the addon 2015-07-28 00:21:24 +02:00
Jan-Erik Rediger 26999505d6 Make sure to compile example to trigger edge-cases in compiling 2015-05-03 22:33:39 +02:00
Jan-Erik Rediger 0f6ad5c460 Update apt repos first 2015-03-18 10:39:45 +01:00
Matt Stancliff d3fb491b85 Add more travis tests
Adds travis testing for 32bit builds as well as compile warnings
on 64 bit and 32 bit builds.
2015-01-26 10:08:40 -05:00
Matt Stancliff dd680fcc14 Add valgrind to TravisCI testing 2015-01-22 16:00:38 -05:00
Pieter Noordhuis eee78a7140 Add Travis configuration 2013-01-26 11:28:19 -08:00