diff options
Diffstat (limited to 'scripts/check-qemu-install')
-rwxr-xr-x | scripts/check-qemu-install | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/scripts/check-qemu-install b/scripts/check-qemu-install index dfb772d8..8a981cc3 100755 --- a/scripts/check-qemu-install +++ b/scripts/check-qemu-install @@ -94,6 +94,7 @@ parser.add_argument('--sbtest', help='Execute Secure Boot tests', action='store_true', default=False) parser.add_argument('--qemu-cmd', help='Only generate QEMU launch command', action='store_true', default=False) +parser.add_argument('--sandbox', help='Interactive sandbox mode', action='store_true', default=False) args = parser.parse_args() @@ -524,6 +525,26 @@ try: c.expect(op_mode_prompt) ################################################# + # Sandbox mode + ################################################# + + if args.sandbox: + log.info("SANDBOX: now you are in control!") + c.sendline("") + c.logfile = None + c.interact() + if not args.keep: + log.info("SANDBOX: removing disk file: %s" % args.disk) + try: + os.remove(args.disk) + if diskname_raid: + os.remove(diskname_raid) + except Exception: + pass + log.info("SANDBOX: end") + exit(0) + + ################################################# # Basic Configmode/Opmode switch ################################################# log.info('Basic CLI configuration mode test') @@ -544,6 +565,11 @@ try: c.sendline('systemd-detect-virt') c.expect('kvm') c.expect(op_mode_prompt) + # Ensure ephemeral key is loaded + vyos_kernel_key = 'VyOS build time autogenerated kernel key' + c.sendline(f'show log kernel | match "{vyos_kernel_key}"') + c.expect(f'.*{vyos_kernel_key}.*') + c.expect(op_mode_prompt) ################################################# # Executing test-suite @@ -558,7 +584,7 @@ try: def verify_config(): # Verify encrypted config is loaded c.sendline('show config commands | cat') - c.expect('set system option performance \'latency\'') + c.expect('set system option performance \'network-latency\'') c.expect('set system option reboot-on-panic') c.expect(op_mode_prompt) @@ -595,7 +621,7 @@ try: log.info('Adding nodes for encrypted config test') c.sendline('configure') c.expect(cfg_mode_prompt) - c.sendline('set system option performance latency') + c.sendline('set system option performance network-latency') c.expect(cfg_mode_prompt) c.sendline('set system option reboot-on-panic') c.expect(cfg_mode_prompt) @@ -755,7 +781,7 @@ try: if args.match: # Remove tests that we don't want to run match_str = '-o '.join([f'-name "test_*{name}*.py" ' for name in args.match.split("|")]).strip() - c.sendline(f'sudo find /usr/libexec/vyos/tests/smoke/cli/test_* -type f ! \( {match_str} \) -delete') + c.sendline(f'sudo find /usr/libexec/vyos/tests/smoke -maxdepth 2 -type f -name test_* ! \( {match_str} \) -delete') c.expect(op_mode_prompt) if args.no_interfaces: # remove interface tests as they consume a lot of time |