From bc7be00174c4ac3da6fe09911580ee32375ee638 Mon Sep 17 00:00:00 2001 From: EunBong Song Date: Thu, 27 Apr 2017 09:11:28 +0900 Subject: [PATCH] testcase: remove dhcp server test from le_tc dhcp server test in le_tc is a testcase for lwip dhcp server. TizenRT does not support any more this. This should be re-implemented for apps/netutils/dhcpd. Change-Id: I9e33f317e7e48723f278bc1ac49a30e0cb040627 Signed-off-by: EunBong Song --- apps/examples/testcase/le_tc/network/Kconfig | 5 - apps/examples/testcase/le_tc/network/Make.defs | 3 - .../testcase/le_tc/network/network_tc_main.c | 3 - .../examples/testcase/le_tc/network/tc_net_dhcps.c | 116 --------------------- 4 files changed, 127 deletions(-) delete mode 100644 apps/examples/testcase/le_tc/network/tc_net_dhcps.c diff --git a/apps/examples/testcase/le_tc/network/Kconfig b/apps/examples/testcase/le_tc/network/Kconfig index 8ccaf47..43adc03 100644 --- a/apps/examples/testcase/le_tc/network/Kconfig +++ b/apps/examples/testcase/le_tc/network/Kconfig @@ -32,7 +32,6 @@ config TC_NET_ALL select TC_NET_RECVFROM select TC_NET_SHUTDOWN select TC_NET_DHCPC - select TC_NET_DHCPS select TC_NET_SELECT select TC_NET_INET select TC_NET_ETHER @@ -110,10 +109,6 @@ config TC_NET_DHCPC bool "dhcpc() api" default n -config TC_NET_DHCPS - bool "dhcps() api" - default n - config TC_NET_INET bool "inet() api" default n diff --git a/apps/examples/testcase/le_tc/network/Make.defs b/apps/examples/testcase/le_tc/network/Make.defs index 8c639d1..6b31e7b 100644 --- a/apps/examples/testcase/le_tc/network/Make.defs +++ b/apps/examples/testcase/le_tc/network/Make.defs @@ -107,9 +107,6 @@ endif ifeq ($(CONFIG_TC_NET_DHCPC),y) CSRCS +=tc_net_dhcpc.c endif -ifeq ($(CONFIG_TC_NET_DHCPS),y) -CSRCS +=tc_net_dhcps.c -endif ifeq ($(CONFIG_TC_NET_SELECT),y) CSRCS +=tc_net_select.c endif diff --git a/apps/examples/testcase/le_tc/network/network_tc_main.c b/apps/examples/testcase/le_tc/network/network_tc_main.c index 6d286d5..5aded54 100644 --- a/apps/examples/testcase/le_tc/network/network_tc_main.c +++ b/apps/examples/testcase/le_tc/network/network_tc_main.c @@ -98,9 +98,6 @@ int network_tc_main(int argc, char *argv[]) #ifdef CONFIG_TC_NET_DHCPC net_dhcpc_main(); #endif -#ifdef CONFIG_TC_NET_DHCPS - net_dhcps_main(); -#endif #ifdef CONFIG_TC_NET_SELECT net_select_main(); #endif diff --git a/apps/examples/testcase/le_tc/network/tc_net_dhcps.c b/apps/examples/testcase/le_tc/network/tc_net_dhcps.c deleted file mode 100644 index ac5b6ce..0000000 --- a/apps/examples/testcase/le_tc/network/tc_net_dhcps.c +++ /dev/null @@ -1,116 +0,0 @@ -/**************************************************************************** - * - * Copyright 2016 Samsung Electronics All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - * either express or implied. See the License for the specific - * language governing permissions and limitations under the License. - * - ****************************************************************************/ - -/// @file tc_net_dhcps.c -/// @brief Test Case Example for dhcps() API - -#include -#include -#include - -#include -#include -#include -#include -//#include -#include - -#include - -#include "tc_internal.h" - -#include - -#if defined(CONFIG_NET_ETHERNET) && CONFIG_NET_ETHERNET == 1 -#if LWIP_HAVE_LOOPIF -#define NET_DEVNAME "en1" -#else -#define NET_DEVNAME "en0" -#endif -#elif defined(CONFIG_NET_802154) && CONFIG_NET_802154 == 1 -#define NET_DEVNAME "wpan0" -#else -#error "undefined CONFIG_NET_, check your .config" -#endif - -#define SOFT_AP_IPADDR "192.168.0.1\0" -#define SOFT_AP_NETMASK "255.255.255.0\0" -#define SOFT_AP_GW "192.168.0.1\0" - -int net_dhcps_main(void) -{ - struct netif *netif; - ip_addr_t ipaddr, netmask, gateway; - uint8_t key_length; - int channel; - int result; - - netif = netif_find(NET_DEVNAME); - if (netif != NULL) { - ipaddr.addr = inet_addr(SOFT_AP_IPADDR); - netmask.addr = inet_addr(SOFT_AP_NETMASK); - gateway.addr = inet_addr(SOFT_AP_GW); - netif_set_addr(netif, &ipaddr, &netmask, &gateway); - if (netif->ip_addr.addr == inet_addr(SOFT_AP_IPADDR)) { - printf("tc_net_netif_set_addr: PASS\n"); - total_pass++; - } else { - printf("tc_net_netif_set_addr: FAIL\n"); - total_fail++; - } - netif_set_up(netif); - if (netif_is_up(netif)) { - printf("tc_net_dhcps_set_up: PASS\n"); - total_pass++; - } else { - printf("tc_net_dhcps_set_up: FAIL\n"); - total_fail++; - } - } else { - printf("cannot find netif name %s\n", NET_DEVNAME); - } - - if (dhcps_start(netif) == 0) { - printf("tc_net_dhcps_start: PASS\n"); - total_pass++; - } else { - printf("tc_net_dhcps_start: FAIL\n"); - total_fail++; - } - - netif_set_down(netif); - if (netif_is_up(netif)) { - printf("tc_net_netif_set_down: FAIL\n"); - total_fail++; - - } else { - printf("tc_net_netif_set_down: PASS\n"); - total_pass++; - } - - dhcps_stop(netif); - if (netif->dhcps_pcb != NULL) { - printf("tc_net_dhcps_stop: FAIL\n"); - total_fail++; - } else { - printf("tc_net_dhcps_stop: PASS\n"); - total_pass++; - } - - return 0; -} -- 2.7.4