Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

103 LTS Testing with external projects and test suites #5766

Closed
9 tasks done
richtja opened this issue Sep 13, 2023 · 25 comments
Closed
9 tasks done

103 LTS Testing with external projects and test suites #5766

richtja opened this issue Sep 13, 2023 · 25 comments

Comments

@richtja
Copy link
Contributor

richtja commented Sep 13, 2023

We know about a number of projects with public tests using Avocado. To validate the migration procedures from the Avocado version they are using to 103.0 LTS, we can try to run those with the (to be) 103.0 LTS.

Examples of projects are here: https://avocado-framework.readthedocs.io/en/91.0/misc/index.html

IIRC, for 92.0 LTS, we sent early announcements to those project's mailing lists, and also ran tests for QEMU, DAOS, Falco, Avocado-VT and Avocado-I2N (with @pevogam help) Libvirt, SoS, POK, Avocado-misc-tests.

  • QEMU
  • DAOS
  • Falco
  • Avocado-vt
  • Avocado-I2N
  • Libvirt
  • Sos
  • POK
  • Avocado-misc-tests
@mr-avocado mr-avocado bot moved this to Triage in Default project Sep 13, 2023
@richtja richtja moved this from Triage to Short Term (Current Q) Backlog in Default project Sep 13, 2023
@pevogam
Copy link
Contributor

pevogam commented Sep 13, 2023

