Skip to contentSkip to conversation

Acceptance Tests: restore the use of target related information

PATCH In review Cleber Rosa 4 participants 10 messages Feb 25, 2021 – Mar 3, 2021

lore
Share & tools
lore
#0 lore raw

cover Acceptance Tests: restore the use of target related information

This addresses two issues, restoring them to their previous behavior:

The first one, reported by Thomas Huth, a test timeout (and thus a job failed) on CI. The test was interrupted because of a download timeout. The download timeout happened due to the fact that "make get-vm-images" is currently broken and the images matching the QEMU targets are not being downloaded before the Avocado job.

The second one is the use of the same target related information, but to filter out tests that don't have a matching "arch" tag. So, if one is not building, say "aarch64-softmmu", tests tagged with "arch:
aarch64" won't even make into the Avocado job.

For review purposes, the following job that shows the download of ppc64le, s390x and x86_64 (but not aarch64) Fedora 31 images on a acceptance-system-centos job:

https://gitlab.com/cleber.gnu/qemu/-/jobs/1057043012#L63

And the following shows the download of the aarch64 Fedora 31 image (but not any other) on a acceptance-system-ubuntu job:

https://gitlab.com/cleber.gnu/qemu/-/jobs/1057043005#L61

Cleber Rosa (2):
Acceptance Tests: restore downloading of VM images Acceptance Tests: restore filtering of tests by target arch

 tests/Makefile.include | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Signature · 1 line
2.25.4
#7 lore raw

PATCH 2/2 Acceptance Tests: restore filtering of tests by target arch

Previously, tests were being filtered by the matching target architectures to be built. The benefit, compared to the current situation, is a more concise test job that won't show tests canceled because a matching QEMU binary was not found (those tests won't even be attempted).

---
 tests/Makefile.include | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/Makefile.include +1 -1
index dbd53a9de6..799e47169c 100644
@@ -92,7 +92,7 @@ TESTS_RESULTS_DIR=$(BUILD_DIR)/tests/results
 # Any number of command separated loggers are accepted.  For more
 # information please refer to "avocado --help".
 AVOCADO_SHOW=app
-AVOCADO_TAGS=$(patsubst %-softmmu,-t arch:%, $(filter %-softmmu,$(TARGET_DIRS)))
+AVOCADO_TAGS=$(patsubst %-softmmu,-t arch:%, $(filter %-softmmu,$(TARGETS)))
 
 $(TESTS_VENV_DIR): $(TESTS_VENV_REQ)
 	$(call quiet-command, \
Signature · 1 line
2.25.4
#1 lore raw

PATCH 1/2 Acceptance Tests: restore downloading of VM images

In reply to Cleber Rosa

The "get-vm-images" target defined in tests/Makefile.include is a prerequisite for "check-acceptance", so that those files get downloaded before the Avocado job even starts.

It looks like on c401c058a1c a TARGETS variable was introduced with a different content than it was previously coming from the main Makefile. From that point on, the "get-vm-images" succeed without doing anything because there was no matching architecture to download.

This restores the download of images (that match targets to be built) before the job starts, eliminating downloads and their associated failures during the tests.

---
 tests/Makefile.include | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/Makefile.include +2 -1
index d34254fb29..dbd53a9de6 100644
@@ -109,7 +109,8 @@ $(TESTS_RESULTS_DIR):
 
 check-venv: $(TESTS_VENV_DIR)
 
-FEDORA_31_ARCHES_CANDIDATES=$(patsubst ppc64,ppc64le,$(TARGETS))
+FEDORA_31_ARCHES_TARGETS=$(patsubst %-softmmu,%, $(filter %-softmmu,$(TARGETS)))
+FEDORA_31_ARCHES_CANDIDATES=$(patsubst ppc64,ppc64le,$(FEDORA_31_ARCHES_TARGETS))
 FEDORA_31_ARCHES := x86_64 aarch64 ppc64le s390x
 FEDORA_31_DOWNLOAD=$(filter $(FEDORA_31_ARCHES),$(FEDORA_31_ARCHES_CANDIDATES))
 
Signature · 1 line
2.25.4
#2 lore raw

Re: [PATCH 1/2] Acceptance Tests: restore downloading of VM images

Quoted 8 lines · Cleber Rosa

The "get-vm-images" target defined in tests/Makefile.include is a prerequisite for "check-acceptance", so that those files get downloaded before the Avocado job even starts.

It looks like on c401c058a1c a TARGETS variable was introduced with a different content than it was previously coming from the main Makefile. From that point on, the "get-vm-images" succeed without doing anything because there was no matching architecture to download.

Any idea about how to detect such side effects (tests silently disabled) automatically?

#3 lore raw

Re: [PATCH 1/2] Acceptance Tests: restore downloading of VM images

Quoted 5 lines · Philippe Mathieu-Daudé
Quoted 4 lines · Cleber Rosa

The "get-vm-images" target defined in tests/Makefile.include is a prerequisite for "check-acceptance", so that those files get downloaded before the Avocado job even starts.

Quoted 8 lines
Quoted 4 lines

It looks like on c401c058a1c a TARGETS variable was introduced with a different content than it was previously coming from the main Makefile. From that point on, the "get-vm-images" succeed without doing anything because there was no matching architecture to download.

Any idea about how to detect such side effects (tests silently disabled) automatically?

It wasn't really that any tests were disabled... they all continued to run. In this case it was a broken make rule that caused the download of the images, ahead of time, to not be performed.

But your question is still valid and something that could happen. The best answer I have is that all job results could and should also be persisted in a structured way that is succeptible to being queried. Then on top of that, you can build queries to show stability metrics, regressions, etc.

To that regards, I can speak about three possibilities:

1) Avocado has support for Fedora's resultsdb[1][2]

