summaryrefslogtreecommitdiff
path: root/test/boot/bootdev.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2024-09-18 13:07:19 -0600
committerTom Rini <trini@konsulko.com>2024-09-18 13:07:19 -0600
commitc17805e19b9335e1fb5295c81b59eddf88d1b9ec (patch)
tree0e4cbc44f392b9f2e53d1e38e107ec630c0267c9 /test/boot/bootdev.c
parent650883a568653f37ee4ff43beda56152b594a49c (diff)
parent017b441b2e3c879b20bcac496369f1213c4bdbcd (diff)
Merge patch series "Fix various bugs"
Simon Glass <sjg@chromium.org> says: This series includes the patches needed to make make the EFI 'boot' test work. That test has now been split off into a separate series along with the EFI patches. This series fixes these problems: - sandbox memory-mapping conflict with PCI - the fix for that causes the mbr test to crash as it sets up pointers instead of addresses for its 'mmc' commands - the mmc and read commands which cast addresses to pointers - a tricky bug to do with USB keyboard and stdio - a few other minor things
Diffstat (limited to 'test/boot/bootdev.c')
-rw-r--r--test/boot/bootdev.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/test/boot/bootdev.c b/test/boot/bootdev.c
index 23ebc61ff52..c635d06ec25 100644
--- a/test/boot/bootdev.c
+++ b/test/boot/bootdev.c
@@ -16,13 +16,6 @@
#include <test/ut.h>
#include "bootstd_common.h"
-/* Allow reseting the USB-started flag */
-#if defined(CONFIG_USB_HOST) || defined(CONFIG_USB_GADGET)
-extern bool usb_started;
-#else
-#include <usb.h>
-#endif
-
/* Check 'bootdev list' command */
static int bootdev_test_cmd_list(struct unit_test_state *uts)
{
@@ -197,7 +190,7 @@ static int bootdev_test_order(struct unit_test_state *uts)
test_set_skip_delays(true);
/* Start up USB which gives us three additional bootdevs */
- usb_started = false;
+ bootstd_reset_usb();
ut_assertok(run_command("usb start", 0));
/*
@@ -313,7 +306,7 @@ static int bootdev_test_prio(struct unit_test_state *uts)
test_set_eth_enable(false);
/* Start up USB which gives us three additional bootdevs */
- usb_started = false;
+ bootstd_reset_usb();
ut_assertok(run_command("usb start", 0));
ut_assertok(bootstd_test_drop_bootdev_order(uts));
@@ -352,7 +345,7 @@ static int bootdev_test_hunter(struct unit_test_state *uts)
{
struct bootstd_priv *std;
- usb_started = false;
+ bootstd_reset_usb();
test_set_skip_delays(true);
/* get access to the used hunters */
@@ -392,7 +385,7 @@ static int bootdev_test_cmd_hunt(struct unit_test_state *uts)
struct bootstd_priv *std;
test_set_skip_delays(true);
- usb_started = false;
+ bootstd_reset_usb();
/* get access to the used hunters */
ut_assertok(bootstd_get_priv(&std));
@@ -520,7 +513,7 @@ BOOTSTD_TEST(bootdev_test_bootable, UTF_DM | UTF_SCAN_FDT);
/* Check hunting for bootdev of a particular priority */
static int bootdev_test_hunt_prio(struct unit_test_state *uts)
{
- usb_started = false;
+ bootstd_reset_usb();
test_set_skip_delays(true);
ut_assertok(bootdev_hunt_prio(BOOTDEVP_4_SCAN_FAST, false));
@@ -548,7 +541,7 @@ static int bootdev_test_hunt_label(struct unit_test_state *uts)
struct bootstd_priv *std;
int mflags;
- usb_started = false;
+ bootstd_reset_usb();
/* get access to the used hunters */
ut_assertok(bootstd_get_priv(&std));