Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1232072 > unrolled thread

[RFC 3/3] kdbus: Ability to run kdbus test by executable binary name

Started byPaul Osmialowski <p.osmialowsk@samsung.com>
First post2015-09-24 14:10 +0200
Last post2015-09-24 14:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [RFC 3/3] kdbus: Ability to run kdbus test by executable binary name Paul Osmialowski <p.osmialowsk@samsung.com> - 2015-09-24 14:10 +0200

#1232072 — [RFC 3/3] kdbus: Ability to run kdbus test by executable binary name

FromPaul Osmialowski <p.osmialowsk@samsung.com>
Date2015-09-24 14:10 +0200
Subject[RFC 3/3] kdbus: Ability to run kdbus test by executable binary name
Message-ID<qcdvz-2yv-5@gated-at.bofh.it>
With this applied, you can make a symlink (or copy) of kdbus-test
executable binary and name it according to given test name.

Useful for testing features introduced by previous patches.

Signed-off-by: Paul Osmialowski <p.osmialowsk@samsung.com>
---
 tools/testing/selftests/kdbus/kdbus-test.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/testing/selftests/kdbus/kdbus-test.c b/tools/testing/selftests/kdbus/kdbus-test.c
index 37f05bb..473cb1b 100644
--- a/tools/testing/selftests/kdbus/kdbus-test.c
+++ b/tools/testing/selftests/kdbus/kdbus-test.c
@@ -834,6 +834,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) {
@@ -863,6 +864,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':
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web