2) Because the Acceptance tests are already communicating the test results to GitLab (via junit), using the GitLab API that lets you query the detailed test results

3) In addition to that, Marcelo (cc'd here) has written an Avocado plugin that will export test resutls suitable to be used on a datawarehouse tool developed by the Continuous Kernel Integration project[3]. This is not generally available at the moment, but should be available soon.

Regards,
- Cleber.

[1] - https://taskotron.fedoraproject.org/resultsdb/results
[2] - https://avocado-framework.readthedocs.io/en/85.0/plugins/optional/results.html#resultsdb-plugin
[3] - https://cki-project.org

Reviewed-by on v1 1/2
#5 lore raw

Re: [PATCH 1/2] Acceptance Tests: restore downloading of VM images

In reply to Cleber Rosa
Quoted 9 lines · Cleber Rosa

The "get-vm-images" target defined in tests/Makefile.include is a prerequisite for "check-acceptance", so that those files get downloaded before the Avocado job even starts.

It looks like on c401c058a1c a TARGETS variable was introduced with a different content than it was previously coming from the main Makefile. From that point on, the "get-vm-images" succeed without doing anything because there was no matching architecture to download.

Quoted 8 lines

This restores the download of images (that match targets to be built) before the job starts, eliminating downloads and their associated failures during the tests.

---
  tests/Makefile.include | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 15 lines
tests/Makefile.include +2 -1
index d34254fb29..dbd53a9de6 100644
@@ -109,7 +109,8 @@ $(TESTS_RESULTS_DIR):
 
  check-venv: $(TESTS_VENV_DIR)
 
-FEDORA_31_ARCHES_CANDIDATES=$(patsubst ppc64,ppc64le,$(TARGETS))
+FEDORA_31_ARCHES_TARGETS=$(patsubst %-softmmu,%, $(filter %-softmmu,$(TARGETS)))
+FEDORA_31_ARCHES_CANDIDATES=$(patsubst ppc64,ppc64le,$(FEDORA_31_ARCHES_TARGETS))
  FEDORA_31_ARCHES := x86_64 aarch64 ppc64le s390x
  FEDORA_31_DOWNLOAD=$(filter $(FEDORA_31_ARCHES),$(FEDORA_31_ARCHES_CANDIDATES))
 
Reviewed-by on v1 2/2
#8 lore raw

Re: [PATCH 2/2] Acceptance Tests: restore filtering of tests by target arch

In reply to Cleber Rosa
Quoted 10 lines · Cleber Rosa

Previously, tests were being filtered by the matching target architectures to be built. The benefit, compared to the current situation, is a more concise test job that won't show tests canceled because a matching QEMU binary was not found (those tests won't even be attempted).

