qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

Acceptance tests: add make targets to download images

The newly introduced "boot linux" tests make use of Linux images that
are larger than usual, and fall into what Avocado calls "vmimages",
and can be referred to by name, version and architecture.

The images can be downloaded automatically during the test. But, to
make for more reliable test results, this introduces a target that
will download the vmimages for the architectures that have been
configured and are available for the currently used distro (Fedora
31).

Signed-off-by: Cleber Rosa <crosa@redhat.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
[Cleber: implemented suggestions by Alex, download message, check-venv target]
Message-Id: <20200317141654.29355-4-crosa@redhat.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>

+18 -2
+18 -2
tests/Makefile.include
··· 20 20 @echo " $(MAKE) check-venv Creates a Python venv for tests" 21 21 @echo " $(MAKE) check-clean Clean the tests and related data" 22 22 @echo 23 + @echo " $(MAKE) get-vm-images Downloads all images used by acceptance tests, according to configured targets (~350 MB each, 1.5 GB max)" 24 + @echo 23 25 @echo 24 26 @echo "The variable SPEED can be set to control the gtester speed setting." 25 27 @echo "Default options are -k and (for $(MAKE) V=1) --verbose; they can be" ··· 889 891 890 892 check-venv: $(TESTS_VENV_DIR) 891 893 892 - check-acceptance: check-venv $(TESTS_RESULTS_DIR) 894 + FEDORA_31_ARCHES_CANDIDATES=$(patsubst ppc64,ppc64le,$(TARGETS)) 895 + FEDORA_31_ARCHES := x86_64 aarch64 ppc64le s390x 896 + FEDORA_31_DOWNLOAD=$(filter $(FEDORA_31_ARCHES),$(FEDORA_31_ARCHES_CANDIDATES)) 897 + 898 + # download one specific Fedora 31 image 899 + get-vm-image-fedora-31-%: check-venv 900 + $(call quiet-command, \ 901 + $(TESTS_VENV_DIR)/bin/python -m avocado vmimage get \ 902 + --distro=fedora --distro-version=31 --arch=$*, \ 903 + "AVOCADO", "Downloading acceptance tests VM image for $*") 904 + 905 + # download all vm images, according to defined targets 906 + get-vm-images: check-venv $(patsubst %,get-vm-image-fedora-31-%, $(FEDORA_31_DOWNLOAD)) 907 + 908 + check-acceptance: check-venv $(TESTS_RESULTS_DIR) get-vm-images 893 909 $(call quiet-command, \ 894 910 $(TESTS_VENV_DIR)/bin/python -m avocado \ 895 911 --show=$(AVOCADO_SHOW) run --job-results-dir=$(TESTS_RESULTS_DIR) \ ··· 900 916 901 917 # Consolidated targets 902 918 903 - .PHONY: check-block check-qapi-schema check-qtest check-unit check check-clean 919 + .PHONY: check-block check-qapi-schema check-qtest check-unit check check-clean get-vm-images 904 920 check-qapi-schema: check-tests/qapi-schema/frontend check-tests/qapi-schema/doc-good.texi 905 921 check-qtest: $(patsubst %,check-qtest-%, $(QTEST_TARGETS)) 906 922 ifeq ($(CONFIG_TOOLS),y)