diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2022-04-25 18:41:44 +0200 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2022-04-25 18:41:44 +0200 |
commit | 0c39b21ff6b343a06624b89e9f863d01463b00a3 (patch) | |
tree | 81d0ae493a1f124867f52b731aeebb3a70f439bc | |
parent | e4da23da1e1239c5cca575c4a5689d0f7397c6c8 (diff) | |
download | mbuto-0c39b21ff6b343a06624b89e9f863d01463b00a3.tar mbuto-0c39b21ff6b343a06624b89e9f863d01463b00a3.tar.gz mbuto-0c39b21ff6b343a06624b89e9f863d01463b00a3.tar.bz2 mbuto-0c39b21ff6b343a06624b89e9f863d01463b00a3.tar.lz mbuto-0c39b21ff6b343a06624b89e9f863d01463b00a3.tar.xz mbuto-0c39b21ff6b343a06624b89e9f863d01463b00a3.tar.zst mbuto-0c39b21ff6b343a06624b89e9f863d01463b00a3.zip |
mbuto: kselftests: If all tests pass, terminate the guest
This is nice for demos but should also be quite practical.
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rwxr-xr-x | mbuto | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -309,8 +309,12 @@ profile_kselftests() { echo 3 > /proc/sys/kernel/printk echo "Press s for shell, any other key to run selftests" read a - [ "${a}" != "s" ] && ./run_kselftest.sh '"${__run_args}"' - echo o > /proc/sysrq-trigger + if [ "${a}" != "s" ]; then + if ./run_kselftest.sh '"${__run_args}"'; then + echo "All tests passed, shutting down guest..." + echo o > /proc/sysrq-trigger + fi + fi ' for __f in $(${FIND} ${__testpath}kselftest_install/ -executable); do |