Hi @richtja I would love to test but would prefer to do so with the remote spawner branch merged (meaning I have to adapt all points noted by @clebergnu but then in order to do so I need #5649 to be closed as explained in the comments there. Just letting you know about the state of my testing.

@richtja
Copy link
Contributor Author

richtja commented Sep 13, 2023

Hi @pevogam, thank you very much that you plan to participate in testing again. About the #5649 AFAIK @clebergnu put a priority on that one and we still plan to have remote spawner branch merged before LTS.

We still have some issues in milestone 103 and we will start testing when those are addressed, so there is still a time. I opened this issue now, so that we won't forget about testing those projects before release.

@pevogam
Copy link
Contributor

pevogam commented Sep 13, 2023

In fact thank you @richtja for opening this issue so that I can also subscribe to it and track the overall progress on the LTS release from early on.

@clebergnu clebergnu moved this from Short Term (Current Q) Backlog to In progress in Default project Nov 10, 2023
@clebergnu
Copy link
Contributor

FYI, I've started the testing for QEMU.

@pevogam
Copy link
Contributor

pevogam commented Nov 13, 2023

I am also already using most recent master (but perhaps 1-2 weeks old at the time of writing this, updated every once and a while) in all of my test runs in order to test the release on the side.

@clebergnu
Copy link
Contributor

Out of testing QEMU it was found: #5801

@clebergnu
Copy link
Contributor

@chloerh @yanan-fu @cliping would it be possible for you to help with Avocado-VT testing? We want to make sure it's working as expected with the latest master branch, which will soon become 103.0 LTS.

Thanks!

@pevogam
Copy link
Contributor

pevogam commented Dec 11, 2023

Hi @clebergnu I tested the most recent source over the weekend and the HTML report (which has some nice new colors for the test statuses) doesn't seem to filter out tests by status any longer (tests are only shown with the ALL status filter). Should I report an issue about this or are you already aware of this in an issue I can track?

@richtja
Copy link
Contributor Author

richtja commented Dec 11, 2023

Hi @clebergnu I tested the most recent source over the weekend and the HTML report (which has some nice new colors for the test statuses) doesn't seem to filter out tests by status any longer (tests are only shown with the ALL status filter). Should I report an issue about this or are you already aware of this in an issue I can track?

Hi @pevogam, please open an issue, we are not aware of that. Thank you.

@pevogam
Copy link
Contributor

pevogam commented Dec 11, 2023

Hi @clebergnu I tested the most recent source over the weekend and the HTML report (which has some nice new colors for the test statuses) doesn't seem to filter out tests by status any longer (tests are only shown with the ALL status filter). Should I report an issue about this or are you already aware of this in an issue I can track?

Hi @pevogam, please open an issue, we are not aware of that. Thank you.

Alright, #5828.

@clebergnu
Copy link
Contributor

Marking QEMU as done, based on the testing such as https://gitlab.com/cleber.gnu/qemu/-/commit/bee33ecd33d1c6d03d29e2577009ea6d71808ed2

@clebergnu
Copy link
Contributor

clebergnu commented Dec 21, 2023

Taking on SOS testing. I'm covering two types of tests are run with Avocado:

  1. unittests (PYTHONPATH=. avocado run tests/unittests/)
  2. stageone tests (PYTHONPATH=tests/ avocado run --max-parallel-tasks=1 -t stageone tests/{cleaner,collect,report,vendor}_tests)

@clebergnu
Copy link
Contributor

Marking SOS as done, with the following notes. There's some API changes on software_manager since 94.0 (which is currently in use):

diff --git a/tests/collect_tests/help_output_tests.py b/tests/collect_tests/help_output_tests.py
index 258bb8d7..2d74a78e 100644
--- a/tests/collect_tests/help_output_tests.py
+++ b/tests/collect_tests/help_output_tests.py
@@ -10,13 +10,10 @@ import glob
 import os
 import re
 
-from avocado.utils import software_manager
+from avocado.utils.software_manager.manager import SoftwareManager
 from sos_tests import StageOneOutputTest, SOS_REPO_ROOT, skipIf
 
-installer = software_manager
-sm = installer.SoftwareManager()
-
-PEXPECT_PRESENT = sm.check_installed('python3-pexpect')
+PEXPECT_PRESENT = SoftwareManager().check_installed('python3-pexpect')
 
 
 class CollectHelpOutputTest(StageOneOutputTest):
diff --git a/tests/sos_tests.py b/tests/sos_tests.py
index d15395f0..398da4bd 100644
--- a/tests/sos_tests.py
+++ b/tests/sos_tests.py
@@ -10,8 +10,9 @@
 from avocado.core.exceptions import TestSkipError
 from avocado.core.output import LOG_UI
 from avocado import Test
-from avocado.utils import archive, process, distro, software_manager
+from avocado.utils import archive, process, distro
 from avocado.utils.cpu import get_arch
+from avocado.utils.software_manager import manager, distro_packages
 from fnmatch import fnmatch
 
 import glob
@@ -771,8 +772,7 @@ class StageTwoReportTest(BaseSoSReportTest):
         self.end_of_test_case = False
         # seems awkward, but check_installed() and remove() are not exposed
         # together with install_distro_packages()
-        self.installer = software_manager
-        self.sm = self.installer.SoftwareManager()
+        self.sm = manager.SoftwareManager()
 
         for dist in self.packages:
             if isinstance(self.packages[dist], str):
@@ -842,7 +842,7 @@ class StageTwoReportTest(BaseSoSReportTest):
             self._strip_installed_packages()
             if not self.packages[self.local_distro]:
                 return
-            installed = self.installer.install_distro_packages(self.packages)
+            installed = distro_packages.install_distro_packages(self.packages)
             if not installed:
                 raise Exception(
                     "Unable to install requested packages %s"

The --max-parallel-tasks=1 has been used in my testing.

Other than that, everything seems to be working great.

@clebergnu
Copy link
Contributor

Taking on testing of Avocado-VT.

@pevogam
Copy link
Contributor

pevogam commented Dec 22, 2023

@clebergnu Would you mind pinging me when merging the remote spawner branch so I can do one final test spin with everything included and send my final confirmation here?

@clebergnu
Copy link
Contributor

clebergnu commented Dec 22, 2023

About Avocado-VT:

CI builds have been running in Cirrus with the latest development Avocado. The latest run can be seen at: https://cirrus-ci.com/build/4549218879143936 . All the "avocado_devel" jobs use the latest Avocado development version. On this build, it can be seen:

  Resolved https://github.com/avocado-framework/avocado to commit 09821c293a1440980610b68a4cf7b32c84316ba8

The QEMU based jobs run actual tp-qemu tests, and not just dry-runs. Example of the results:

RESULTS    : PASS 3 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0

I'll follow up with some extended testing, but so far, overall compatibility seems to be covered.

@pevogam
Copy link
Contributor

pevogam commented Dec 22, 2023

About Avocado-VT:

CI builds have been running in Cirrus with the latest development Avocado. The latest run can be seen at: https://cirrus-ci.com/build/4549218879143936 . All the "avocado_devel" jobs use the latest Avocado development version. On this build, it can be seen:

  Resolved https://github.com/avocado-framework/avocado to commit 09821c293a1440980610b68a4cf7b32c84316ba8

The QEMU based jobs run actual tp-qemu tests, and not just dry-runs. Example of the results:

RESULTS    : PASS 3 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0

I'll follow up with some extended testing, but so far, overall compatibility seems to be covered.

As our plugin is also using VT tests and most of the Avocado VT infrastructure under the hood, I can confirm this - so far all VT tests have been passing just fine for us too.

Most importantly, our test suite contains thousands of VT tests with various needs when it comes to both Avocado and Avocado VT.

@clebergnu
Copy link
Contributor

I've picked a few extra Avocado-VT tests to run locally:

$ avocado run --vt-extra-params pre_command='' --vt-extra-params display=none boot reboot type_specific.io-github-autotest-qemu.x86_cpu_model.host type_specific.io-github-autotest-qemu.boot_cpu_model.cpu_host type_specific.io-github-autotest-qemu.migrate.default.tcp.default type_specific.io-github-autotest-qemu.migrate.with_file_transfer.exec.gzip_exec.default 
JOB ID     : e82c125a7880c24ae3de437340fc69c806e20c50
JOB LOG    : /home/cleber/avocado/job-results/job-2023-12-22T06.44-e82c125/job.log
 (1/6) io-github-autotest-qemu.boot: STARTED
 (1/6) io-github-autotest-qemu.boot: PASS (17.89 s)
 (2/6) io-github-autotest-qemu.reboot: STARTED
 (2/6) io-github-autotest-qemu.reboot: PASS (229.60 s)
 (3/6) type_specific.io-github-autotest-qemu.x86_cpu_model.host: STARTED
 (3/6) type_specific.io-github-autotest-qemu.x86_cpu_model.host: PASS (27.75 s)
 (4/6) type_specific.io-github-autotest-qemu.boot_cpu_model.cpu_host: STARTED
 (4/6) type_specific.io-github-autotest-qemu.boot_cpu_model.cpu_host: ERROR: module 'virttest.utils_misc' has no attribute 'get_cpu_vendor' (0.72 s)
 (5/6) type_specific.io-github-autotest-qemu.migrate.default.tcp.default: STARTED
 (5/6) type_specific.io-github-autotest-qemu.migrate.default.tcp.default: PASS (39.69 s)
 (6/6) type_specific.io-github-autotest-qemu.migrate.with_file_transfer.exec.gzip_exec.default: STARTED
 (6/6) type_specific.io-github-autotest-qemu.migrate.with_file_transfer.exec.gzip_exec.default: PASS (54.68 s)
RESULTS    : PASS 5 | ERROR 1 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML   : /home/cleber/avocado/job-results/job-2023-12-22T06.44-e82c125/results.html
JOB TIME   : 380.75 s

Test summary:
4-type_specific.io-github-autotest-qemu.boot_cpu_model.cpu_host: ERROR

The error is really caused by an outdated use of the virttest.utils_misc. I've posted a fix at autotest/tp-qemu#3923. With that:

$ avocado run --vt-extra-params pre_command='' --vt-extra-params display=none type_specific.io-github-autotest-qemu.boot_cpu_model.cpu_host 
JOB ID     : 7992909fccd5c002c3c1df5ee24a0abdcffb2f93
JOB LOG    : /home/cleber/avocado/job-results/job-2023-12-22T06.54-7992909/job.log
 (1/1) type_specific.io-github-autotest-qemu.boot_cpu_model.cpu_host: STARTED
 (1/1) type_specific.io-github-autotest-qemu.boot_cpu_model.cpu_host: PASS (13.01 s)
RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML   : /home/cleber/avocado/job-results/job-2023-12-22T06.54-7992909/results.html
JOB TIME   : 16.22 s

I'm marking Avocado-VT compatibility check as complete, based on @pevogam, CI and my own testing.

@pevogam
Copy link
Contributor

pevogam commented Dec 22, 2023

Alright, will do overnight testing with the lastest master branch but I anticipate things to go smoothly since there aren't that many changes since the last time we included a recent upstream source.

@clebergnu
Copy link
Contributor

Marking POK testing as done. Output of testing follows:

~/src/pok/testsuite/unitary_tests# make 
avocado run --max-parallel-tasks=1 --xunit report.xml --mux-yaml testconfig.yaml -- /root/src/pok/testsuite/unitary_tests/../../misc/execution_test.py
JOB ID     : 660e1c74d84989405489e9d0c4adb1d3ccf30d3d
JOB LOG    : /root/avocado/job-results/job-2023-12-22T16.52-660e1c7/job.log
 (1/8) /root/src/pok/testsuite/unitary_tests/../../misc/execution_test.py:ExecutionTest.test;run-platform-x86_gcc-tests-hello_world-139f: STARTED
 (1/8) /root/src/pok/testsuite/unitary_tests/../../misc/execution_test.py:ExecutionTest.test;run-platform-x86_gcc-tests-hello_world-139f: PASS (9.05 s)
 (2/8) /root/src/pok/testsuite/unitary_tests/../../misc/execution_test.py:ExecutionTest.test;run-platform-x86_gcc-tests-test_modulo_div_64-605b: STARTED
 (2/8) /root/src/pok/testsuite/unitary_tests/../../misc/execution_test.py:ExecutionTest.test;run-platform-x86_gcc-tests-test_modulo_div_64-605b: PASS (10.14 s)
 (3/8) /root/src/pok/testsuite/unitary_tests/../../misc/execution_test.py:ExecutionTest.test;run-platform-x86_gcc-tests-test_assert-7aff: STARTED
 (3/8) /root/src/pok/testsuite/unitary_tests/../../misc/execution_test.py:ExecutionTest.test;run-platform-x86_gcc-tests-test_assert-7aff: PASS (9.64 s)
 (4/8) /root/src/pok/testsuite/unitary_tests/../../misc/execution_test.py:ExecutionTest.test;run-platform-x86_gcc-tests-limit_threads-36b1: STARTED
 (4/8) /root/src/pok/testsuite/unitary_tests/../../misc/execution_test.py:ExecutionTest.test;run-platform-x86_gcc-tests-limit_threads-36b1: PASS (16.49 s)
 (5/8) /root/src/pok/testsuite/unitary_tests/../../misc/execution_test.py:ExecutionTest.test;run-platform-x86_gcc-tests-semaphore_sched-8a67: STARTED
 (5/8) /root/src/pok/testsuite/unitary_tests/../../misc/execution_test.py:ExecutionTest.test;run-platform-x86_gcc-tests-semaphore_sched-8a67: PASS (35.27 s)
 (6/8) /root/src/pok/testsuite/unitary_tests/../../misc/execution_test.py:ExecutionTest.test;run-platform-x86_gcc-tests-test_printf-4ad9: STARTED
 (6/8) /root/src/pok/testsuite/unitary_tests/../../misc/execution_test.py:ExecutionTest.test;run-platform-x86_gcc-tests-test_printf-4ad9: PASS (10.18 s)
 (7/8) /root/src/pok/testsuite/unitary_tests/../../misc/execution_test.py:ExecutionTest.test;run-platform-x86_gcc-tests-test_events-b73d: STARTED
 (7/8) /root/src/pok/testsuite/unitary_tests/../../misc/execution_test.py:ExecutionTest.test;run-platform-x86_gcc-tests-test_events-b73d: PASS (28.41 s)
 (8/8) /root/src/pok/testsuite/unitary_tests/../../misc/execution_test.py:ExecutionTest.test;run-platform-x86_gcc-tests-test_mutexes-1635: STARTED
 (8/8) /root/src/pok/testsuite/unitary_tests/../../misc/execution_test.py:ExecutionTest.test;run-platform-x86_gcc-tests-test_mutexes-1635: PASS (29.00 s)
RESULTS    : PASS 8 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB TIME   : 165.89 s

@pevogam
Copy link
Contributor

pevogam commented Dec 23, 2023

Sorry for some delay, the overnight testing went fine. Here is a summary from a minimal run:

RESULTS    : PASS 73 | ERROR 0 | FAIL 0 | SKIP 2 | WARN 0 | INTERRUPT 0 | CANCEL 1
JOB HTML   : /mnt/local/results/job-2023-12-23T23.17-820d624/results.html
JOB TIME   : 2470.28 s

Whoever is capable can cross of "Avocado I2N" from the checklist above.

@clebergnu
Copy link
Contributor

I've run a number of avocado-misc-tests, and found no issues with APIs or general behavior of Avocado. The avocado-misc-tests team do a pretty good job of keeping the code current with the latest avocado.

@clebergnu
Copy link
Contributor

For DAOS, I've tried my best, but the environment needed to get any of the tests running simply exceeded what I was capable of setting up. I've reached out to the DAOS team and asked them to get back to us when they feel like an Avocado version bump is due.

@clebergnu
Copy link
Contributor

Falco dropped all Python based tests, migrating to a different repo, see falcosecurity/falco#2716. Marking it off from the list.

@clebergnu
Copy link
Contributor

LibVirt(TCK) usage of Avocado is limited to running the tests with the TAP runner. Tested a few tests such as:

[libvirt-tck]$ avocado --config avocado.config run ./scripts/domain/050-transient-lifecycle.t 
JOB ID     : cf30bdad7bf32111c37e8f264483fc82dc278947
JOB LOG    : /home/cleber/avocado/job-results/job-2023-12-27T09.32-cf30bda/job.log
 (1/1) ./scripts/domain/050-transient-lifecycle.t: STARTED
 (1/1) ./scripts/domain/050-transient-lifecycle.t: PASS (67.91 s)
RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML   : /home/cleber/avocado/job-results/job-2023-12-27T09.32-cf30bda/results.html
JOB TIME   : 71.99 s

@github-project-automation github-project-automation bot moved this from In progress to Done 103 in Default project Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

3 participants