From 6d461a4fe7896faa1aec5a5417888cf179e46b9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Fabian=20Silva=20Delgado?= Date: Mon, 22 Feb 2016 01:12:47 -0300 Subject: Linux-libre 4.4.2-gnu --- tools/testing/selftests/kdbus/test-daemon.c | 65 ----------------------------- 1 file changed, 65 deletions(-) delete mode 100644 tools/testing/selftests/kdbus/test-daemon.c (limited to 'tools/testing/selftests/kdbus/test-daemon.c') diff --git a/tools/testing/selftests/kdbus/test-daemon.c b/tools/testing/selftests/kdbus/test-daemon.c deleted file mode 100644 index 8bc238619..000000000 --- a/tools/testing/selftests/kdbus/test-daemon.c +++ /dev/null @@ -1,65 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "kdbus-test.h" -#include "kdbus-util.h" -#include "kdbus-enum.h" - -int kdbus_test_daemon(struct kdbus_test_env *env) -{ - struct pollfd fds[2]; - int count; - int ret; - - /* This test doesn't make any sense in non-interactive mode */ - if (!kdbus_util_verbose) - return TEST_OK; - - printf("Created connection %llu on bus '%s'\n", - (unsigned long long) env->conn->id, env->buspath); - - ret = kdbus_name_acquire(env->conn, "com.example.kdbus-test", NULL); - ASSERT_RETURN(ret == 0); - printf(" Aquired name: com.example.kdbus-test\n"); - - fds[0].fd = env->conn->fd; - fds[1].fd = STDIN_FILENO; - - printf("Monitoring connections:\n"); - - for (count = 0;; count++) { - int i, nfds = sizeof(fds) / sizeof(fds[0]); - - for (i = 0; i < nfds; i++) { - fds[i].events = POLLIN | POLLPRI | POLLHUP; - fds[i].revents = 0; - } - - ret = poll(fds, nfds, -1); - if (ret <= 0) - break; - - if (fds[0].revents & POLLIN) { - ret = kdbus_msg_recv(env->conn, NULL, NULL); - ASSERT_RETURN(ret == 0); - } - - /* stdin */ - if (fds[1].revents & POLLIN) - break; - } - - printf("Closing bus connection\n"); - - return TEST_OK; -} -- cgit v1.2.3