Skip to content

Introduce new acpi/smbios avocado tests using biosbits

Ani Sinha qemu-devel 8 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest7 patches 1 replyIn review
  2. v610 patches 39 repliesSuperseded
  3. v510 patches 16 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v410 patches11 repliesSuperseded
v3 posting 2/210 patches1 replySuperseded
v3 posting 1/20 of 10 patches6 repliesSuperseded
v211 patches78 repliesSuperseded
v110 of 12 patches107 repliesSuperseded

Changes in v7 from the cover letter

- added "-icount auto" QEMU param in order to remove timing inconsistencies.
- removed smilatency test and related changes. smilatency tests passes.

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7acpi/tests/avocado/bits: initial commit of test scripts that are run by biosbitstests/avocado/acpi-bits/bits-tests/smbios.py2 tests/avocado/acpi-bits/bits-tests/testacpi.py2 tests/avocado/acpi-bits/bits-tests/testcpuid.py2+2796 -00 replies
2/7acpi/tests/avocado/bits: add SPDX license identifiers for bios bits teststests/avocado/acpi-bits/bits-tests/smbios.py2 tests/avocado/acpi-bits/bits-tests/testacpi.py2 tests/avocado/acpi-bits/bits-tests/testcpuid.py2+12 -00 replies
3/7acpi/tests/avocado/bits: disable acpi PSS tests that are failing in biosbitstests/avocado/acpi-bits/bits-tests/testacpi.py2+2 -20 replies
4/7acpi/tests/avocado/bits: add biosbits config file for running bios teststests/avocado/acpi-bits/bits-config/bits-cfg.txt+18 -00 replies
5/7acpi/tests/avocado/bits: add acpi and smbios avocado tests that uses biosbitstests/avocado/acpi-bits.py+396 -00 replies
6/7acpi/tests/avocado/bits/doc: add a doc file to describe the acpi bits testdocs/devel/acpi-bits.rst docs/devel/index-build.rst+146 -01 reply
7/7MAINTAINERS: add myself as the maintainer for acpi biosbits avocado testsMAINTAINERS+7 -00 replies

Reviews trailers per patch

5 of 7 patches have a Reviewed-by or Acked-by.

PatchAlex Bennée
1/7R-b
2/7R-b
3/7R-b
4/7R-b
5/7
6/7
7/7R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v7 thread

Cover letter [PATCH v7 0/7] Introduce new acpi/smbios avocado tests using biosbits

Please see the rst doc file in patch 6 for more details. Sample runs are as follows:

Passed tests:

$ ./tests/venv/bin/avocado run -t acpi tests/avocado
Fetching asset from tests/avocado/acpi-bits.py:AcpiBitsTest.test_acpi_smbios_bits
JOB ID     : e95c7413e996bfb59389839e5ca5105464ef098f
JOB LOG    : /home/anisinha/avocado/job-results/job-2022-10-14T19.15-e95c741/job.log
 (1/1) tests/avocado/acpi-bits.py:AcpiBitsTest.test_acpi_smbios_bits: PASS (33.08 s)
RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB TIME   : 39.18 s
$ ./tests/venv/bin/avocado run ./tests/avocado/acpi-bits.py 
Fetching asset from ./tests/avocado/acpi-bits.py:AcpiBitsTest.test_acpi_smbios_bits
JOB ID     : c6e588594bceb2c5fdbdf45095559c58e4030f9c
JOB LOG    : /home/anisinha/avocado/job-results/job-2022-10-14T19.13-c6e5885/job.log
 (1/1) ./tests/avocado/acpi-bits.py:AcpiBitsTest.test_acpi_smbios_bits: PASS (32.29 s)
RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB TIME   : 39.27 s

When PSS tests are enabled:

$ git diff
tests/avocado/acpi-bits/bits-tests/testacpi.py2 +2 -2
index f818a9cce6..18dc818d62 100644
@@ -40,8 +40,8 @@ import time
 
 def register_tests():
     testsuite.add_test("ACPI _MAT (Multiple APIC Table Entry) under Processor objects", test_mat, submenu="ACPI Tests")
-#    testsuite.add_test("ACPI _PSS (Pstate) table conformance tests", test_pss, submenu="ACPI Tests")
-#    testsuite.add_test("ACPI _PSS (Pstate) runtime tests", test_pstates, submenu="ACPI Tests")
+    testsuite.add_test("ACPI _PSS (Pstate) table conformance tests", test_pss, submenu="ACPI Tests")
+    testsuite.add_test("ACPI _PSS (Pstate) runtime tests", test_pstates, submenu="ACPI Tests")
     testsuite.add_test("ACPI DSDT (Differentiated System Description Table)", test_dsdt, submenu="ACPI Tests")
     testsuite.add_test("ACPI FACP (Fixed ACPI Description Table)", test_facp, submenu="ACPI Tests")
     testsuite.add_test("ACPI HPET (High Precision Event Timer Table)", test_hpet, submenu="ACPI Tests")
