-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
$ ./target/debug/vmtest -k tests/.assets/bzImage-v6.2-empty ls
=> bzImage-v6.2-empty
===> Booting
===> Setting up VM
===> Running command
Cargo.lock
Cargo.toml
docs
LICENSE
Makefile
README.md
scripts
src
target
tests
vmtest.toml
[root@(none) /]#
Note the [root@(none) /]# at the end.
I think it happens b/c of the login terminal in init.sh:
vmtest/src/init/init.sh.template
Line 114 in fd83161
| setsid --ctty --wait /bin/bash --login |
Not sure the best way to suppress that prompt. One option is to use templating engine to ifdef the login shell out. But it'd be preferable to have one codepath for all kernel targets.
Another option is to ignore the final line in ui.rs. But that's a total hack.
A third option is to insert a break after handling CommandEnd:
Lines 207 to 230 in fd83161
| Output::CommandEnd(r) => { | |
| if show_cmd { | |
| stage.expand(true); | |
| } | |
| match r { | |
| Ok(retval) => { | |
| rc = *retval as i32; | |
| // Do not increment the error counter here. The VM ran successfully, the error is convyed by | |
| // the command return code. | |
| // Nevertheless, we still want to make it clear to the user by logging to the console. | |
| if *retval != 0 { | |
| error_out_stage( | |
| &mut stage, | |
| &anyhow!("Command failed with exit code: {}", retval), | |
| ); | |
| } | |
| } | |
| Err(e) => { | |
| error_out_stage(&mut stage, e); | |
| errors += 1; | |
| } | |
| }; | |
| } |
Metadata
Metadata
Assignees
Labels
No labels