summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPaul Osmialowski <p.osmialowsk@samsung.com>2015-04-29 12:00:19 +0200
committerSeung-Woo Kim <sw0312.kim@samsung.com>2016-12-14 13:48:50 +0900
commit6d8a83a2fa297dd33bdc37afeb9fa010c9151aef (patch)
tree28c9022a28df0d5d8a290709d83bc9b02e707f09 /tools
parentc4148e19f0a0bc4063cc8a44279ecc0f838d5fa9 (diff)
kdbus: Ability to run kdbus test by executable binary name
With this applied, you can do following: $ cp kdbus-test daemon $ cp kdbus-test send Then run 'daemon' in one shell session: $ ./daemon --bus test ...and 'send' in another: $ ./send --bus test Useful for testing features introduced by previous patches. Signed-off-by: Paul Osmialowski <p.osmialowsk@samsung.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/kdbus/kdbus-test.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/testing/selftests/kdbus/kdbus-test.c b/tools/testing/selftests/kdbus/kdbus-test.c
index 526f25fbd79c..356a1c7fdf72 100644
--- a/tools/testing/selftests/kdbus/kdbus-test.c
+++ b/tools/testing/selftests/kdbus/kdbus-test.c
@@ -852,6 +852,7 @@ int main(int argc, char *argv[])
ARG_UIDMAP,
ARG_GIDMAP,
};
+ char *exec = basename(argv[0]);
kdbus_args = malloc(sizeof(*kdbus_args));
if (!kdbus_args) {
@@ -881,6 +882,10 @@ int main(int argc, char *argv[])
srand(time(NULL));
+ if (strcmp(exec, "kdbus-test") != 0) {
+ kdbus_args->test = exec;
+ }
+
while ((t = getopt_long(argc, argv, "hxfm:r:t:b:w:a", options, NULL)) >= 0) {
switch (t) {
case 'x':