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

Andrew Jones andrew.jones at linux.dev
Sat Apr 6 00:45:27 AEDT 2024


On Fri, Apr 05, 2024 at 06:35:14PM +1000, Nicholas Piggin wrote:
> Consolidate unittests.cfg documentation in one place.
> 
> Suggested-by: Andrew Jones <andrew.jones at linux.dev>
> Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
> ---
>  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 = <name>.flat		# Name of the flat file to be used.
> -# smp  = <num>			# 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 <params...>	# Additional parameters used.
> -# arch = arm|arm64			# Select one if the test case is
> -#					# specific to only one.
> -# groups = <group_name1> <group_name2> ...	# 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 = <duration>		# Optionally specify a timeout.
> -# check = <path>=<value> # 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 <path>=<value>
> +# arm specifics:
> +#
> +# file = <name>.flat            # arm uses .flat files
> +# arch = arm|arm64
>  ##############################################################################
>  
>  #
> diff --git a/docs/unittests.txt b/docs/unittests.txt
> new file mode 100644
> index 000000000..53e02077c
> --- /dev/null
> +++ b/docs/unittests.txt
> @@ -0,0 +1,89 @@
> +unittests
> +*********
> +
> +run_tests.sh is driven by the <arch>/unittests.cfg file. That file defines
> +test cases by specifying an executable (target image) under the <arch>/
> +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 <andrew.jones at linux.dev>

Thanks,
drew


More information about the Linuxppc-dev mailing list