---
  tests/Makefile.include | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines
tests/Makefile.include +1 -1
index dbd53a9de6..799e47169c 100644
@@ -92,7 +92,7 @@ TESTS_RESULTS_DIR=$(BUILD_DIR)/tests/results
  # Any number of command separated loggers are accepted.  For more
  # information please refer to "avocado --help".
  AVOCADO_SHOW=app
-AVOCADO_TAGS=$(patsubst %-softmmu,-t arch:%, $(filter %-softmmu,$(TARGET_DIRS)))
+AVOCADO_TAGS=$(patsubst %-softmmu,-t arch:%, $(filter %-softmmu,$(TARGETS)))
 
  $(TESTS_VENV_DIR): $(TESTS_VENV_REQ)
  	$(call quiet-command, \
#4 lore raw

Re: [PATCH 1/2] Acceptance Tests: restore downloading of VM images

In reply to Cleber Rosa
Quoted 39 lines · Cleber Rosa
Quoted 5 lines · Philippe Mathieu-Daudé
Quoted 4 lines · Cleber Rosa

The "get-vm-images" target defined in tests/Makefile.include is a prerequisite for "check-acceptance", so that those files get downloaded before the Avocado job even starts.

Quoted 8 lines
Quoted 4 lines

It looks like on c401c058a1c a TARGETS variable was introduced with a different content than it was previously coming from the main Makefile. From that point on, the "get-vm-images" succeed without doing anything because there was no matching architecture to download.

Any idea about how to detect such side effects (tests silently disabled) automatically?

It wasn't really that any tests were disabled... they all continued to run. In this case it was a broken make rule that caused the download of the images, ahead of time, to not be performed.

But your question is still valid and something that could happen. The best answer I have is that all job results could and should also be persisted in a structured way that is succeptible to being queried. Then on top of that, you can build queries to show stability metrics, regressions, etc.

To that regards, I can speak about three possibilities:

1) Avocado has support for Fedora's resultsdb[1][2]

2) Because the Acceptance tests are already communicating the test results to GitLab (via junit), using the GitLab API that lets you query the detailed test results

3) In addition to that, Marcelo (cc'd here) has written an Avocado plugin that will export test resutls suitable to be used on a datawarehouse tool developed by the Continuous Kernel Integration project[3]. This is not generally available at the moment, but should be available soon.

Quoted 6 lines

Regards,
- Cleber.

[1] - https://taskotron.fedoraproject.org/resultsdb/results
[2] - https://avocado-framework.readthedocs.io/en/85.0/plugins/optional/results.html#resultsdb-plugin
[3] - https://cki-project.org

Wow this is thrilling!

Maybe we could use fosshost to run a resultsdb VM.

Reviewed-by on v1 1/2
#6 lore raw

Re: [PATCH 1/2] Acceptance Tests: restore downloading of VM images

In reply to Cleber Rosa
Quoted 10 lines · Cleber Rosa

The "get-vm-images" target defined in tests/Makefile.include is a prerequisite for "check-acceptance", so that those files get downloaded before the Avocado job even starts.

It looks like on c401c058a1c a TARGETS variable was introduced with a different content than it was previously coming from the main Makefile. From that point on, the "get-vm-images" succeed without doing anything because there was no matching architecture to download.

Quoted 9 lines

This restores the download of images (that match targets to be built) before the job starts, eliminating downloads and their associated failures during the tests.

---
 tests/Makefile.include | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by on v1 2/2
#9 lore raw

Re: [PATCH 2/2] Acceptance Tests: restore filtering of tests by target arch

In reply to Cleber Rosa
Quoted 7 lines · Cleber Rosa

Previously, tests were being filtered by the matching target architectures to be built. The benefit, compared to the current situation, is a more concise test job that won't show tests canceled because a matching QEMU binary was not found (those tests won't even be attempted).

Quoted 5 lines
---
 tests/Makefile.include | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)