---
configure.ac | 1 +
gio/tests/Makefile.am | 13 +++
gio/tests/kdbus-test/README | 108
gio/tests/kdbus-test/gdbus-example-kdbus-client.c | 51 ++
gio/tests/kdbus-test/gdbus-example-kdbus-server.c | 117 ++
5 files changed, 290 insertions(+)
create mode 100644 gio/tests/kdbus-test/README
create mode 100644 gio/tests/kdbus-test/gdbus-example-kdbus-client.c
create mode 100644 gio/tests/kdbus-test/gdbus-example-kdbus-server.c
diff --git a/configure.ac b/configure.ac
index 413c9f2..c3349c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -264,6 +264,7 @@ AS_IF([test x$enable_gc_friendly = xyes], [
], [ AC_MSG_RESULT([no]) ])
AC_MSG_CHECKING([kdbus transport])
+AM_CONDITIONAL(KDBUS_TRANSPORT, [test x$enable_kdbus_transport = xyes])
AS_IF([test x$enable_kdbus_transport = xyes], [
AC_DEFINE(KDBUS_TRANSPORT, 1, [Define if kdbus transport is enabled])
AC_MSG_RESULT([yes])
diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am
index bec70d7..8d692bb 100644
--- a/gio/tests/Makefile.am
+++ b/gio/tests/Makefile.am
@@ -470,6 +470,19 @@ gdbus_serialization_SOURCES = \
gdbus-tests.c
endif
+if KDBUS_TRANSPORT
+test_programs += gdbus-example-kdbus-server
+test_programs += gdbus-example-kdbus-client
+
+gdbus_example_kdbus_server_CFLAGS = $(AM_CFLAGS) $(DBUS1_CFLAGS)
+gdbus_example_kdbus_server_LDADD = $(LDADD) $(DBUS1_LIBS)
+gdbus_example_kdbus_server_SOURCES = kdbus-test/gdbus-example-kdbus-server.c
+
+gdbus_example_kdbus_client_CFLAGS = $(AM_CFLAGS) $(DBUS1_CFLAGS)
+gdbus_example_kdbus_client_LDADD = $(LDADD) $(DBUS1_LIBS)
+gdbus_example_kdbus_client_SOURCES = kdbus-test/gdbus-example-kdbus-client.c
+endif
+
# -
# The resources test is a bit more complicated...
diff --git a/gio/tests/kdbus-test/README b/gio/tests/kdbus-test/README
new file mode 100644
index 000..6f44f0b
--- /dev/null
+++ b/gio/tests/kdbus-test/README
@@ -0,0 +1,108 @@
+Description
+===
+
+In order to perform tests of modified libgio library (with kdbus
+transport) we have created two programs: gdbus-example-kdbus-server
+and gdbus-example-kdbus-client. The first of them acts as a server,
+registers itself on the bus under well-known name and waits for calls
+to its objects and methods. The second one (client) makes calls and
+records periods of time between moment of preparing of a call to the
+moment of receiving and parsing an answer. The measurement is made by
+performing one thousand of calls and computing a sum of duration of
+every call (for different sizes of message payload: 4B, 8B, 4kB, 8kB,
+16kB, 64kB and 512kB). The client program returns total time of
+performed calls after successful execution.
+
+
+Requirements
+
+
+* kdbus kernel module,
+* modified version of glib (with kdbus transport),
+* modified version of dbus-daemon (with kdbus transport),
+
+
+KDBUS
+=
+
+Simple install procedure:
+
+ % git clone https://github.com/gregkh/kdbus.git# download kdbus source
+ % cd kdbus # change to kdbus
directory
+ % make # build kdbus module
+ % insmod kdbus.ko # load kdbus kernel module
+
+
+GLIB (modified version)
+===
+
+Simple install procedure:
+
+
+ % cd glib # change to glib directory
+ % ./configure --enable-kdbus-transport# run the `configure'
script with kdbus support
+ % make# build GLIB
+
+
+DBUS-DAEMON (modified version)
+==
+
+Modified version of dbus-daemon (from tizen.org) is required to run
+kdbus transport in libgio.
+
+Solution, which we propose, includes modifications both in client
+libraries (libgio, libdbus) and dbus daemon. Daemon is registered on
+kdbus bus as a client under org.freedesktop.DBus name. Only
+messages addressed to this interface are handled by daemon. Messages
+such as RequestName or AddMatch are translated by daemon to respective
+ioctl() calls, which send them through kdbus on behalf of original
+client process. The rest of messages would are going straight from
+origin to destination through kdbus.
+
+Simple install procedure:
+
+* download modified version of dbus from tizen.org repository
+ (kdbus-dev branch):
+
+ git clone git://review.tizen.org/platform/upstream/dbus.git -b kdbus-dev
+
+* change to dbus directory and build dbus-daemon with kdbus support:
+
+ ./configure --enable-kdbus-transport
+ make make install
+
+* start of custom dbus-daemon supporting kdbus transport:
+
+ ./dbus-daemon --nofork --address=kdbus:
--config-file=/etc/dbus-1/session.conf
+
+
+TESTS
+=
+
+* Build test binaries:
+
+ cd gio/tests
+ make
+
+* Set variable to use