Angus Salkeld
e01b79883a
map: enforce uniqueness of the notifiers based on (func,key,event,userdata)
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-11-25 13:25:56 +11:00
Angus Salkeld
f644b5c1c6
Add tests for hash and skiplist notifications
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-11-25 11:14:31 +11:00
Angus Salkeld
b69ca79c7f
By default don't build in the slow benchlog
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-11-25 11:12:27 +11:00
Angus Salkeld
c30b3ae8d8
TEST: add a test that reproduces issue/20
...
https://github.com/asalkeld/libqb/issues/20
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-11-10 09:27:45 +11:00
Angus Salkeld
e1e83aa746
Move simple-log.c to examples/
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-10-23 22:40:26 +11:00
Angus Salkeld
d48ed76dfd
TEST: fix the map load test.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-10-23 13:36:07 +11:00
Angus Salkeld
7f09ba15d5
TEST: add a simple test for right-aligned text in format strings
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-10-18 10:13:00 +11:00
Angus Salkeld
dc3a061e98
MAP: pass user_data to the callback correctly
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-16 13:31:31 +10:00
Angus Salkeld
d6e352fda5
MAP: add a more generic notification system
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-15 21:14:49 +10:00
Angus Salkeld
4780308fea
MAP: add prefix iteration for the trie
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-13 20:54:39 +10:00
Angus Salkeld
8ae2cf4430
TESTS: improve the map tests
...
- add a iterator to test_map_simple()
- improve the test output
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-13 17:08:19 +10:00
Angus Salkeld
57212c0e94
MAP: add a trie implementation
...
http://en.wikipedia.org/wiki/Trie
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-12 23:01:15 +10:00
Angus Salkeld
5944229b60
LOG: allow large priorities
...
They will be printed as trace, it's mainly to make
filtering more flexible
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-09 16:20:54 +10:00
Angus Salkeld
0a1c464514
LOG: add qb_log_filter_ctl2() so we can filter a range of priorities
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-09 14:09:02 +10:00
Angus Salkeld
f5fcf2a30b
LOG: add a way of getting the target state
...
This is so we can do the following:
for (t = 0; t < QB_LOG_TARGET_MAX; t++) {
if (qb_log_ctl(t, QB_LOG_CONF_STATE_GET, 0) == QB_LOG_STATE_ENABLED) {
// bla bla
}
}
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-08 16:40:02 +10:00
Angus Salkeld
be8248bd50
LOG: support comma seperated lists of file and function filters
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-08 13:24:18 +10:00
Angus Salkeld
86f004d1ec
map: add iterator that does't use a callback
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-07 12:05:15 +10:00
Angus Salkeld
4b594b522d
MAP: change the keys from void* to char*
...
I think this is the most common usage and greatly
simplifies the api.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-07 09:47:49 +10:00
Angus Salkeld
8c98054bfa
Fix "./check dist"
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-08-26 09:37:25 +10:00
Angus Salkeld
94767b18b8
Initial map using either a skiplist or a hashtable
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-08-22 14:11:43 +10:00
Angus Salkeld
8f954cd115
Add a stop watch
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-08-22 13:28:15 +10:00
Angus Salkeld
1591075873
LOG: serialize the va_list, don't snprintf
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-08-22 10:29:48 +10:00
Angus Salkeld
96f5fad67b
TEST: add int arguments to log bench
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-08-19 12:04:50 +10:00
The Quarterback Library Release Team
e910830b26
Make sure write_logs.c is deleted by "make distclean"
...
Signed-off-by: The Quarterback Library Release Team <quarterback-devel@fedorahosted.org>
2011-07-18 10:06:52 +10:00
Angus Salkeld
f4e2705e95
LOG: use strerror_r instead of strerror in qb_perror()
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-27 15:57:51 +10:00
Angus Salkeld
dc278798a3
TEST: bump up the logging timeout
...
This was failing on sparcv9, but seems to just be a slow machine.
With a bigger timeout it passes.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-27 09:34:07 +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
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
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
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
da5ea1345e
Remove all the C++ comments
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-26 10:39:36 +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
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
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
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
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
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
10942162a0
make sure check_resources is the last test to run
...
http://www.gnu.org/s/hello/manual/automake/Simple-Tests-using-parallel_002dtests.html
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-17 21:32:29 +10:00
Angus Salkeld
bfd627f576
Fix some compiler warnings
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-06 10:54:43 +10:00
Angus Salkeld
2a83aa8dfe
LOG: add an enter and leave trace function
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-05-06 10:54:20 +10:00
Angus Salkeld
a050b13414
TESTS: add a threaded logging test
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-18 22:55:26 +10:00
Angus Salkeld
d8b1c2564c
Compile on FreeBSD
...
Also re-run autoscan.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-15 14:01:36 +10:00
Angus Salkeld
a807d3b745
Add write_logs.c to .gitignore
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-14 22:24:38 +10:00