[RFC PATCH] tests/vm: make --interactive (and therefor DEBUG=1) unconditional

Alex Bennée posted 1 patch 4 years, 5 months ago
Test asan passed
Test checkpatch passed
Test FreeBSD passed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Test docker-quick@centos7 passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20191112151051.2205-1-alex.bennee@linaro.org
tests/vm/basevm.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[RFC PATCH] tests/vm: make --interactive (and therefor DEBUG=1) unconditional
Posted by Alex Bennée 4 years, 5 months ago
While the concepts of only dropping to ssh if a test fails is nice it
is more useful for this to be unconditional. You usually just want to
get the build up and running and then noodle around debugging or
attempting to replicate.

Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/vm/basevm.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
index 91a9226026d..0b8c1b26576 100755
--- a/tests/vm/basevm.py
+++ b/tests/vm/basevm.py
@@ -403,7 +403,7 @@ def main(vmcls):
     exitcode = 0
     if vm.ssh(*cmd) != 0:
         exitcode = 3
-    if exitcode != 0 and args.interactive:
+    if args.interactive:
         vm.ssh()
 
     if not args.snapshot:
-- 
2.20.1


Re: [RFC PATCH] tests/vm: make --interactive (and therefor DEBUG=1) unconditional
Posted by Eric Blake 4 years, 5 months ago
On 11/12/19 9:10 AM, Alex Bennée wrote:

In the subject: s/therefor/therefore/

> While the concepts of only dropping to ssh if a test fails is nice it

s/concepts/concept/

> is more useful for this to be unconditional. You usually just want to
> get the build up and running and then noodle around debugging or
> attempting to replicate.
> 
> Cc: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   tests/vm/basevm.py | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
> index 91a9226026d..0b8c1b26576 100755
> --- a/tests/vm/basevm.py
> +++ b/tests/vm/basevm.py
> @@ -403,7 +403,7 @@ def main(vmcls):
>       exitcode = 0
>       if vm.ssh(*cmd) != 0:
>           exitcode = 3
> -    if exitcode != 0 and args.interactive:
> +    if args.interactive:
>           vm.ssh()
>   
>       if not args.snapshot:
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org