Index: uspace/app/tmon/Makefile
===================================================================
--- uspace/app/tmon/Makefile	(revision ab8e0f582b1fb088af8d95426d31fd255f22fc81)
+++ uspace/app/tmon/Makefile	(revision 96c416a842d1ac574b669328720d7ceb0bbcaa7c)
@@ -35,6 +35,6 @@
 	main.c\
 	list.c\
-	test.c\
-	stress_test.c\
+	tf.c\
+	burst_tests.c\
 	resolve.c
 
Index: uspace/app/tmon/burst_tests.c
===================================================================
--- uspace/app/tmon/burst_tests.c	(revision 96c416a842d1ac574b669328720d7ceb0bbcaa7c)
+++ uspace/app/tmon/burst_tests.c	(revision 96c416a842d1ac574b669328720d7ceb0bbcaa7c)
@@ -0,0 +1,262 @@
+/*
+ * Copyright (c) 2017 Petr Manek
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup tmon
+ * @{
+ */
+/**
+ * @file
+ * USB burst tests.
+ */
+
+#include <stdio.h>
+#include <errno.h>
+#include <str_error.h>
+#include <getopt.h>
+#include <usbdiag_iface.h>
+#include "commands.h"
+#include "tf.h"
+
+#define NAME "tmon"
+
+typedef struct tmon_burst_test_params {
+	tmon_test_params_t base; /* inheritance */
+	uint32_t cycles;
+	size_t size;
+} tmon_burst_test_params_t;
+
+static struct option long_options[] = {
+	{"cycles", required_argument, NULL, 'n'},
+	{"size", required_argument, NULL, 's'},
+	{0, 0, NULL, 0}
+};
+
+static const char *short_options = "n:s:";
+
+static int read_params(int argc, char *argv[], tmon_test_params_t **params)
+{
+	int rc;
+	tmon_burst_test_params_t *p = (tmon_burst_test_params_t *) malloc(sizeof(tmon_burst_test_params_t));
+	if (!p)
+		return ENOMEM;
+
+	// Default values.
+	p->cycles = 256;
+	p->size = 1024;
+
+	// Parse other than default values.
+	int c;
+	for (c = 0, optreset = 1, optind = 0; c != -1;) {
+		c = getopt_long(argc, argv, short_options, long_options, NULL);
+		switch (c) {
+		case -1:
+			break;
+		case 'n':
+			if (!optarg || str_uint32_t(optarg, NULL, 10, false, &p->cycles) != EOK) {
+				puts(NAME ": Invalid number of cycles.\n");
+				rc = EINVAL;
+				goto err_malloc;
+			}
+			break;
+		case 's':
+			if (!optarg || str_size_t(optarg, NULL, 10, false, &p->size) != EOK) {
+				puts(NAME ": Invalid data size.\n");
+				rc = EINVAL;
+				goto err_malloc;
+			}
+			break;
+		}
+	}
+
+	*params = (tmon_test_params_t *) p;
+	return EOK;
+
+err_malloc:
+	free(p);
+	*params = NULL;
+	return rc;
+}
+
+static int run_intr_in(async_exch_t *exch, const tmon_test_params_t *generic_params)
+{
+	const tmon_burst_test_params_t *params = (tmon_burst_test_params_t *) generic_params;
+	printf("Executing interrupt in test.\n"
+	    "      Number of cycles: %d\n"
+	    "      Data size: %ld B\n", params->cycles, params->size);
+
+	int rc = usbdiag_burst_intr_in(exch, params->cycles, params->size);
+	if (rc) {
+		printf(NAME ": Test failed. %s\n", str_error(rc));
+		return 1;
+	}
+
+	return 0;
+}
+
+static int run_intr_out(async_exch_t *exch, const tmon_test_params_t *generic_params)
+{
+	const tmon_burst_test_params_t *params = (tmon_burst_test_params_t *) generic_params;
+	printf("Executing interrupt out test.\n"
+	    "      Number of cycles: %d\n"
+	    "      Data size: %ld B\n", params->cycles, params->size);
+
+	int rc = usbdiag_burst_intr_out(exch, params->cycles, params->size);
+	if (rc) {
+		printf(NAME ": Test failed. %s\n", str_error(rc));
+		return 1;
+	}
+
+	return 0;
+}
+
+static int run_bulk_in(async_exch_t *exch, const tmon_test_params_t *generic_params)
+{
+	const tmon_burst_test_params_t *params = (tmon_burst_test_params_t *) generic_params;
+	printf("Executing bulk in test.\n"
+	    "      Number of cycles: %d\n"
+	    "      Data size: %ld B\n", params->cycles, params->size);
+
+	int rc = usbdiag_burst_bulk_in(exch, params->cycles, params->size);
+	if (rc) {
+		printf(NAME ": Test failed. %s\n", str_error(rc));
+		return 1;
+	}
+
+	return 0;
+}
+
+static int run_bulk_out(async_exch_t *exch, const tmon_test_params_t *generic_params)
+{
+	const tmon_burst_test_params_t *params = (tmon_burst_test_params_t *) generic_params;
+	printf("Executing bulk out test.\n"
+	    "      Number of cycles: %d\n"
+	    "      Data size: %ld B\n", params->cycles, params->size);
+
+	int rc = usbdiag_burst_bulk_out(exch, params->cycles, params->size);
+	if (rc) {
+		printf(NAME ": Test failed. %s\n", str_error(rc));
+		return 1;
+	}
+
+	return 0;
+}
+
+static int run_isoch_in(async_exch_t *exch, const tmon_test_params_t *generic_params)
+{
+	const tmon_burst_test_params_t *params = (tmon_burst_test_params_t *) generic_params;
+	printf("Executing isochronous in test.\n"
+	    "      Number of cycles: %d\n"
+	    "      Data size: %ld B\n", params->cycles, params->size);
+
+	int rc = usbdiag_burst_isoch_in(exch, params->cycles, params->size);
+	if (rc) {
+		printf(NAME ": Test failed. %s\n", str_error(rc));
+		return 1;
+	}
+
+	return 0;
+}
+
+static int run_isoch_out(async_exch_t *exch, const tmon_test_params_t *generic_params)
+{
+	const tmon_burst_test_params_t *params = (tmon_burst_test_params_t *) generic_params;
+	printf("Executing isochronous out test.\n"
+	    "      Number of cycles: %d\n"
+	    "      Data size: %ld B\n", params->cycles, params->size);
+
+	int rc = usbdiag_burst_isoch_out(exch, params->cycles, params->size);
+	if (rc) {
+		printf(NAME ": Test failed. %s\n", str_error(rc));
+		return 1;
+	}
+
+	return 0;
+}
+
+int tmon_burst_intr_in(int argc, char *argv[])
+{
+	static const tmon_test_ops_t ops = {
+		.run = run_intr_in,
+		.read_params = read_params
+	};
+
+	return tmon_test_main(argc, argv, &ops);
+}
+
+int tmon_burst_intr_out(int argc, char *argv[])
+{
+	static const tmon_test_ops_t ops = {
+		.run = run_intr_out,
+		.read_params = read_params
+	};
+
+	return tmon_test_main(argc, argv, &ops);
+}
+
+int tmon_burst_bulk_in(int argc, char *argv[])
+{
+	static const tmon_test_ops_t ops = {
+		.run = run_bulk_in,
+		.read_params = read_params
+	};
+
+	return tmon_test_main(argc, argv, &ops);
+}
+
+int tmon_burst_bulk_out(int argc, char *argv[])
+{
+	static const tmon_test_ops_t ops = {
+		.run = run_bulk_out,
+		.read_params = read_params
+	};
+
+	return tmon_test_main(argc, argv, &ops);
+}
+
+int tmon_burst_isoch_in(int argc, char *argv[])
+{
+	static const tmon_test_ops_t ops = {
+		.run = run_isoch_in,
+		.read_params = read_params
+	};
+
+	return tmon_test_main(argc, argv, &ops);
+}
+
+int tmon_burst_isoch_out(int argc, char *argv[])
+{
+	static const tmon_test_ops_t ops = {
+		.run = run_isoch_out,
+		.read_params = read_params
+	};
+
+	return tmon_test_main(argc, argv, &ops);
+}
+
+/** @}
+ */
Index: uspace/app/tmon/commands.h
===================================================================
--- uspace/app/tmon/commands.h	(revision ab8e0f582b1fb088af8d95426d31fd255f22fc81)
+++ uspace/app/tmon/commands.h	(revision 96c416a842d1ac574b669328720d7ceb0bbcaa7c)
@@ -38,10 +38,12 @@
 
 int tmon_list(int, char **);
