summaryrefslogtreecommitdiff
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-04-04 10:12:44 +0900
commit555cb6b16c21b35a69411847206b5caa4bce1bb3 (patch)
treef6812b0288d4cc4cf341cce9dadeb32a020bbf5d
parent04e746746c98c24f9bfc4c89a91f7959ffcb17f3 (diff)
downloadlinux-exynos-555cb6b16c21b35a69411847206b5caa4bce1bb3.tar.gz
linux-exynos-555cb6b16c21b35a69411847206b5caa4bce1bb3.tar.bz2
linux-exynos-555cb6b16c21b35a69411847206b5caa4bce1bb3.zip
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. Change-Id: Ic66355e664b7920736a0063b0ae6b456706d7d8d Signed-off-by: Paul Osmialowski <p.osmialowsk@samsung.com>
-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':