mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-07-01 18:06:18 +08:00
testsuite: Add DEFAULT_NETWORK_NO_INTERFACE_0
This commit is contained in:
parent
263c947a2f
commit
04a64b17d8
@ -99,6 +99,7 @@ default_network_ifconfig_lo0(void)
|
|||||||
assert(exit_code == EX_OK);
|
assert(exit_code == EX_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef DEFAULT_NETWORK_NO_INTERFACE_0
|
||||||
static void
|
static void
|
||||||
default_network_ifconfig_hwif0(char *ifname)
|
default_network_ifconfig_hwif0(char *ifname)
|
||||||
{
|
{
|
||||||
@ -150,6 +151,7 @@ default_network_route_hwif0(char *ifname)
|
|||||||
assert(exit_code == EXIT_SUCCESS);
|
assert(exit_code == EXIT_SUCCESS);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef DEFAULT_NETWORK_DHCPCD_ENABLE
|
#ifdef DEFAULT_NETWORK_DHCPCD_ENABLE
|
||||||
static void
|
static void
|
||||||
@ -220,10 +222,12 @@ static void
|
|||||||
Init(rtems_task_argument arg)
|
Init(rtems_task_argument arg)
|
||||||
{
|
{
|
||||||
rtems_status_code sc;
|
rtems_status_code sc;
|
||||||
|
#ifdef DEFAULT_NETWORK_NO_INTERFACE_0
|
||||||
#ifdef DEFAULT_NETWORK_NO_STATIC_IFCONFIG
|
#ifdef DEFAULT_NETWORK_NO_STATIC_IFCONFIG
|
||||||
char ifnamebuf[IF_NAMESIZE];
|
char ifnamebuf[IF_NAMESIZE];
|
||||||
#endif
|
#endif
|
||||||
char *ifname;
|
char *ifname;
|
||||||
|
#endif
|
||||||
|
|
||||||
puts("*** " TEST_NAME " TEST ***");
|
puts("*** " TEST_NAME " TEST ***");
|
||||||
|
|
||||||
@ -247,11 +251,13 @@ Init(rtems_task_argument arg)
|
|||||||
|
|
||||||
rtems_bsd_initialize();
|
rtems_bsd_initialize();
|
||||||
|
|
||||||
|
#ifdef DEFAULT_NETWORK_NO_INTERFACE_0
|
||||||
#ifdef DEFAULT_NETWORK_NO_STATIC_IFCONFIG
|
#ifdef DEFAULT_NETWORK_NO_STATIC_IFCONFIG
|
||||||
ifname = if_indextoname(1, &ifnamebuf[0]);
|
ifname = if_indextoname(1, &ifnamebuf[0]);
|
||||||
assert(ifname != NULL);
|
assert(ifname != NULL);
|
||||||
#else
|
#else
|
||||||
ifname = NET_CFG_INTERFACE_0;
|
ifname = NET_CFG_INTERFACE_0;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Let the callout timer allocate its resources */
|
/* Let the callout timer allocate its resources */
|
||||||
@ -259,8 +265,10 @@ Init(rtems_task_argument arg)
|
|||||||
assert(sc == RTEMS_SUCCESSFUL);
|
assert(sc == RTEMS_SUCCESSFUL);
|
||||||
|
|
||||||
default_network_ifconfig_lo0();
|
default_network_ifconfig_lo0();
|
||||||
|
#ifdef DEFAULT_NETWORK_NO_INTERFACE_0
|
||||||
default_network_ifconfig_hwif0(ifname);
|
default_network_ifconfig_hwif0(ifname);
|
||||||
default_network_route_hwif0(ifname);
|
default_network_route_hwif0(ifname);
|
||||||
|
#endif
|
||||||
default_network_dhcpcd();
|
default_network_dhcpcd();
|
||||||
|
|
||||||
test_main();
|
test_main();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user