-int tmon_stress_intr_in(int, char **);
-int tmon_stress_intr_out(int, char **);
-int tmon_stress_bulk_in(int, char **);
-int tmon_stress_bulk_out(int, char **);
-int tmon_stress_isoch_in(int, char **);
-int tmon_stress_isoch_out(int, char **);
+
+/* Burst tests read/write into endpoints as fast as possible. */
+int tmon_burst_intr_in(int, char **);
+int tmon_burst_intr_out(int, char **);
+int tmon_burst_bulk_in(int, char **);
+int tmon_burst_bulk_out(int, char **);
+int tmon_burst_isoch_in(int, char **);
+int tmon_burst_isoch_out(int, char **);
 
 #endif /* TMON_COMMANDS_H_ */
Index: uspace/app/tmon/main.c
===================================================================
--- uspace/app/tmon/main.c	(revision ab8e0f582b1fb088af8d95426d31fd255f22fc81)
+++ uspace/app/tmon/main.c	(revision 96c416a842d1ac574b669328720d7ceb0bbcaa7c)
@@ -53,32 +53,32 @@
 	},
 	{
-		.name = "stress-intr-in",
-		.description = "Stress benchmark interrupt in endpoints of a device.",
-		.action = tmon_stress_intr_in,
+		.name = "test-intr-in",
+		.description = "Read from interrupt in endpoints as fast as possible.",
+		.action = tmon_burst_intr_in,
 	},
 	{
-		.name = "stress-intr-out",
-		.description = "Stress benchmark interrupt out endpoints of a device.",
-		.action = tmon_stress_intr_out,
+		.name = "test-intr-out",
+		.description = "Write to interrupt out endpoints as fast as possible.",
+		.action = tmon_burst_intr_out,
 	},
 	{
-		.name = "stress-bulk-in",
-		.description = "Stress benchmark bulk in endpoints of a device.",
-		.action = tmon_stress_bulk_in,
+		.name = "test-bulk-in",
+		.description = "Read from bulk in endpoints as fast as possible.",
+		.action = tmon_burst_bulk_in,
 	},
 	{
-		.name = "stress-bulk-out",
-		.description = "Stress benchmark bulk out endpoints of a device.",
-		.action = tmon_stress_bulk_out,
+		.name = "test-bulk-out",
+		.description = "Write to bulk out endpoints as fast as possible.",
+		.action = tmon_burst_bulk_out,
 	},
 	{
-		.name = "stress-isoch-in",
-		.description = "Stress benchmark isochronous in endpoints of a device.",
-		.action = tmon_stress_isoch_in,
+		.name = "test-isoch-in",
+		.description = "Read from isochronous in endpoints as fast as possible.",
+		.action = tmon_burst_isoch_in,
 	},
 	{
-		.name = "stress-isoch-out",
-		.description = "Stress benchmark isochronous out endpoints of a device.",
-		.action = tmon_stress_isoch_out,
+		.name = "test-isoch-out",
+		.description = "Write to isochronouse out endpoints as fast as possible.",
+		.action = tmon_burst_isoch_out,
 	},
 	{
Index: uspace/app/tmon/stress_test.c
===================================================================
--- uspace/app/tmon/stress_test.c	(revision ab8e0f582b1fb088af8d95426d31fd255f22fc81)
+++ 	(revision )
@@ -1,262 +1,0 @@
-/*
- * Copyright (c) 2017 Petr Manek
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup tmon
- * @{
- */
-/**
- * @file
- * USB stress tests.
- */
-
-#include <stdio.h>
-#include <errno.h>
-#include <str_error.h>
-#include <getopt.h>
-#include <usbdiag_iface.h>
-#include "commands.h"
-#include "test.h"
-
-#define NAME "tmon"
-
-typedef struct tmon_stress_test_params {
-	tmon_test_params_t base; /* inheritance */
-	uint32_t cycles;
-	size_t size;
-} tmon_stress_test_params_t;
-
-static struct option long_options[] = {
-	{"cycles", required_argument, NULL, 'n'},
-	{"size", required_argument, NULL, 's'},
-	{0, 0, NULL, 0}
-};
-
-static const char *short_options = "n:s:";
-
-static int read_params(int argc, char *argv[], tmon_test_params_t **params)
-{
-	int rc;
-	tmon_stress_test_params_t *p = (tmon_stress_test_params_t *) malloc(sizeof(tmon_stress_test_params_t));
-	if (!p)
-		return ENOMEM;
-
-	// Default values.
-	p->cycles = 256;
-	p->size = 1024;
-
-	// Parse other than default values.
-	int c;
-	for (c = 0, optreset = 1, optind = 0; c != -1;) {
-		c = getopt_long(argc, argv, short_options, long_options, NULL);
-		switch (c) {
-		case -1:
-			break;
-		case 'n':
-			if (!optarg || str_uint32_t(optarg, NULL, 10, false, &p->cycles) != EOK) {
-				puts(NAME ": Invalid number of cycles.\n");
-				rc = EINVAL;
-				goto err_malloc;
-			}
-			break;
-		case 's':
-			if (!optarg || str_size_t(optarg, NULL, 10, false, &p->size) != EOK) {
-				puts(NAME ": Invalid data size.\n");
-				rc = EINVAL;
-				goto err_malloc;
-			}
-			break;
-		}
-	}
-
-	*params = (tmon_test_params_t *) p;
-	return EOK;
-
-err_malloc:
-	free(p);
-	*params = NULL;
-	return rc;
-}
-
-static int run_intr_in(async_exch_t *exch, const tmon_test_params_t *generic_params)
-{
-	const tmon_stress_test_params_t *params = (tmon_stress_test_params_t *) generic_params;
-	printf("Executing interrupt in stress test.\n"
-	    "      Number of cycles: %d\n"
-	    "      Data size: %ld B\n", params->cycles, params->size);
-
-	int rc = usbdiag_stress_intr_in(exch, params->cycles, params->size);
-	if (rc) {
-		printf(NAME ": Test failed. %s\n", str_error(rc));
-		return 1;
-	}
-
-	return 0;
-}
-
-static int run_intr_out(async_exch_t *exch, const tmon_test_params_t *generic_params)
-{
-	const tmon_stress_test_params_t *params = (tmon_stress_test_params_t *) generic_params;
-	printf("Executing interrupt out stress test.\n"
-	    "      Number of cycles: %d\n"
-	    "      Data size: %ld B\n", params->cycles, params->size);
-
-	int rc = usbdiag_stress_intr_out(exch, params->cycles, params->size);
-	if (rc) {
-		printf(NAME ": Test failed. %s\n", str_error(rc));
-		return 1;
-	}
-
-	return 0;
-}
-
-static int run_bulk_in(async_exch_t *exch, const tmon_test_params_t *generic_params)
-{
-	const tmon_stress_test_params_t *params = (tmon_stress_test_params_t *) generic_params;
-	printf("Executing bulk in stress test.\n"
-	    "      Number of cycles: %d\n"
-	    "      Data size: %ld B\n", params->cycles, params->size);
-
-	int rc = usbdiag_stress_bulk_in(exch, params->cycles, params->size);
-	if (rc) {
-		printf(NAME ": Test failed. %s\n", str_error(rc));
-		return 1;
-	}
-
-	return 0;
-}
-
-static int run_bulk_out(async_exch_t *exch, const tmon_test_params_t *generic_params)
-{
-	const tmon_stress_test_params_t *params = (tmon_stress_test_params_t *) generic_params;
-	printf("Executing bulk out stress test.\n"
-	    "      Number of cycles: %d\n"
-	    "      Data size: %ld B\n", params->cycles, params->size);
-
-	int rc = usbdiag_stress_bulk_out(exch, params->cycles, params->size);
-	if (rc) {
-		printf(NAME ": Test failed. %s\n", str_error(rc));
-		return 1;
-	}
-
-	return 0;
-}
-
-static int run_isoch_in(async_exch_t *exch, const tmon_test_params_t *generic_params)
-{
-	const tmon_stress_test_params_t *params = (tmon_stress_test_params_t *) generic_params;
-	printf("Executing isochronous in stress test.\n"
-	    "      Number of cycles: %d\n"
-	    "      Data size: %ld B\n", params->cycles, params->size);
-
-	int rc = usbdiag_stress_isoch_in(exch, params->cycles, params->size);
-	if (rc) {
-		printf(NAME ": Test failed. %s\n", str_error(rc));
-		return 1;
-	}
-
-	return 0;
-}
-
-static int run_isoch_out(async_exch_t *exch, const tmon_test_params_t *generic_params)
-{
-	const tmon_stress_test_params_t *params = (tmon_stress_test_params_t *) generic_params;
-	printf("Executing isochronous out stress test.\n"
-	    "      Number of cycles: %d\n"
-	    "      Data size: %ld B\n", params->cycles, params->size);
-
-	int rc = usbdiag_stress_isoch_out(exch, params->cycles, params->size);
-	if (rc) {
-		printf(NAME ": Test failed. %s\n", str_error(rc));
-		return 1;
-	}
-
-	return 0;
-}
-
-int tmon_stress_intr_in(int argc, char *argv[])
-{
-	static const tmon_test_ops_t ops = {
-		.run = run_intr_in,
-		.read_params = read_params
-	};
-
-	return tmon_test_main(argc, argv, &ops);
-}
-
-int tmon_stress_intr_out(int argc, char *argv[])
-{
-	static const tmon_test_ops_t ops = {
-		.run = run_intr_out,
-		.read_params = read_params
-	};
-
-	return tmon_test_main(argc, argv, &ops);
-}
-
-int tmon_stress_bulk_in(int argc, char *argv[])
-{
-	static const tmon_test_ops_t ops = {
-		.run = run_bulk_in,
-		.read_params = read_params
-	};
-
-	return tmon_test_main(argc, argv, &ops);
-}
-
-int tmon_stress_bulk_out(int argc, char *argv[])
-{
-	static const tmon_test_ops_t ops = {
-		.run = run_bulk_out,
-		.read_params = read_params
-	};
-
-	return tmon_test_main(argc, argv, &ops);
-}
-
-int tmon_stress_isoch_in(int argc, char *argv[])
-{
-	static const tmon_test_ops_t ops = {
-		.run = run_isoch_in,
-		.read_params = read_params
-	};
-
-	return tmon_test_main(argc, argv, &ops);
-}
-
-int tmon_stress_isoch_out(int argc, char *argv[])
-{
-	static const tmon_test_ops_t ops = {
-		.run = run_isoch_out,
-		.read_params = read_params
-	};
-
-	return tmon_test_main(argc, argv, &ops);
-}
-
-/** @}
- */
Index: uspace/app/tmon/test.c
===================================================================
--- uspace/app/tmon/test.c	(revision ab8e0f582b1fb088af8d95426d31fd255f22fc81)
+++ 	(revision )
@@ -1,98 +1,0 @@
-/*
- * Copyright (c) 2017 Petr Manek
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup tmon
- * @{
- */
-/**
- * @file
- * Testing framework.
- */
-
-#include <stdio.h>
-#include <devman.h>
-#include <str_error.h>
-#include <usbdiag_iface.h>
-#include "resolve.h"
-#include "test.h"
-
-#define NAME "tmon"
-#define MAX_PATH_LENGTH 1024
-
-int tmon_test_main(int argc, char *argv[], const tmon_test_ops_t *ops) {
-	devman_handle_t fun = -1;
-
-	if (argc >= 2 && *argv[1] != '-') {
-		// Assume that the first argument is device path.
-		if (tmon_resolve_named(argv[1], &fun))
-			return 1;
-	} else {
-		// The first argument is either an option or not present.
-		if (tmon_resolve_default(&fun))
-			return 1;
-	}
-
-	int rc, ec;
-	char path[MAX_PATH_LENGTH];
-	if ((rc = devman_fun_get_path(fun, path, sizeof(path)))) {
-		printf(NAME ": Error resolving path of device with handle %ld. %s\n", fun, str_error(rc));
-		return 1;
-	}
-
-	printf("Using device: %s\n", path);
-
-	tmon_test_params_t *params = NULL;
-	if ((rc = ops->read_params(argc, argv, &params))) {
-		printf(NAME ": Reading test parameters failed. %s\n", str_error(rc));
-		return 1;
-	}
-
-	async_sess_t *sess = usbdiag_connect(fun);
-	if (!sess) {
-		printf(NAME ": Could not connect to the device.\n");
-		return 1;
-	}
-
-	async_exch_t *exch = async_exchange_begin(sess);
-	if (!exch) {
-		printf(NAME ": Could not start exchange with the device.\n");
-		ec = 1;
-		goto err_sess;
-	}
-
-	ec = ops->run(exch, params);
-	async_exchange_end(exch);
-
-err_sess:
-	usbdiag_disconnect(sess);
-	free(params);
-	return ec;
-}
-
-/** @}
- */
Index: uspace/app/tmon/test.h
===================================================================
--- uspace/app/tmon/test.h	(revision ab8e0f582b1fb088af8d95426d31fd255f22fc81)
+++ 	(revision )
@@ -1,56 +1,0 @@
-/*
- * Copyright (c) 2017 Petr Manek
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup tmon
- * @{
- */
-/**
- * @file Testing framework definitions.
- */
-
-#ifndef TMON_TEST_H_
-#define TMON_TEST_H_
-
-#include <async.h>
-
-/** Parameters common for all tests. */
-typedef struct tmon_test_params {
-} tmon_test_params_t;
-
-/** Operations to implement by all tests. */
-typedef struct tmon_test_ops {
-	int (*run)(async_exch_t *, const tmon_test_params_t *);
-	int (*read_params)(int, char **, tmon_test_params_t **);
-} tmon_test_ops_t;
-
-int tmon_test_main(int, char **, const tmon_test_ops_t *);
-
-#endif /* TMON_TEST_H_ */
-
-/** @}
- */
Index: uspace/app/tmon/tf.c
===================================================================
--- uspace/app/tmon/tf.c	(revision 96c416a842d1ac574b669328720d7ceb0bbcaa7c)
+++ uspace/app/tmon/tf.c	(revision 96c416a842d1ac574b669328720d7ceb0bbcaa7c)
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2017 Petr Manek
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup tmon
+ * @{
+ */
+/**
+ * @file
+ * Testing framework.
+ */
+
+#include <stdio.h>
+#include <devman.h>
+#include <str_error.h>
+#include <usbdiag_iface.h>
+#include "resolve.h"
+#include "tf.h"
+
+#define NAME "tmon"
+#define MAX_PATH_LENGTH 1024
+
+int tmon_test_main(int argc, char *argv[], const tmon_test_ops_t *ops) {
+	devman_handle_t fun = -1;
+
+	if (argc >= 2 && *argv[1] != '-') {
+		// Assume that the first argument is device path.
+		if (tmon_resolve_named(argv[1], &fun))
+			return 1;
+	} else {
+		// The first argument is either an option or not present.
+		if (tmon_resolve_default(&fun))
+			return 1;
+	}
+
+	int rc, ec;
+	char path[MAX_PATH_LENGTH];
+	if ((rc = devman_fun_get_path(fun, path, sizeof(path)))) {
+		printf(NAME ": Error resolving path of device with handle %ld. %s\n", fun, str_error(rc));
+		return 1;
+	}
+
+	printf("Using device: %s\n", path);
+
+	tmon_test_params_t *params = NULL;
+	if ((rc = ops->read_params(argc, argv, &params))) {
+		printf(NAME ": Reading test parameters failed. %s\n", str_error(rc));
+		return 1;
+	}
+
+	async_sess_t *sess = usbdiag_connect(fun);
+	if (!sess) {
+		printf(NAME ": Could not connect to the device.\n");
+		return 1;
+	}
+
+	async_exch_t *exch = async_exchange_begin(sess);
+	if (!exch) {
+		printf(NAME ": Could not start exchange with the device.\n");
+		ec = 1;
+		goto err_sess;
+	}
+
+	ec = ops->run(exch, params);
+	async_exchange_end(exch);
+
+err_sess:
+	usbdiag_disconnect(sess);
+	free(params);
+	return ec;
+}
+
+/** @}
+ */
Index: uspace/app/tmon/tf.h
===================================================================
--- uspace/app/tmon/tf.h	(revision 96c416a842d1ac574b669328720d7ceb0bbcaa7c)
+++ uspace/app/tmon/tf.h	(revision 96c416a842d1ac574b669328720d7ceb0bbcaa7c)
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2017 Petr Manek
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup tmon
+ * @{
+ */
+/**
+ * @file Testing framework definitions.
+ */
+
+#ifndef TMON_TF_H_
+#define TMON_TF_H_
+
+#include <async.h>
+
+/** Parameters common for all tests. */
+typedef struct tmon_test_params {
+} tmon_test_params_t;
+
+/** Operations to implement by all tests. */
+typedef struct tmon_test_ops {
+	int (*run)(async_exch_t *, const tmon_test_params_t *);
+	int (*read_params)(int, char **, tmon_test_params_t **);
+} tmon_test_ops_t;
+
+int tmon_test_main(int, char **, const tmon_test_ops_t *);
+
+#endif /* TMON_TF_H_ */
+
+/** @}
+ */
