summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2010-12-02 17:56:16 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2010-12-02 17:56:16 +0100
commita514a474bc42e37c7d13cff2c4dd37702b2630ea (patch)
treea138f2d9bc030d139a74094b0a1f69ce17c7f453 /src
parent11980d73325e7f94b4bb78f1556d00f8442d4617 (diff)
downloadconnman-a514a474bc42e37c7d13cff2c4dd37702b2630ea.tar.gz
connman-a514a474bc42e37c7d13cff2c4dd37702b2630ea.tar.bz2
connman-a514a474bc42e37c7d13cff2c4dd37702b2630ea.zip
Remove selftest file and option
Diffstat (limited to 'src')
-rw-r--r--src/connman.h4
-rw-r--r--src/main.c11
-rw-r--r--src/resolver.c43
-rw-r--r--src/selftest.c43
4 files changed, 0 insertions, 101 deletions
diff --git a/src/connman.h b/src/connman.h
index 6e2105aa..4fa90504 100644
--- a/src/connman.h
+++ b/src/connman.h
@@ -53,8 +53,6 @@ DBusMessage *__connman_error_operation_timeout(DBusMessage *msg);
DBusMessage *__connman_error_invalid_service(DBusMessage *msg);
DBusMessage *__connman_error_invalid_property(DBusMessage *msg);
-int __connman_selftest(void);
-
#include <connman/types.h>
int __connman_manager_init(gboolean compat);
@@ -128,8 +126,6 @@ void __connman_rfkill_cleanup(void);
int __connman_resolver_init(void);
void __connman_resolver_cleanup(void);
-int __connman_resolver_selftest(void);
-
#include <connman/storage.h>
int __connman_storage_init(void);
diff --git a/src/main.c b/src/main.c
index 56675bd9..6cdf59e8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -64,7 +64,6 @@ static gchar *option_noplugin = NULL;
static gchar *option_wifi = NULL;
static gboolean option_detach = TRUE;
static gboolean option_compat = FALSE;
-static gboolean option_selftest = FALSE;
static gboolean option_version = FALSE;
static gboolean parse_debug(const char *key, const char *value,
@@ -97,8 +96,6 @@ static GOptionEntry options[] = {
"Don't fork daemon to background" },
{ "compat", 'c', 0, G_OPTION_ARG_NONE, &option_compat,
"Enable Network Manager compatibility" },
- { "selftest", 't', 0, G_OPTION_ARG_NONE, &option_selftest,
- "Run self testing routines" },
{ "version", 'v', 0, G_OPTION_ARG_NONE, &option_version,
"Show version information and exit" },
{ NULL },
@@ -212,13 +209,6 @@ int main(int argc, char *argv[])
__connman_log_init(option_debug, option_detach);
- if (option_selftest == TRUE) {
- if (__connman_selftest() < 0) {
- connman_error("Self testing routines failed");
- goto selftest;
- }
- }
-
__connman_dbus_init(conn);
__connman_storage_init();
@@ -287,7 +277,6 @@ int main(int argc, char *argv[])
__connman_dbus_cleanup();
-selftest:
__connman_log_cleanup();
dbus_connection_unref(conn);
diff --git a/src/resolver.c b/src/resolver.c
index 8957645f..8a4dd1c9 100644
--- a/src/resolver.c
+++ b/src/resolver.c
@@ -312,49 +312,6 @@ void connman_resolver_flush(void)
return;
}
-static int selftest_append(const char *interface, const char *domain,
- const char *server)
-{
- DBG("server %s", server);
-
- return 0;
-}
-
-static int selftest_remove(const char *interface, const char *domain,
- const char *server)
-{
- DBG("server %s", server);
-
- return 0;
-}
-
-static struct connman_resolver selftest_resolver = {
- .name = "selftest",
- .priority = CONNMAN_RESOLVER_PRIORITY_HIGH + 42,
- .append = selftest_append,
- .remove = selftest_remove,
-};
-
-int __connman_resolver_selftest(void)
-{
- connman_resolver_append("wlan0", "lwn.net", "192.168.0.1");
-
- connman_resolver_register(&selftest_resolver);
-
- connman_resolver_append("eth0", "connman.net", "192.168.42.1");
- connman_resolver_append("wlan0", "lwn.net", "192.168.0.2");
-
- connman_resolver_append_public_server("8.8.8.8");
-
- connman_resolver_remove_public_server("8.8.8.8");
-
- connman_resolver_remove_all("wlan0");
-
- connman_resolver_unregister(&selftest_resolver);
-
- return 0;
-}
-
struct resolvfile_entry {
char *interface;
char *domain;
diff --git a/src/selftest.c b/src/selftest.c
deleted file mode 100644
index f1500ec3..00000000
--- a/src/selftest.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- *
- * Connection Manager
- *
- * Copyright (C) 2007-2010 Intel Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "connman.h"
-
-int __connman_selftest(void)
-{
- int err;
-
- connman_info("Start self testing");
-
- connman_info("Testing resolver unit");
- err = __connman_resolver_selftest();
- if (err < 0)
- goto done;
-
-done:
- connman_info("Finished self testing");
-
- return err;
-}