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 13/35] doc: start documentation directory with unittests.cfg doc

2024-04-05 Thread Andrew Jones
On Fri, Apr 05, 2024 at 06:35:14PM +1000, Nicholas Piggin wrote:
> 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 really nice. I only found one thing, which I point out below.

> 
> diff --git a/arm/unittests.cfg b/arm/unittests.cfg
> index fe601cbb1..54cedea28 100644
> --- a/arm/unittests.cfg
> +++ b/arm/unittests.cfg
> @@ -1,28 +1,10 @@
>  
> ##
>  # unittest configuration
>  #
> -# [unittest_name]
> -# file = .flat # Name of the flat file to be used.
> -# smp  =# Number of processors the VM will use
> -## during this test. Use $MAX_SMP to use
> -## the maximum the host supports. Defaults
> -## to one.
> -# extra_params = -append  # Additional parameters used.
> -# arch = arm|arm64   # Select one if the test case is
> -## specific to only one.
> -# groups =   ...   # Used to identify test cases
> -## with run_tests -g ...
> -## Specify group_name=nodefault
> -## to have test not run by
> -## default
> -# accel = kvm|tcg# Optionally specify if test must run with
> -## kvm or tcg. If not specified, then kvm will
> -## be used when available.
> -# timeout =# Optionally specify a timeout.
> -# check = = # check a file for a particular value before running
> -## a test. The check line can contain multiple files
> -## to check separated by a space but each check
> -## parameter needs to be of the form =
> +# arm specifics:
> +#
> +# file = .flat# arm uses .flat files
> +# arch = arm|arm64
>  
> ##
>  
>  #
> diff --git a/docs/unittests.txt b/docs/unittests.txt
> new file mode 100644
> index 0..53e02077c
> --- /dev/null
> +++ b/docs/unittests.txt
> @@ -0,0 +1,89 @@
> +unittests
> +*
> +
> +run_tests.sh is driven by the /unittests.cfg file. That file defines
> +test cases by specifying an executable (target image) under the /
> +directory, and how to run it. This way, for example, a single file can
> +provide multiple test cases by being run with different host configurations
> +and/or different parameters passed to it.
> +
> +Detailed output from run_tests.sh unit tests are stored in files under
> +the logs/ directory.
> +
> +unittests.cfg format
> +
> +
> +# is the comment symbol, all following contents of the line is ignored.
> +
> +Each unit test is defined as with a [unit-test-name] line, followed by

s/ as//

Otherwise,

Reviewed-by: Andrew Jones 

Thanks,
drew