summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2023-04-22 12:37:23 -1000
committerChris Johns <chrisj@rtems.org>2023-04-23 08:58:54 +1000
commit9014a954cb5b2d998d54c83bcf1fe89d14f14673 (patch)
tree73e425fc5a37f64bac44b8a2bdd02dab7a893972 /testsuites
parentwaf: Build header files before anything else (diff)
downloadrtems-net-legacy-9014a954cb5b2d998d54c83bcf1fe89d14f14673.tar.bz2
tests/resolv: Fix test configuration
Diffstat (limited to 'testsuites')
-rwxr-xr-xtestsuites/include/network-config.h.in6
-rw-r--r--testsuites/resolve/init.c3
-rw-r--r--testsuites/support/net-legacy-config.c6
3 files changed, 12 insertions, 3 deletions
diff --git a/testsuites/include/network-config.h.in b/testsuites/include/network-config.h.in
index 756e3b5..e61dcce 100755
--- a/testsuites/include/network-config.h.in
+++ b/testsuites/include/network-config.h.in
@@ -38,4 +38,10 @@
#define NET_CFG_GATEWAY_IP "@NET_CFG_GATEWAY_IP@"
+#define NET_CFG_DNS_IP "@NET_CFG_DNS_IP@"
+
+#define NET_CFG_DOMAINNAME "@NET_CFG_DOMAINNAME@"
+
+#define NET_CFG_NTP_IP "@NET_CFG_NTP_IP@"
+
#endif /* _TEST_NETWORK_CONFIG_H_ */
diff --git a/testsuites/resolve/init.c b/testsuites/resolve/init.c
index beb0e9a..da5adb1 100644
--- a/testsuites/resolve/init.c
+++ b/testsuites/resolve/init.c
@@ -113,9 +113,6 @@ static rtems_task Init(rtems_task_argument argument)
rtems_test_assert(rtems_net_legacy_config(&rtems_bsdnet_config));
- rtems_bsdnet_config.domainname = "gemini.edu";
- rtems_bsdnet_config.name_server[0] = "10.1.5.8";
-
rv = rtems_bsdnet_initialize_network();
rtems_test_assert(rv == 0);
diff --git a/testsuites/support/net-legacy-config.c b/testsuites/support/net-legacy-config.c
index bb512d2..1ae2468 100644
--- a/testsuites/support/net-legacy-config.c
+++ b/testsuites/support/net-legacy-config.c
@@ -25,6 +25,9 @@ static char* boot_prot = NET_CFG_BOOT_PROT;
static char* ip = NET_CFG_SELF_IP;
static char* netmask = NET_CFG_NETMASK;
static char* gateway = NET_CFG_GATEWAY_IP;
+static char* domainname = NET_CFG_DOMAINNAME;
+static char* dns_ip = NET_CFG_DNS_IP;
+static char* ntp = NET_CFG_NTP_IP;
static struct rtems_bsdnet_ifconfig ifcfg = {
RTEMS_BSP_NETWORK_DRIVER_NAME,
RTEMS_BSP_NETWORK_DRIVER_ATTACH
@@ -38,6 +41,9 @@ bool rtems_net_legacy_config(struct rtems_bsdnet_config* bsd) {
ifcfg.ip_address = ip;
ifcfg.ip_netmask = netmask;
bsd->gateway = gateway;
+ bsd->domainname = domainname;
+ bsd->name_server[0] = dns_ip;
+ bsd->ntp_server[0] = ntp;
if (strcmp(boot_prot, "static") == 0) {
bsd->bootp = NULL;
} else if (strcmp(boot_prot, "bootp") == 0) {