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
Angus Salkeld
17bdc93f88
LOG: fix the building of write_logs.c (for bench-log)
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-14 16:58:29 +10:00
Angus Salkeld
45fa3b045d
TESTS: use new logging API
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-14 16:05:46 +10:00
Angus Salkeld
c2f72d4068
LOG: add some basic tests & fixes
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-14 16:05:46 +10:00
Angus Salkeld
b7e83fd3b2
LOG: add dynamic callsites (for platforms that don't support __attribute__(section)
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-14 16:05:38 +10:00
Angus Salkeld
0d345d3ef1
ARRAY: return -ERANGE when index is out of range.
...
So you can differentiate the other errors (-EINVAL)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-13 11:23:00 +10:00
Angus Salkeld
6d6872f187
Fix the copyright in bench-log.c
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-09 23:41:30 +10:00
Angus Salkeld
1844a839a6
LOG: only set state in log.c
...
This requires an enable after qb_log_file_open()
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-09 23:11:43 +10:00
Angus Salkeld
b5d27ad250
LOG: remove the tags arument from qb_log() and add qb_logt() which has the tags argument.
...
I think in most cases tags will not be used and it will
just be a pain inserting ", 0". But if someone wants to use
tags like this then they still can via qb_logt()
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-06 22:27:41 +10:00
Angus Salkeld
7f0d983f49
LOG: add a qb_log_fini() to cleanup
...
This replaces qb_log_thread_stop() but also release shared mem
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-04-01 14:50:51 +11:00
Angus Salkeld
e390613036
LOG: fix mapping from priority to name
...
Remove qb_log_priority_name_get() as we have the
formatting.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-31 21:38:08 +11:00
Angus Salkeld
191b71a8b7
LOG: add a new "tags" field
...
this is a tags that is used by the caller to:
- define the message as an external message (needs free'ing)
- define a feature or susbsytem that can be printed in the log message.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-31 21:37:44 +11:00
Angus Salkeld
5ed2ca8592
LOG: add bench-log to .gitignore
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-31 21:24:40 +11:00
Steven Dake
0729a8e80b
Add a benchmark program for the qblog flight recorder
...
Signed-off-by: Steven Dake <sdake@redhat.com>
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-31 21:22:57 +11:00
Angus Salkeld
34ee74db55
LOG: add a format option to each target.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-30 23:06:41 +11:00
Angus Salkeld
32817adb15
LOG: re-work the API to be easier to use.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-30 11:46:36 +11:00
Angus Salkeld
3452d162d2
LOG: add a qb_perror() function
...
- Add an internal version too
- Update the library code to use it.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-28 11:12:47 +11:00
Angus Salkeld
2956f9ef29
LOG: add a timestamp to the log handler
...
This makes sure that the timestamp is correct at the time
the call to qb_log() was called.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-27 22:57:58 +11:00
Angus Salkeld
60e9ffe75e
TESTS: remove unused function
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-27 22:03:57 +11:00
Angus Salkeld
6eddcfc26e
LOG: split the tag function out into tag and untag
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-27 22:03:33 +11:00
Angus Salkeld
f86c96bee1
LOG: add a blackbox
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-25 23:40:53 +11:00
Angus Salkeld
5bddb0fe68
LOG: add threaded logging (non-blocking)
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-25 23:35:35 +11:00
Angus Salkeld
e910f8bc18
Add logging infrastructure.
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-03-25 23:34:12 +11:00
Angus Salkeld
7cd7dc106c
TESTS: make sure timers are not leaking file descriptors
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-12-22 09:12:57 +11:00
Angus Salkeld
7d46c9ad3f
IPC: use rb refcount to check for "connectiveness"
...
This makes it possible the detect the loss of the server
and return -ENOTCONN.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-12-16 22:09:52 +11:00
Angus Salkeld
a2b2ed7988
TEST: add ipc tests for recv's with a timeout
...
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-12-16 22:09:52 +11:00
Angus Salkeld
43181d5a95
IPC: add a timeout to the client recv functions
...
Also allow the ringbuffer to pass ETIMEDOUT back to the
client applications.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2010-12-16 21:47:47 +11:00