Angus Salkeld
42e79dfd2f
IPC: use the correct pointer type.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-20 16:36:34 +10:00
Angus Salkeld
77b6e15a85
Consistently prepend "qb-" to files in /dev/shm
...
Dietmar: can you confirm this works for you?
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-20 16:36:26 +10:00
The Quarterback Library Release Team
a69482ade6
Update the library version to 0.5.0
...
Signed-off-by: The Quarterback Library Release Team <quarterback-devel@fedorahosted.org>
2011-06-07 21:11:58 +10:00
Angus Salkeld
79b75b3428
check: Change -s to --no-print-directory
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-07 19:53:55 +10:00
Angus Salkeld
4a3536e72c
Re-fix mmap() woes on sparc.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-07 19:53:26 +10:00
Angus Salkeld
34e9820230
Revert "Fix ringbuffer creation on sparc"
...
This reverts commit 683296f180 .
2011-06-03 22:43:09 +10:00
Angus Salkeld
683296f180
Fix ringbuffer creation on sparc
...
On the first call to qb_rb_open() we try using a number of
page sizes. This because the system might have CONFIG_HUGETLB_PAGE_SIZE
defined in their kernel. So even though sysconf() returns 2K or 4K
some arch's mmap() require alignment on these boundaries.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-02 11:42:14 +10:00
Angus Salkeld
776ce2d3fd
TEST: some improvements to the check script to make it's output better.
...
It quietens the output and this makes it easier to understand the
results.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-02 11:40:57 +10:00
Angus Salkeld
86e5071287
TEST: Fix ssize_t format compiler warning
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-02 11:40:54 +10:00
Angus Salkeld
5b5a6c65d4
Make building a bit quieter by default.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-02 11:40:50 +10:00
Angus Salkeld
d8344f1bc2
Fix "make dist".
...
The deps were not quite right with write_logs.c
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-02 11:40:44 +10:00
Angus Salkeld
9666c392cb
Fix some spelling.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-02 11:40:39 +10:00
Angus Salkeld
93f84c9c65
TEST: remove failed server tests.
...
They now fail (because of 8880465924 ).
We now need a smart way of detecting that a process is the
last one attached to the ringbuffer and free it.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-31 19:21:52 +10:00
Angus Salkeld
d4275c824a
TEST: initialize some globals before the test is run.
...
This is not strictly needed as each test is forked,
but is a bit more explicit.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-31 19:12:39 +10:00
Angus Salkeld
af10eb4753
TEST: fix the server shutdown.
...
The server was getting prematurently killed, and was
causing resource leakage. We now give the server a little
time to respond to the connection beiong closed.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-31 19:10:51 +10:00
Angus Salkeld
c61beafa1e
TEST: add job_add poll_handler
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-31 19:07:31 +10:00
Angus Salkeld
4f1d3d88d8
TEST: name the ipc connections after the test functions
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-31 19:06:44 +10:00
Angus Salkeld
da150fcb22
IPC: misc cleanup & logging improvements
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-31 19:03:50 +10:00
Angus Salkeld
016b713489
IPC: make the setting the flowcontrol atomic
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-31 19:01:46 +10:00
Виноградов Василий
8880465924
RB: More consistent behavior when closing a ringbuffer
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-30 21:16:35 +10:00
Виноградов Василий
c3688ab19c
Provide some helpful macros for iterating over lists.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-27 20:43:51 +10:00
Angus Salkeld
a16322dd34
TEST: make the creation of write_logs.c atomic
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-27 10:15:02 +10:00
Angus Salkeld
0c0babd6d1
TEST: make sure make-log-test appends a bracket
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-26 21:34:19 +10:00
Angus Salkeld
7ffd10326a
Correct the declarations of some inlines
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-26 10:42:15 +10:00
Angus Salkeld
ebe8cd7008
Add support for ansi inline and typeof
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-26 10:41:06 +10:00
Angus Salkeld
da5ea1345e
Remove all the C++ comments
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-26 10:39:36 +10:00
Angus Salkeld
78a852ac76
Add an ansi option into ./check
...
Also included in ./check all
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-26 10:38:07 +10:00
Jim Meyering
d8a7fffd4d
qb_rb_write_to_file clean-up
...
* lib/ringbuffer.c (qb_rb_write_to_file): Remove dead initialization
and redundant "result < 0" tests.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-24 09:45:17 +10:00
Jim Meyering
ab222595be
adjust .gitignore so "git status" ignores all build artifacts
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-24 09:44:56 +10:00
Jim Meyering
a8df4a00dd
use latest git-version-gen from gnulib
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-24 09:31:46 +10:00
Angus Salkeld
048edde19c
LOG: add custom targets
...
This is partly to make the tests more robusts and
to add some more flexibility to the logging.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-23 20:28:18 +10:00
Angus Salkeld
ec15ca46f6
COV 15: fix potential reference after deref
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-20 21:37:13 +10:00
Angus Salkeld
2a1e9618d7
COV 14: fix potential dereference after free()
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-20 21:37:13 +10:00
Angus Salkeld
9f11955e94
COV 13: cleanup error handling in qb_util_circular_mmap()
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-20 21:37:13 +10:00
Angus Salkeld
8b5bb1d31d
COV 12: prevent unintialized value error in bmcpt
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-20 21:37:13 +10:00
Angus Salkeld
6acc19bdc3
COV 10: fix mem leaks in qb_rb_create_from_file()
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-20 21:31:29 +10:00
Angus Salkeld
8b5d664876
COV 9: fix mem leak in qb_rb_open error condition
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-20 21:31:29 +10:00
Angus Salkeld
24107d56ef
COV 8: don't leak mem when returning an error.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-20 21:31:29 +10:00
Angus Salkeld
9724860b9a
COV 7: close file if for some strange reason it exists
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-20 21:31:29 +10:00
Angus Salkeld
f5d85f7e61
COV 6: check for a failed sysconf() before calling malloc()
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-20 21:31:29 +10:00
Angus Salkeld
a5a1085bca
COV 4 & 11: cleanup error handling in handle_new_connection()
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-20 21:30:49 +10:00
Angus Salkeld
e178c03db8
COV 3: remove dead code.
...
qb_rb_close() is called in the signal handler.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-20 16:49:59 +10:00
Angus Salkeld
ac929fc7cd
COV 2: fix unreachable code (move call to qb_ipcs_us_withdraw up)
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-20 13:45:21 +10:00
Angus Salkeld
4062a2bba6
COV 1: dead code - clean up ifdefs
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-20 13:41:52 +10:00
Angus Salkeld
0cdf5b4ad8
LOG: add a rwlock to protect the lists.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-19 13:58:11 +10:00
Angus Salkeld
e2c7050de4
Update the TODO
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-18 12:06:30 +10:00
Angus Salkeld
7a2b77f575
IPC: set the return status before cleaning up.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-18 11:49:51 +10:00
Angus Salkeld
e990681826
Fix the test dependancies (and "make rpm")
...
My first attempt at this broke "make rpm" - oops.
It seems that we need a common extension for tests to get the
dependancies to work.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-18 11:11:14 +10:00
Angus Salkeld
943b1c646b
fix the FIXME's Jim pointed out
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-18 11:11:14 +10:00
Jim Meyering
8ac48bac1b
avoid autoconf warning
...
Autoconf warned about this:
configure.ac:72: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE\
call detected in body
That's warning about the use via AC_COMPILE_IFELSE without
specifying a language. The easiest way to work around that is
to avoid the use of CC altogether and instead to use the preprocessor.
* configure.ac (cc_supports_flag): Use AC_PREPROC_IFELSE in place
of AC_COMPILE_IFELSE (and CPPFLAGS in place of CFLAGS).
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-17 21:32:29 +10:00