David Vossel
1dbbeb8c50
Low: check_ipc.c: fix debug message to only display once.
2013-07-18 22:02:04 -05:00
David Vossel
dfd3cee5cf
Low: tests: Added test to verify sending ipc msg equal to max size succeeds
2013-07-18 18:50:34 -05:00
David Vossel
038d3635de
Low: tests: rework bulk event msg ipc test
...
Some environments have very small dgram msg queues. In
these environments we have to be able to read off the event
queue before being able to send the rest of events for the
bulk event test.
2013-07-12 19:31:47 -05:00
David Vossel
da9548f8c0
Account for fbsd ENOBUFS during stress test
2013-07-12 19:31:47 -05:00
David Vossel
6733dba9d8
Low: tests: Adds ipc event stress test to testsuite
2013-07-12 19:31:41 -05:00
David Vossel
f41d257d65
Low: tests: Verify reading valid blackbox file works
2013-06-27 19:47:04 -05:00
David Vossel
11b18cced4
Fix: tests: On some platforms -ECONNRESET is returned rather than -ENOTCONN after server failure
2013-06-26 16:10:38 -05:00
David Vossel
e604e76765
Fix: tests: Make blackbox_segfault.sh not depend on bash
2013-06-26 16:07:04 -05:00
Angus Salkeld
f54764e1ec
IPC: make each connection ref the owning service
...
This is because the connection functions use the c->service pointer
and this needs to be mirrored in the reference counting.
The service can only be free'd when all connections are destroyed
and the user as unreferenced all previously referenced connections
and the service.
Fixes #62
Thanks to Jan Friesse for the reproducer
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-04-22 12:03:26 +10:00
Angus Salkeld
04042a92d6
Fix "make srpm"
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-04-10 16:17:38 +10:00
Angus Salkeld
b3ca71803a
Fix make distcheck
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-04-10 15:47:51 +10:00
Takatoshi MATSUO
6f7f25c1f9
add file_change_bytes into check_PROGRAMS and fix a typo
2013-04-07 21:52:12 +09:00
Angus Salkeld
7667536626
Deal better with corrupt blackbox files.
...
fixes #59
Thanks to Jan Friesse for the reproducer.
https://github.com/jfriesse/csts/blob/master/tests/fplay-segfault.sh
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-04-02 13:52:57 +11:00
Angus Salkeld
ed5435f0dd
test: fix unused-but-set-variable warning
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-02-19 10:18:01 +11:00
Angus Salkeld
bd2355f8db
test: fix missing-format-attribute warning
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-02-19 10:18:01 +11:00
Angus Salkeld
31d9f0900d
Use dgram sockets for message oriented communications
...
This is to prevent partial sends and gettting stuck in
retry loops.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-02-18 20:51:33 +11:00
Angus Salkeld
dde6a46a83
IPC: make sure we return a consistent error when the message is too big.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-01-25 11:20:19 +11:00
Angus Salkeld
fe0e9a61a9
TEST: add a progam to compare the speed of vsnprintf and qb_vsnprintf_serialize
...
On my system I get:
qb store] Duration: 8.289 OPs/sec: 1206381.250
snprintf] Duration: 16.712 OPs/sec: 598368.000
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-01-04 16:35:45 +11:00
Angus Salkeld
7b847a3b19
LOG: add a test for a padded hex int.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-01-04 15:56:59 +11:00
Angus Salkeld
e07eccd6a6
Fix the blackbox formatter when specifing the string len/precision
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-12-19 10:51:54 +11:00
Angus Salkeld
813dfb5fd2
ptrie: deref the current node in trie_iter_free()
...
If free'ing the iterator before getting to the last
node make sure we de-ref the current node. Else we
will not be able to delete the node.
fixes #44
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-12-06 11:59:33 +11:00
Angus Salkeld
c533b24efa
example/test: check for error in qb_ipc_run()
...
Hopefully all of them this time.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-11-08 20:53:21 +11:00
Angus Salkeld
25828196a0
TEST: fix typo s/,/; in check_ipc.c
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-10-29 11:54:23 +11:00
Angus Salkeld
bcba4a2983
Fix a crash in ptrie if you iterate over the map in the deleted notifier.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-09-12 10:39:17 +10:00
The Quarterback Library Release Team
d54e8b1e8c
Fix "make distcheck"
...
Signed-off-by: The Quarterback Library Release Team <quarterback-devel@fedorahosted.org>
2012-09-10 11:09:28 +10:00
Andrew Beekhof
951c9826f8
TEST: Include writing and reading the blackbox in the log_long_msg test
2012-09-05 19:34:56 +10:00
Angus Salkeld
c7810b38b1
Remove IPC_NEEDS_RESPONSE_ACK and turn off shm ipc on solaris
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-08-31 14:53:38 +10:00
Angus Salkeld
a55554efb1
LOG: change qb_vsprintf_serialize() into qb_vsnprintf_serialize()
...
This is to prevent overwriting the ringbuffer.
Also remove stpcpy() as it is not used anymore.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-08-29 21:40:40 +10:00
Angus Salkeld
8820724f59
TEST: increase timeout to 6 secs as the recv timeout is 5 secs
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-08-29 13:56:03 +10:00
Angus Salkeld
ace73af366
TEST: get the logic right - grrr.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-08-29 12:33:07 +10:00
Angus Salkeld
10045dd561
Some missing pshared semaphore checks
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-08-29 12:26:47 +10:00
Angus Salkeld
43b49dfda9
Remove uses of timersub and use qb_util_stopwatch
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-08-28 22:05:09 +10:00
Fabio M. Di Nitto
5e16bcd004
build: fix libqb.pc creation and make maintainer-clean
...
LIB_RT is unnecessary around. AC_CHECK_LIBS will do the right thing
similar for the other libs that are all exported via LIBS
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
2012-08-27 15:07:36 +02:00
Jim Meyering
2ada241eee
tests/rbwriter: don't ignore write failure
...
Here's another fix.
In adjusting the printf, I added a cast and switched to %5ld.
I would have preferred to use %5jd as the printf format (i.e., then no
cast is needed), but saw no other uses of the "j" directive, so perhaps
you do not yet depend on printf with such support.
From 6d5d3af35d1f6851537f7af8996d1106c1ebe435 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Wed, 18 Jul 2012 17:54:38 +0200
Subject: [PATCH] tests/rbwriter: don't ignore write failure
Spotted by coverity:
This less-than-zero comparison of an unsigned value is never true.
"res < 0U".
http://libqb.org/html/0.14.1/coverity/1/7rbwriter.c.html#error
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-07-19 08:19:22 +10:00
Angus Salkeld
b9f8ec34df
LOG: fix threaded logging.
...
This has been broken for a year - yikes!
Thanks to Voznesensky Vladimir for spotting it.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-14 11:01:52 +10:00
Angus Salkeld
b7ee2e9e6d
TESTS: fix warning about unused functions
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-06 15:50:19 +10:00
Angus Salkeld
9956fe29ff
LOG: fix the printing of %p in the blackbox
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-04 14:54:39 +10:00
Angus Salkeld
35a4421d23
cleanup some warnings
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-31 22:18:04 +10:00
Angus Salkeld
70a9623a48
Remove message queues
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-28 13:41:04 +10:00
Angus Salkeld
7bf88478ac
TEST: make rbreader/writer more like the other benchmarking apps
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-21 08:30:22 +10:00
Angus Salkeld
0256284338
TEST: re-organise the ipc test suites
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-16 13:32:13 +10:00
Angus Salkeld
908bdfd172
IPC: add a new function to get (and alloc) the extended stats.
...
This should handle any further additions to the stats
as the library allocs the struct.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-10 20:20:29 +10:00
Angus Salkeld
e4cc803a52
TEST: Use /bin/sh not /bin/bash
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-10 11:41:11 +10:00
Angus Salkeld
32f206d5d7
TEST: check for lost shared mem on bsd too
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-10 11:36:36 +10:00
Angus Salkeld
c566421df9
rb: cleanup the semaphores
...
- the way they are selected
- rpl_sem.c the error handling
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-10 10:39:43 +10:00
Angus Salkeld
7c2e632be0
IPC: fix retrying of partial recv's and sends.
...
Move to send() instead of sendmsg() as it's easier
to track resending partial messages.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-03 21:24:02 +10:00
Angus Salkeld
9f09aba8dd
IPC: handle a connection disconnect from the server better
...
Only problem with SOCKET.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-02 10:15:19 +10:00
Angus Salkeld
78fb4ad682
IPC: make it possible to send events in the connected callback.
...
This was only a problem with QB_IPC_SOCKET.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-01 20:09:21 +10:00
Angus Salkeld
6b7da3f531
Add the event queue length to the connection stats.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-01 13:22:16 +10:00
Angus Salkeld
b29326a363
IPC: add a is_connected client side function.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-01 12:43:22 +10:00