Commit Graph

265 Commits

Author SHA1 Message Date
David Vossel
9d198a9b64 Low: check_ipc: Verify ipc recv times out correctly 2014-03-12 14:07:19 -04:00
David Vossel
d8e2505016 Low: check_ipc.c: Correctly check the event queue length for bulk events 2014-02-25 23:31:07 -06:00
David Vossel
331cd031c6 Low: check_ipc.c: Correctly wait for server process to exit 2014-02-25 22:51:58 -06:00
David Vossel
e4cac9eb95 Low: check_ipc.c: Avoid using MAX_MSG_SIZE macro directly in calculations 2014-02-25 16:43:41 -06:00
David Vossel
441ee1b952 Low: tests: Fixes compile time issue with make check 2014-01-20 16:59:52 -06:00
Dejan Latinovic
9a3ef70d29 Fix rb.test to avoid overwriting memory during reading.
In test_ring_buffer1,
if the size of the chunk(90-93) is larger than size of the hdr (16),
it comes to overwriting memory during reading.
2013-12-24 14:25:10 +00:00
David Vossel
c3b41435b4 Merge pull request #99 from davidvossel/regex_logger
Regex logging filters
2013-11-18 10:20:03 -08:00
David Vossel
d17d6b3a06 Low: Client side buffer retrieval regression test 2013-11-18 16:53:39 -06:00
David Vossel
ab2cd60c01 Low: check_ipc.c: Verify server enforced buffer sizes work 2013-11-18 16:53:35 -06:00
David Vossel
23e5a7c8cb Low: regession tests for regex log filters 2013-11-15 22:30:05 -06:00
David Vossel
9abb68637d Fix: log: Filtering by function and file must match exactly, no substring matches 2013-10-17 21:44:12 -05:00
David Vossel
2b11b783c7 High: ipcs: Api function allowing server to retrieve client connection's ipc buffer size 2013-10-08 17:11:53 -05:00
David Vossel
e6c99f6280 Merge pull request #81 from davidvossel/dgram_max_msg
Added ability to estimate kernel's actual max dgram buffer size in a portable way.
2013-07-22 14:04:52 -07:00
David Vossel
92e7dd7965 Low: tests: Add dgram max size detection test 2013-07-22 20:44:31 -05:00
David Vossel
a9b54d02e4 Prevent use after free in benchmark util 2013-07-22 16:05:21 -05:00
David Vossel
4bd79ef258 Low: check_ipc.c: Verify dgram max size during tests 2013-07-19 19:34:20 -05:00
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