Commit Graph

878 Commits

Author SHA1 Message Date
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
69935fa566 Merge pull request #78 from davidvossel/master
fixes travis compile time issue
2013-07-12 14:59:50 -07:00
David Vossel
71979d7796 Fix: ipcs: Fixes compile time issue reported by travis 2013-07-12 21:58:51 -05:00
David Vossel
f8d954ffbc Merge pull request #77 from davidvossel/stress_tests_fixes
Adds new ipc event stress test and fixes issues the new test exposed
2013-07-12 14:23:18 -07:00
David Vossel
0dc7003d08 Low: loop_pool_kqueue: remove potentially noisy dbug statement 2013-07-12 21:21:17 -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
6a1186863f Low: ipc_socket: In fbsd send() returns ENOBUFS when dgram queue is full, this should be treated similar to EAGAIN 2013-07-12 19:04:47 -05:00
David Vossel
0e44129344 High: kqueue: Properly enable kqueue filter in poll loop 2013-07-12 19:04:42 -05:00
David Vossel
be975f9de0 Low: ipcs: Attempt to resend outstanding event notifications during event send 2013-07-12 18:45:21 -05:00
David Vossel
0bc7bc4e04 Merge pull request #75 from davidvossel/ref_count_cleanup
Low: qbipcs: update ipcs connection iterator documentation
2013-07-02 17:09:07 -07:00
David Vossel
75b22a20c8 Low: qbipcs.h: update ipcs connection iterator documentation 2013-07-02 18:55:08 -05:00
David Vossel
6d1a9838b4 Merge pull request #74 from davidvossel/ref_count_cleanup
Properly disconnect clients when ipc dispatch fails.
2013-07-02 09:24:09 -07:00
David Vossel
ff180f7a55 Fix: ipcs: Disconnect shm ipc connection when poll socket returns error on msg receive 2013-07-01 19:20:51 -05:00
David Vossel
95e48fdb76 Fix: ipcs: Properly disconnect client connection on POLLNVAL or any other error causing connection removal from mainloop.
qb_ipcs_dispatch_connection_request is a callback function registered with
mainloop, or whatever other looping thread implementation is in use.  When
this callback is registered, a reference of the connection object is given
to the mainloop thread.  If this callback ever returns something none zero
the callback (and corresponding fd) is unregistered from the loop automatically,
so we must decrement the reference in this instance.

Since unregistering this callback from mainloop guarantees a disconnect
simply because requests on the fd are no longer processed, it is best
that we completely disconnect the connection (which will handle the unref)
when this callback returns an error... Otherwise since the fd is unregistered
from the mainloop thread, it may not be possible to detect a disconnect
in the future.
2013-07-01 18:46:31 -05:00
David Vossel
abdf8cd94a Simplify internal ipcs ref counting, add comments and document api behavior 2013-06-28 20:27:02 -05:00
David Vossel
8466fba749 Simplifies connection ref counting without changing behavior 2013-06-28 20:26:24 -05:00
David Vossel
c0cb0a3ecb Low remove ref-count error in example ipcserver. 2013-06-28 16:24:55 -05:00
David Vossel
7c6e109046 Merge pull request #73 from davidvossel/ref_count_cleanup
cleanup connection and service ref counting without changing behavior
2013-06-28 13:30:10 -07:00
David Vossel
df1c4e876e Merge pull request #72 from davidvossel/master
Fixes ref count leak in example ipcserver.c
2013-06-28 09:27:49 -07:00
David Vossel
f41d257d65 Low: tests: Verify reading valid blackbox file works 2013-06-27 19:47:04 -05:00
David Vossel
a8d4e9fdb5 Fix: refcount leak 2013-06-27 19:33:18 -05:00
David Vossel
a2bdeed3cc Fix: ringbuffer: Add file header version field and detect reading corrupted blackbox files using hash value
In the future, if something changes in the file header we can
increment the version and split up the parsing into separate functions
for backwards compatibility.
2013-06-27 19:32:05 -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
bb4c334a8b Hopefully this is the last travis link fix
pesky camel_humps

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-06-20 11:09:26 +10:00
Angus Salkeld
55b7ea951e Fix travis icon (travis is case sensitive)
touchy chap.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-06-20 11:06:04 +10:00
Angus Salkeld
2953bea4f8 Fix the github links
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-06-20 10:54:17 +10:00
Angus Salkeld
0532fa56ce Merge pull request #70 from yuusuke/fix_logging
fix a problem when the character string beyond the number of the maximum...
2013-06-05 04:59:35 -07:00
yuusuke
9b7b16a865 fix a problem when the character string beyond the number of the maximum characters is passed 2013-06-05 19:35:03 +09:00
Angus Salkeld
07c9b96872 Merge pull request #68 from r1mikey/upstream
Add an IPC server service context
2013-05-26 17:31:34 -07:00
Michael van der Westhuizen
652766c002 Add a IPC service context pointer and accessors from both the connection and service level. 2013-05-25 22:57:53 +01:00
Angus Salkeld
bb37130aa6 Enable distcheck on the travis tests
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-05-14 09:38:25 +10:00
Angus Salkeld
359725f4fd Add atomic_int.h to noinst_HEADERS
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-05-13 11:59:42 +10:00
Angus Salkeld
67dc29f48d Use the new atomic ops in the ringbuffer
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-05-13 10:15:55 +10:00
Angus Salkeld
6f382aaade Add internal support for the new __atomic gcc builtins
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-05-13 10:15:55 +10:00
Angus Salkeld
d782f4216b Rename the configure macros from atomic to sync
This is so I can add support for the new atomic's which
are named __atomic.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-05-13 09:45:50 +10:00
Jeremy Fitzhardinge
9b3be0b450 ringbuffer: use atomic ops on ringbuffer chunk magic
The ringbuffer protocol uses the chunk magic number to indicate to the
other side what state a chunk is in.  It's therefore important to use
strongly ordered memory writes to make sure that neither the compiler
nor the CPU change the apparent order of the writes, since that would
result in corrupted messages.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-04-24 11:57:49 +10:00
Angus Salkeld
6d7da39866 Remove some test code mistakenly committed to the example program.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-04-24 10:31:52 +10: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
Andrew Beekhof
f16dca6df9 Indicate when/why qb_rb_force_close() fails to remove share memory files 2013-04-11 13:00:12 +10:00
Andrei Belov
e7d4508483 Typo fixed in configure
Hello.
2013-04-10 19:01:33 +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
407cac7a11 Remove doxygen from travis deps to try and get the job working.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-04-10 15:54:22 +10:00
Angus Salkeld
b3ca71803a Fix make distcheck
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-04-10 15:47:51 +10:00
Angus Salkeld
74bdd91798 Merge pull request #60 from t-matsuo/fix-makefile-of-tests
add file_change_bytes into check_PROGRAMS and fix a typo
2013-04-07 15:33:25 -07: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
258e86583e Merge pull request #58 from inouekazu/fix_connection_state_checking
IPC: fix the connection state checking

Make sure the case when qb_ipc_us_ready() returns 0 is handled.
2013-03-25 04:16:05 -07:00