kdbus: selftests extended
authorPaul Osmialowski <p.osmialowsk@samsung.com>
Tue, 14 Apr 2015 13:55:09 +0000 (15:55 +0200)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Mon, 4 Apr 2016 01:12:43 +0000 (10:12 +0900)
commit04e746746c98c24f9bfc4c89a91f7959ffcb17f3
tree24d6b23c7b4bdf3a8a9493873ef94b60dc910d80
parentceced8d60a803304d206441f44606e4316d3318c
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