$ ./tests/venv/bin/avocado run -t acpi tests/avocado
Fetching asset from tests/avocado/acpi-bits.py:AcpiBitsTest.test_acpi_smbios_bits
JOB ID     : 16a8b8c7f8dc87c4b84f8a2f95135bb63464a71e
JOB LOG    : /home/anisinha/avocado/job-results/job-2022-10-14T22.43-16a8b8c/job.log
 (1/1) tests/avocado/acpi-bits.py:AcpiBitsTest.test_acpi_smbios_bits: FAIL: '1' != '0'\n- 1\n+ 0\n : Some bits tests seems to have failed. Please check the test logs for more info. (33.01 s)
RESULTS    : PASS 0 | ERROR 0 | FAIL 1 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB TIME   : 39.17 s

Changelog:
v7:
- added "-icount auto" QEMU param in order to remove timing inconsistencies.
- removed smilatency test and related changes. smilatency tests passes.

=== SMI latency test ====
Warning: touching the keyboard can affect the results of this test. Starting test. Wait here, I will be back in 15 seconds.
Summary: 1 passed, 0 failed

- updated doc based on Alex's suggestions. Incorporated his other suggestions.
- updated tags.
v6:
- skip test when dependencies (xorriso for example) are not installed.
- skip test when run on a platform other than x86_64.
- move README as an rst file under docs/devel.
- updated tags.
v5:
- fixed bits so that grub-mkrescue is built as a static binary.
- updated the test so that it points to the new bits artifact.
- V=1 now spits out more meaningful information on failure.
- added a check to see if xorriso is installed. If not, the test skips with a meaningful message instructing the user to install it.
- fixed README by removing references to stale instructions and adding updated instructions.
- tags updated.
v4:
- renamed the bits test files as .py2.
- fixed a bug with missing log file parsing. dump bits logs automatically for test failures (no need to re-run with V=1).
- fixed issues with README file and enhanced it.
- cosmetic comment updates.
v3:
- converted the existing test to avocado tests as per the popular recommendation. Added appropriate tags.
- artifact download URL modified based on gitlab-CI URL.

For biosbits repo:
- moved to a gitlab repo with me being the maintainer.
- added .gitlab-ci.yml file to generate the artifacts.
v2:
- a new class of python based tests introduced that is separate from avocado tests or qtests. Can be run by using "make check-pytest".
- acpi biosbits tests are the first tests to use pytest environment.
- bios bits tests now download the bits binary archives from a remote repository if they are not found locally. The test skips if download fails.
- A new environment variable is introduced that can be passed by the tester to specify the location of the bits archives locally. test skips if the bits binaries are not found in that location.
- if pip install of python module fails for whatever reaoson, the test skips.
- misc code fixes including spell check of the README doc. README has been updated as well.
- addition of SPDX license headers to bits test files.
- update MAINTAINERS to reflect the new pytest test class.

For biosbits repo:
- added Dockerfile and build script. Made bios bits build on gcc 11.
https://github.com/ani-sinha/bits/blob/bits-qemu-logging/Dockerfile
https://github.com/ani-sinha/bits/blob/bits-qemu-logging/build-artifacts.sh
The build script generates the zip archive and tarball used by the test.

v1: initial patchset. uses qtest to implement the bios bits tests.

Cc Qemu Devel <[email protected]>
Cc Daniel P. Berrangé <[email protected]>
Cc Paolo Bonzini <[email protected]>
Cc Maydell Peter <[email protected]>
Cc John Snow <[email protected]>
Cc Thomas Huth <[email protected]>
Cc Alex Bennée <[email protected]>
Cc Igor Mammedov <[email protected]>
Cc Michael Tsirkin <[email protected]>

Ani Sinha (7):
acpi/tests/avocado/bits: initial commit of test scripts that are run
by biosbits
acpi/tests/avocado/bits: add SPDX license identifiers for bios bits
tests
acpi/tests/avocado/bits: disable acpi PSS tests that are failing in
biosbits
acpi/tests/avocado/bits: add biosbits config file for running bios
tests
acpi/tests/avocado/bits: add acpi and smbios avocado tests that uses
biosbits
acpi/tests/avocado/bits/doc: add a doc file to describe the acpi bits
test
MAINTAINERS: add myself as the maintainer for acpi biosbits avocado
tests

 MAINTAINERS                                   |    7 +
 docs/devel/acpi-bits.rst                      |  145 +
 docs/devel/index-build.rst                    |    1 +
 tests/avocado/acpi-bits.py                    |  396 +++
 .../acpi-bits/bits-config/bits-cfg.txt        |   18 +
 tests/avocado/acpi-bits/bits-tests/smbios.py2 | 2434 +++++++++++++++++
 .../avocado/acpi-bits/bits-tests/testacpi.py2 |  287 ++
 .../acpi-bits/bits-tests/testcpuid.py2        |   87 +
 8 files changed, 3375 insertions(+)
 create mode 100644 docs/devel/acpi-bits.rst
 create mode 100644 tests/avocado/acpi-bits.py
 create mode 100644 tests/avocado/acpi-bits/bits-config/bits-cfg.txt
 create mode 100644 tests/avocado/acpi-bits/bits-tests/smbios.py2
 create mode 100644 tests/avocado/acpi-bits/bits-tests/testacpi.py2
 create mode 100644 tests/avocado/acpi-bits/bits-tests/testcpuid.py2
Signature · 1 line
2.34.1