From cb8970092f2cd5f1eaadf7d15d28cb905067e07f Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 24 Jul 2021 15:14:39 -0600 Subject: sandbox: Reduce keyed autoboot delay The autoboot tests are a recent addition to U-Boot, providing much-needed coverage in this area. A side effect of the keyed autoboot test is that this feature is enabled in sandbox always. This changes the autoboot prompt and confuses the pytests. Some tests become slower, for example the vboot tests take about 27s now instead of 3s. We don't actually need this feature enabled to be able to run the tests. Add a switch to allow sandbox to turn it on and off as needed. Use this in the one test that needs it. Add a command-line flag in case this is desired in normal use. Signed-off-by: Simon Glass Fixes: 25c8b9f298e ("test: add first autoboot unit tests") Reviewed-by: Steffen Jaeckel --- arch/sandbox/cpu/start.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'arch/sandbox/cpu/start.c') diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c index 777db4e9522..a74f5ec7ba0 100644 --- a/arch/sandbox/cpu/start.c +++ b/arch/sandbox/cpu/start.c @@ -400,6 +400,15 @@ static int sandbox_cmdline_cb_signals(struct sandbox_state *state, SANDBOX_CMDLINE_OPT_SHORT(signals, 'S', 0, "Handle signals (such as SIGSEGV) in sandbox"); +static int sandbox_cmdline_cb_autoboot_keyed(struct sandbox_state *state, + const char *arg) +{ + state->autoboot_keyed = true; + + return 0; +} +SANDBOX_CMDLINE_OPT(autoboot_keyed, 0, "Allow keyed autoboot"); + static void setup_ram_buf(struct sandbox_state *state) { /* Zero the RAM buffer if we didn't read it, to keep valgrind happy */ -- cgit v1.2.3