Commit Graph

226 Commits

Author SHA1 Message Date
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
Angus Salkeld
6263e2eea6 TEST: improve the tracing in the ipc tests.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-30 15:49:42 +10:00
Angus Salkeld
aca7bec0e8 TEST: add a test to confirm we get the events we send.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-30 10:04:54 +10:00
Angus Salkeld
7bd8901bdf TEST: reuse send_and_check for events.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-30 09:28:28 +10:00
Angus Salkeld
d80f218133 Handle a recv of size 0
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-04-04 21:57:49 +10:00
Angus Salkeld
1af214d91d Try and improve the portability on bsd variants.
Also add a QB_IPC_NATIVE type that selects the best ipc type available.

Signed-off-by: Angus <angus@anguss-mac-mini>
2012-03-24 22:43:37 +11:00
Angus Salkeld
157cec22a7 TEST: add a test to check the order of the jobs
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-09 19:33:35 +11:00
Angus Salkeld
df9ff8fdad TESTS: move the util tests into "slow-tests" (i.e. optional)
So this this test is timing sensitive and can easily fail on slow
build farm machines. So I have enabled it on the --enable-slow-tests
configure option and put this into ./check as the default.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-07 16:35:11 +11:00
Angus Salkeld
a4beed9bbf TEST: make the test_priority the same type as in the callsite
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-07 13:06:44 +11:00
Angus Salkeld
2ae58d2472 RB: fix test failure on ppc
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-07 11:37:12 +11:00
Angus Salkeld
bf35fb0e5a TEST: add some more signal tests.
-Make sure we only get one callback per signal
-Make sure we correctly delete a callback even if it has been
 put in the job queue.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-06 22:36:39 +11:00
Angus Salkeld
902e483b20 TEST: deal with mac's limited sed
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-05 19:23:57 +11:00
Angus Salkeld
623a32d81f TEST: properly clear the filters
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-03-05 17:07:28 +11:00
Angus Salkeld
e37f801170 LOOP: add qb_loop_timer_is_running()
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-02-22 11:08:42 +11:00
Angus Salkeld
70f1eb8130 LOOP: add a function to delete jobs
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-02-15 22:18:43 +11:00
Angus Salkeld
504e000cb8 LOG: add a hostname %H format specifier.
This is useful when logging to file on a cluster.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-02-15 17:34:45 +11:00
Angus Salkeld
ff0d89721f LOG: Add qb_log_filter_fn_set()
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-02-15 15:40:58 +11:00
Angus Salkeld
42de03038e clang: Remove unused code
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-02-14 17:27:26 +11:00
Angus Salkeld
8eb34862a5 TEST: make the ipc failure test closer to corosync's case.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-02-14 16:44:58 +11:00
Angus Salkeld
1e4b33c9cf LOOP: make it possible to pass in NULL as the default loop instance
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-02-10 14:47:49 +11:00
Angus Salkeld
293813552b Don't mix enums (QB_TRUE/TRUE)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-02-08 22:00:49 +11:00
Angus Salkeld
205336980c use random() not rand()
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-02-08 22:00:49 +11:00
Angus Salkeld
ae682d2a78 TEST: make the loop ratelimit test more forgiving.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-02-08 17:45:42 +11:00
Angus Salkeld
9340221261 TEST: check for a single job causing a cpu spin
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-02-07 09:41:00 +11:00