kdbus: selftests extended
authorPaul Osmialowski <p.osmialowsk@samsung.com>
Tue, 14 Apr 2015 13:55:09 +0000 (15:55 +0200)
committerPaul Osmialowski <p.osmialowsk@samsung.com>
Thu, 9 Jul 2015 14:40:44 +0000 (16:40 +0200)
commit7ddf556cb258dd9a46d926e86d16a1c0fad314a1
treef44c5e16b147faf829aad1942def8752db64da9a
parent7bcdb1f8ec7e66666d84b50c26740e78c95596be
kdbus: selftests extended

The 'test-send' test case should connect to an already running test-daemon
which creates a bus with known name.

The main goal of this test case is to verify that messages as well as
file descriptors (opened with different open modes) can be transferred
properly.

In order to achieve its goals, this test case opens three files
(/tmp/kdbus-test-send.rd, /tmp/kdbus-test-send.wr,
/tmp/kdbus-test-send.rdwr) with three different open modes (O_RDONLY,
O_WRONLY, O_RDWR). If any of these files exists it is used 'as is',
otherwise it is created with some default content. Then this test tries
to send simple message followed by three messages each one of them
containing an array of opened file descriptors (single element array in the
first message, two element array in the second, three element array in the
third).

The ability to send array of file descriptors required changes in almost
all of the test case files.

Change-Id: I8b516458d8e8b786086b976aa2582ebeb4b173dc
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
Signed-off-by: Paul Osmialowski <p.osmialowsk@samsung.com>
17 files changed:
tools/testing/selftests/kdbus/Makefile
tools/testing/selftests/kdbus/kdbus-test.c
tools/testing/selftests/kdbus/kdbus-test.h
tools/testing/selftests/kdbus/kdbus-util.c
tools/testing/selftests/kdbus/kdbus-util.h
tools/testing/selftests/kdbus/test-activator.c
tools/testing/selftests/kdbus/test-chat.c
tools/testing/selftests/kdbus/test-connection.c
tools/testing/selftests/kdbus/test-fd.c
tools/testing/selftests/kdbus/test-message.c
tools/testing/selftests/kdbus/test-metadata-ns.c
tools/testing/selftests/kdbus/test-monitor.c
tools/testing/selftests/kdbus/test-policy-ns.c
tools/testing/selftests/kdbus/test-policy-priv.c
tools/testing/selftests/kdbus/test-send.c [new file with mode: 0644]
tools/testing/selftests/kdbus/test-sync.c
tools/testing/selftests/kdbus/test-timeout.c