summaryrefslogtreecommitdiff
path: root/include/test/test.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-01-17 10:47:28 -0700
committerTom Rini <trini@konsulko.com>2023-01-23 18:11:39 -0500
commit70dd88657b45e5439bf762507f2e1c44c2dee289 (patch)
tree5328a26970a170591162b9b316409e6820069201 /include/test/test.h
parentf43b2df3e068cc7be1aa5656c0c3223e270bba63 (diff)
downloadu-boot-70dd88657b45e5439bf762507f2e1c44c2dee289.tar.gz
sandbox: Allow ethernet bootdevs to be disabled for tests
Most tests don't want these and can create a lot of noise. Add a way to disable them. Use that in tests, with a flag provided to enable them for tests that need this feature. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/test/test.h')
-rw-r--r--include/test/test.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/test/test.h b/include/test/test.h
index 76ec4d739a..beabe9333d 100644
--- a/include/test/test.h
+++ b/include/test/test.h
@@ -71,6 +71,7 @@ enum {
* since it cannot access the flags.
*/
UT_TESTF_MANUAL = BIT(8),
+ UT_TESTF_ETH_BOOTDEV = BIT(9), /* enable Ethernet bootdevs */
};
/**
@@ -194,4 +195,15 @@ static inline bool test_eth_enabled(void)
return enabled;
}
+/* Allow ethernet bootdev to be ignored for testing purposes */
+static inline bool test_eth_bootdev_enabled(void)
+{
+ bool enabled = true;
+
+#ifdef CONFIG_SANDBOX
+ enabled = sandbox_eth_enabled();
+#endif
+ return enabled;
+}
+
#endif /* __TEST_TEST_H */