aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerome Forissier <jerome.forissier@linaro.org>2024-05-24 18:20:03 +0200
committerTom Rini <trini@konsulko.com>2024-05-25 08:43:10 -0600
commit6ed6cf0de1d58ce0ff8a914975150d085df3ec20 (patch)
tree208cfab238875676ae6867e3053c42d6f3a703b9
parentd50973f60fc24959c0f516f01d049898d4b9013f (diff)
downloadu-boot-6ed6cf0de1d58ce0ff8a914975150d085df3ec20.zip
u-boot-6ed6cf0de1d58ce0ff8a914975150d085df3ec20.tar.gz
u-boot-6ed6cf0de1d58ce0ff8a914975150d085df3ec20.tar.bz2
test: dm: dsa, eth: disable tests when CONFIG_NET_LWIP=y
Some sandbox tests make strong assumptions on how the network stack is implemented. For example, the ping tests assume that ARP resolution occurs upon sending out the ICMP packet. This is not always the case with the lwIP stack which can cache ARP information. Therefore, disable these tests when CONFIG_NET_LWIP is enabled. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
-rw-r--r--test/dm/dsa.c2
-rw-r--r--test/dm/eth.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/test/dm/dsa.c b/test/dm/dsa.c
index c857106..147e2a4 100644
--- a/test/dm/dsa.c
+++ b/test/dm/dsa.c
@@ -59,6 +59,7 @@ static int dm_test_dsa_probe(struct unit_test_state *uts)
DM_TEST(dm_test_dsa_probe, UT_TESTF_SCAN_FDT);
+#if !defined(CONFIG_NET_LWIP)
/* This test sends ping requests with the local address through each DSA port
* via the sandbox DSA master Eth.
*/
@@ -80,3 +81,4 @@ static int dm_test_dsa(struct unit_test_state *uts)
}
DM_TEST(dm_test_dsa, UT_TESTF_SCAN_FDT);
+#endif /* !defined(CONFIG_NET_LWIP) */
diff --git a/test/dm/eth.c b/test/dm/eth.c
index 820b8cb..e044d5d 100644
--- a/test/dm/eth.c
+++ b/test/dm/eth.c
@@ -169,6 +169,7 @@ static int dm_test_ip6_make_lladdr(struct unit_test_state *uts)
DM_TEST(dm_test_ip6_make_lladdr, UT_TESTF_SCAN_FDT);
#endif
+#if !defined(CONFIG_NET_LWIP)
static int dm_test_eth(struct unit_test_state *uts)
{
net_ping_ip = string_to_ip("1.1.2.2");
@@ -297,6 +298,7 @@ static int dm_test_eth_act(struct unit_test_state *uts)
return 0;
}
DM_TEST(dm_test_eth_act, UT_TESTF_SCAN_FDT);
+#endif /* !CONFIG_NET_LWIP */
/* Ensure that all addresses are loaded properly */
static int dm_test_ethaddr(struct unit_test_state *uts)
@@ -331,6 +333,7 @@ static int dm_test_ethaddr(struct unit_test_state *uts)
}
DM_TEST(dm_test_ethaddr, UT_TESTF_SCAN_FDT);
+#if !defined(CONFIG_NET_LWIP)
/* The asserts include a return on fail; cleanup in the caller */
static int _dm_test_eth_rotate1(struct unit_test_state *uts)
{
@@ -615,6 +618,7 @@ static int dm_test_eth_async_ping_reply(struct unit_test_state *uts)
}
DM_TEST(dm_test_eth_async_ping_reply, UT_TESTF_SCAN_FDT);
+#endif /* !CONFIG_NET_LWIP */
#if IS_ENABLED(CONFIG_IPV6_ROUTER_DISCOVERY)