Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hiredis-test: 2 tests failed on OpenBSD #342

Closed
Pea13 opened this issue Jun 22, 2015 · 3 comments
Closed

hiredis-test: 2 tests failed on OpenBSD #342

Pea13 opened this issue Jun 22, 2015 · 3 comments

Comments

@Pea13
Copy link

Pea13 commented Jun 22, 2015

Hi,

I'm working to port hiredis on OpenBSD. During my tests, I noticed 2 failures with hiredis-test:
#50 Set error when an invalid timeout usec value is given to redisConnectWithTimeout: FAILED
#51 Set error when an invalid timeout sec value is given to redisConnectWithTimeout: FAILED

The tests are made on OpenBSD -current (5.8-beta atm) on amd64.
The full logs:
#1 Format command without interpolation: PASSED
#2 Format command with %s string interpolation: PASSED
#3 Format command with %s and an empty string: PASSED
#4 Format command with an empty string in between proper interpolations: PASSED
#5 Format command with %b string interpolation: PASSED
#6 Format command with %b and an empty string: PASSED
#7 Format command with literal %: PASSED
#8 Format command with printf-delegation (int): PASSED
#9 Format command with printf-delegation (char): PASSED
#10 Format command with printf-delegation (short): PASSED
#11 Format command with printf-delegation (long): PASSED
#12 Format command with printf-delegation (long long): PASSED
#13 Format command with printf-delegation (unsigned int): PASSED
#14 Format command with printf-delegation (unsigned char): PASSED
#15 Format command with printf-delegation (unsigned short): PASSED
#16 Format command with printf-delegation (unsigned long): PASSED
#17 Format command with printf-delegation (unsigned long long): PASSED
#18 Format command with printf-delegation (float): PASSED
#19 Format command with printf-delegation (double): PASSED
#20 Format command with invalid printf format: PASSED
#21 Format command by passing argc/argv without lengths: PASSED
#22 Format command by passing argc/argv with lengths: PASSED
#23 Error handling in reply parser: PASSED
#24 Memory cleanup in reply parser: PASSED
#25 Set error on nested multi bulks with depth > 7: PASSED
#26 Works with NULL functions for reply: PASSED
#27 Works when a single newline (\r\n) covers two calls to feed: PASSED
#28 Don't reset state after protocol error: PASSED
#29 Don't do empty allocation for empty multi bulk: PASSED
#30 Returns error when host cannot be resolved: PASSED
#31 Returns error when the port is not open: PASSED
#32 Returns error when the unix socket path doesn't accept connections: PASSED
#33 Don't fail when redisFree is passed a NULL value: PASSED
#34 Don't fail when freeReplyObject is passed a NULL value: PASSED

Testing against TCP connection (127.0.0.1:6379):
#35 Is able to deliver commands: PASSED
#36 Is a able to send commands verbatim: PASSED
#37 %s String interpolation works: PASSED
#38 %b String interpolation works: PASSED
#39 Binary reply length is correct: PASSED
#40 Can parse nil replies: PASSED
#41 Can parse integer replies: PASSED
#42 Can parse multi bulk replies: PASSED
#43 Can handle nested multi bulk replies: PASSED
#44 Successfully completes a command when the timeout is not exceeded: PASSED
#45 Does not return a reply when the command times out: PASSED
#46 Reconnect properly reconnects after a timeout: PASSED
#47 Reconnect properly uses owned parameters: PASSED
#48 Returns I/O error when the connection is lost: PASSED
#49 Returns I/O error on socket timeout: PASSED
#50 Set error when an invalid timeout usec value is given to redisConnectWithTimeout: FAILED
#51 Set error when an invalid timeout sec value is given to redisConnectWithTimeout: FAILED
#52 Append format command: PASSED
#53 Throughput:

(1000x PING: 0.144s)
(1000x LRANGE with 500 elements: 0.650s)
(10000x PING (pipelined): 0.030s)
(10000x LRANGE with 500 elements (pipelined): 3.148s)

Testing against Unix socket connection (/tmp/redis.sock):
#54 Is able to deliver commands: PASSED
#55 Is a able to send commands verbatim: PASSED
#56 %s String interpolation works: PASSED
#57 %b String interpolation works: PASSED
#58 Binary reply length is correct: PASSED
#59 Can parse nil replies: PASSED
#60 Can parse integer replies: PASSED
#61 Can parse multi bulk replies: PASSED
#62 Can handle nested multi bulk replies: PASSED
#63 Successfully completes a command when the timeout is not exceeded: PASSED
#64 Does not return a reply when the command times out: PASSED
#65 Reconnect properly reconnects after a timeout: PASSED
#66 Reconnect properly uses owned parameters: PASSED
#67 Returns I/O error when the connection is lost: PASSED
#68 Returns I/O error on socket timeout: PASSED
#69 Throughput:

(1000x PING: 0.039s)
(1000x LRANGE with 500 elements: 0.304s)
(10000x PING (pipelined): 0.032s)
(10000x LRANGE with 500 elements (pipelined): 3.299s)

Testing against inherited fd (/tmp/redis.sock):
Connecting to inherited fd 3
#70 Is able to deliver commands: PASSED
#71 Is a able to send commands verbatim: PASSED
#72 %s String interpolation works: PASSED
#73 %b String interpolation works: PASSED
#74 Binary reply length is correct: PASSED
#75 Can parse nil replies: PASSED
#76 Can parse integer replies: PASSED
#77 Can parse multi bulk replies: PASSED
#78 Can handle nested multi bulk replies: PASSED

*** 2 TESTS FAILED ***

Any ideas ?
Regards,

@badboy
Copy link
Contributor

badboy commented Jul 27, 2015

I don't know what you changed. I currently can't get a vanilla hiredis to compile on OpenBSD.
The failed tests touch the timeout stuff, which might not work as is on OpenBSD. So if you already disabled that, that might break the tests.

Your best option is to push your changes so far so I can take a look.

@yellowman
Copy link

It compiles on OpenBSD 5.8 (try the latest snapshot) just fine
I just did git clone http://gihub...
cd hiredis
gmake

OpenBSD cp has no '-a' option so I set it to cp -r and:

gmake install

I'll play with the tests a bit here...

@badboy
Copy link
Contributor

badboy commented Dec 29, 2015

@yellowman We already use cp -r on Solaris, see the Makefile. Care to add the same for *BSD builds?

@badboy badboy closed this as completed Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants