Re: [kvm-unit-tests PATCH v8 06/35] gitlab-ci: Run migration selftest on s390x and powerpc

2024-04-08 Thread Nico Boehr
Quoting Nicholas Piggin (2024-04-05 10:35:07)
> The migration harness is complicated and easy to break so CI will
> be helpful.
> 
> Signed-off-by: Nicholas Piggin 
> ---
>  .gitlab-ci.yml  | 32 +++-
>  s390x/unittests.cfg |  8 
>  2 files changed, 31 insertions(+), 9 deletions(-)
> 
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index ff34b1f50..60b3cdfd2 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
[...]
> @@ -135,7 +147,7 @@ build-riscv64:
>  build-s390x:
>   extends: .outoftree_template
>   script:
> - - dnf install -y qemu-system-s390x gcc-s390x-linux-gnu
> + - dnf install -y qemu-system-s390x gcc-s390x-linux-gnu nmap-ncat
>   - mkdir build
>   - cd build
>   - ../configure --arch=s390x --cross-prefix=s390x-linux-gnu-
> @@ -161,6 +173,8 @@ build-s390x:
>sclp-1g
>sclp-3g
>selftest-setup
> +  selftest-migration-kvm

We're running under TCG in the Gitlab CI. I'm a little bit confused why
we're running a KVM-only test here.


Re: [kvm-unit-tests PATCH v8 13/35] doc: start documentation directory with unittests.cfg doc

2024-04-08 Thread Nico Boehr
Quoting Nicholas Piggin (2024-04-05 10:35:14)
> Consolidate unittests.cfg documentation in one place.
> 
> Suggested-by: Andrew Jones 
> Signed-off-by: Nicholas Piggin 
> ---
>  arm/unittests.cfg | 26 ++---
>  docs/unittests.txt| 89 +++
>  powerpc/unittests.cfg | 25 ++--
>  riscv/unittests.cfg   | 26 ++---
>  s390x/unittests.cfg   | 18 ++---
>  x86/unittests.cfg | 26 ++---
>  6 files changed, 107 insertions(+), 103 deletions(-)
>  create mode 100644 docs/unittests.txt

This is a nice improvement, thanks!

Reviewed-by: Nico Boehr 


Re: [kvm-unit-tests PATCH v8 03/35] migration: Add a migrate_skip command

2024-04-08 Thread Nico Boehr
Quoting Nicholas Piggin (2024-04-05 10:35:04)
[...]
> diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash
> index 39419d4e2..4a1aab48d 100644
> --- a/scripts/arch-run.bash
> +++ b/scripts/arch-run.bash
[...]
> @@ -179,8 +189,11 @@ run_migration ()
> # Wait for test exit or further migration messages.
> if ! seen_migrate_msg ${src_out} ;  then
> sleep 0.1
> -   else
> +   elif grep -q "Now migrate the VM" < ${src_out} ; then
> do_migration || return $?
> +   elif [ $skip_migration -eq 0 ] && grep -q "Skipped VM 
> migration" < ${src_out} ; then
> +   echo > ${src_infifo} # Resume src and carry on.
> +   break;

If I understand the code correctly, this simply makes the test PASS when
migration is skipped, am I wrong?

If so, can we set ret=77 here so we get a nice SKIP?


Re: [kvm-unit-tests PATCH v8 04/35] (arm|s390): Use migrate_skip in test cases

2024-04-08 Thread Nico Boehr
Quoting Nicholas Piggin (2024-04-05 10:35:05)
> Have tests use the new migrate_skip command in skip paths, rather than
> calling migrate_once to prevent harness reporting an error.
> 
> s390x/migration.c adds a new command that looks like it was missing
> previously.
> 
> Reviewed-by: Thomas Huth 
> Signed-off-by: Nicholas Piggin 

Thanks for finding the missing skip!

Reviewed-by: Nico Boehr