tests/functional: various improvements wrt assets/scratch files
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest32 patches 4 repliesIn review
- v231 patches 32 repliesSuperseded
- v122 patches 40 repliesSuperseded
Changes in v3 from the cover letter
* Rebase and update for recently changed/added tests
* Drop mistaken submodule update
* Fix syntax error with has_cmd usage
* Fix undefined variable error in virtio gpu tests
* Fix whitespace issues
* Fix typos
* Add patch to fix execute perms on some recent tests
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/32 | tests/functional: add execute permission to aspeed teststests/ tests/ tests/ +4 more | +0 | 1 reply | |
| 2/32 | tests/functional: remove many unused importstests/ tests/ tests/ +13 more | +7 | 0 replies | |
| 3/32 | tests/functional: resolve str(Asset) to cache file pathtests/ | +3 | 1 reply | |
| 4/32 | tests/functional: remove duplicated 'which' function impltests/ tests/ tests/ +1 more | +13 | 0 replies | |
| 5/32 | tests/functional: simplify 'which' implementationtests/ | +1 | 0 replies | |
| 6/32 | tests/functional: drop 'tesseract_available' helpertests/ tests/ | +4 | 1 reply | |
| 7/32 | tests/functional: introduce some helpful decoratorstests/ tests/ | +110 | 0 replies | |
| 8/32 | tests/functional: switch to new test skip decoratorstests/ tests/ tests/ +13 more | +61 | 0 replies | |
| 9/32 | tests/functional: drop 'has_cmd' and 'has_cmds' helperstests/ tests/ tests/ | +9 | 0 replies | |
| 10/32 | tests/functional: add helpers for building file pathstests/ | +95 | 0 replies | |
| 11/32 | tests/functional: switch over to using self.log_file(...)tests/ tests/ | +5 | 0 replies | |
| 12/32 | tests/functional: switch over to using self.build_file(...)tests/ tests/ tests/ +1 more | +9 | 0 replies | |
| 13/32 | tests/functional: switch over to using self.data_file(...)tests/ | +7 | 0 replies | |
| 14/32 | tests/functional: switch over to using self.scratch_file()tests/ tests/ tests/ +42 more | +118 | 0 replies | |
| 15/32 | tests/functional: remove redundant 'rmtree' calltests/ | +0 | 0 replies | |
| 16/32 | tests/functional: move archive handling into new archive.py filetests/ tests/ | +34 | 0 replies | |
| 17/32 | tests/functional: move uncompress handling into new uncompress.py filetests/ tests/ | +38 | 0 replies | |
| 18/32 | tests/functional: add common zip_extract helpertests/ | +8 | 0 replies | |
| 19/32 | tests/functional: add common deb_extract helpertests/ tests/ | +17 | 0 replies | |
| 20/32 | tests/functional: let cpio_extract accept filenamestests/ | +11 | 0 replies | |
| 21/32 | tests/functional: add a generalized archive_extracttests/ tests/ | +59 | 0 replies | |
| 22/32 | tests/functional: add 'archive_extract' to QemuBaseTesttests/ | +32 | 0 replies | |
| 23/32 | tests/functional: convert tests to new archive_extract helpertests/ tests/ tests/ +34 more | +134 | 0 replies | |
| 24/32 | tests/functional: add a generalized uncompress helpertests/ tests/ | +48 | 0 replies | |
| 25/32 | tests/functional: add 'uncompress' to QemuBaseTesttests/ | +25 | 0 replies | |
| 26/32 | tests/functional: convert tests to new uncompress helpertests/ tests/ tests/ +11 more | +31 | 0 replies | |
| 27/32 | tests/functional: drop back compat imports from utils.pytests/ | +0 | 0 replies | |
| 28/32 | tests/functional: replace 'run_cmd' with subprocess helperstests/ tests/ tests/ +3 more | +41 | 0 replies | |
| 29/32 | tests/functional: remove now unused 'run_cmd' helpertests/ tests/ | +1 | 0 replies | |
| 30/32 | tests/functional: skip tests if assets are not availabletests/ tests/ | +18 | 0 replies | |
| 31/32 | tests/functional: ignore errors when caching assets, except for 404tests/ | +13 | 0 replies | |
| 32/32 | MAINTAINERS: add myself as reviewer for functional test suiteMAINTAINERS | +1 | 1 reply |
Reviews trailers per patch
All 32 patches have a Reviewed-by or Acked-by.
| Patch | Thomas Huth | Richard Henderson |
|---|---|---|
| 1/32 | R-b | |
| 2/32 | R-b | |
| 3/32 | R-b | |
| 4/32 | R-b | |
| 5/32 | R-b | R-b |
| 6/32 | R-b | |
| 7/32 | R-b | |
| 8/32 | R-b | |
| 9/32 | R-b | |
| 10/32 | R-b | |
| 11/32 | R-b | |
| 12/32 | R-b | |
| 13/32 | R-b | |
| 14/32 | R-b | |
| 15/32 | R-b | |
| 16/32 | R-b | |
| 17/32 | R-b | |
| 18/32 | R-b | |
| 19/32 | R-b | |
| 20/32 | R-b | |
| 21/32 | R-b | |
| 22/32 | R-b | |
| 23/32 | R-b | |
| 24/32 | R-b | |
| 25/32 | R-b | |
| 26/32 | R-b | |
| 27/32 | R-b | |
| 28/32 | R-b | |
| 29/32 | R-b | |
| 30/32 | R-b | |
| 31/32 | R-b | |
| 32/32 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 00/32] tests/functional: various improvements wrt assets/scratch files
This series is an attempt to bring a little more guaranteed order to asset and scratch file handling in the functional tests. The main highlights are:
* Add custom @skipXXXXX decorators for common scenarios present in QEMU tests
* Add helpers for creating file paths for various well known types of data, or well known locations, to avoid adhoc path manipulation
* Add helpers to simplify uncompressing and extracting archives, from files downloaded as assets
The series overall has a neutral diffstat, but if you look at just test files, as opposed to the shared infra, you'll see a significant reduction of lines of code in the tests, and I believe its easier to read them with less boilerplate.
This is based on:
https://gitlab.com/thuth/qemu.git tags/pull-request-2024-12-11
Changes in v3:
* Rebase and update for recently changed/added tests
* Drop mistaken submodule update
* Fix syntax error with has_cmd usage
* Fix undefined variable error in virtio gpu tests
* Fix whitespace issues
* Fix typos
* Add patch to fix execute perms on some recent tests
Changes in v2:
* Put archive & uncompress helpers in their own files
* Have archive_extract & uncompress directly handle assets and format detection
* Drop has_cmd/has_cmds helpers in favour of 'which'
* Drop obsolete tessract version check
* Simplify 'which' impl
* Replace 'run_cmd' with direct use of subprocess
* Remove even more unused imports
* Gracefully handle asset download failure by skipping tests
* Drop redundant hardcoded ./contrib path in virtio GPU test
* Various docs improvements to decorators
* Drop formatting change to import statements
Daniel P. Berrangé (32):
tests/functional: add execute permission to aspeed tests tests/functional: remove many unused imports tests/functional: resolve str(Asset) to cache file path tests/functional: remove duplicated 'which' function impl tests/functional: simplify 'which' implementation tests/functional: drop 'tesseract_available' helper tests/functional: introduce some helpful decorators tests/functional: switch to new test skip decorators tests/functional: drop 'has_cmd' and 'has_cmds' helpers tests/functional: add helpers for building file paths tests/functional: switch over to using self.log_file(...) tests/functional: switch over to using self.build_file(...) tests/functional: switch over to using self.data_file(...) tests/functional: switch over to using self.scratch_file() tests/functional: remove redundant 'rmtree' call tests/functional: move archive handling into new archive.py file tests/functional: move uncompress handling into new uncompress.py file tests/functional: add common zip_extract helper tests/functional: add common deb_extract helper tests/functional: let cpio_extract accept filenames tests/functional: add a generalized archive_extract tests/functional: add 'archive_extract' to QemuBaseTest tests/functional: convert tests to new archive_extract helper tests/functional: add a generalized uncompress helper tests/functional: add 'uncompress' to QemuBaseTest tests/functional: convert tests to new uncompress helper tests/functional: drop back compat imports from utils.py tests/functional: replace 'run_cmd' with subprocess helpers tests/functional: remove now unused 'run_cmd' helper tests/functional: skip tests if assets are not available tests/functional: ignore errors when caching assets, except for 404
MAINTAINERS: add myself as reviewer for functional test suite
MAINTAINERS | 1 + tests/functional/qemu_test/__init__.py | 9 +- tests/functional/qemu_test/archive.py | 117 ++++++++++ tests/functional/qemu_test/asset.py | 26 ++- tests/functional/qemu_test/cmd.py | 76 ++----- tests/functional/qemu_test/decorators.py | 107 +++++++++ tests/functional/qemu_test/linuxkernel.py | 29 +-- tests/functional/qemu_test/tesseract.py | 21 +- tests/functional/qemu_test/testcase.py | 205 ++++++++++++++++-- tests/functional/qemu_test/tuxruntest.py | 19 +- tests/functional/qemu_test/uncompress.py | 83 +++++++ tests/functional/qemu_test/utils.py | 45 ---- tests/functional/test_aarch64_aspeed.py | 23 +- tests/functional/test_aarch64_raspi3.py | 9 +- tests/functional/test_aarch64_raspi4.py | 21 +- tests/functional/test_aarch64_sbsaref.py | 12 +- .../functional/test_aarch64_sbsaref_alpine.py | 1 - .../test_aarch64_sbsaref_freebsd.py | 1 - tests/functional/test_aarch64_virt.py | 14 +- tests/functional/test_acpi_bits.py | 124 ++++------- tests/functional/test_alpha_clipper.py | 6 +- tests/functional/test_arm_aspeed_ast1030.py | 18 +- tests/functional/test_arm_aspeed_ast2500.py | 8 +- tests/functional/test_arm_aspeed_ast2600.py | 14 +- tests/functional/test_arm_aspeed_palmetto.py | 0 tests/functional/test_arm_aspeed_rainier.py | 11 +- tests/functional/test_arm_aspeed_romulus.py | 0 tests/functional/test_arm_bflt.py | 13 +- tests/functional/test_arm_bpim2u.py | 44 ++-- tests/functional/test_arm_canona1100.py | 10 +- tests/functional/test_arm_collie.py | 2 +- tests/functional/test_arm_cubieboard.py | 40 ++-- tests/functional/test_arm_emcraft_sf2.py | 2 +- tests/functional/test_arm_integratorcp.py | 28 +-- tests/functional/test_arm_orangepi.py | 60 +++-- tests/functional/test_arm_raspi2.py | 21 +- tests/functional/test_arm_smdkc210.py | 18 +- tests/functional/test_arm_sx1.py | 2 +- tests/functional/test_arm_vexpress.py | 10 +- tests/functional/test_linux_initrd.py | 7 +- tests/functional/test_m68k_mcf5208evb.py | 8 +- tests/functional/test_m68k_nextcube.py | 24 +- tests/functional/test_m68k_q800.py | 5 +- .../functional/test_microblaze_s3adsp1800.py | 9 +- .../test_microblazeel_s3adsp1800.py | 10 +- tests/functional/test_mips64el_fuloong2e.py | 10 +- tests/functional/test_mips64el_loongson3v.py | 8 +- tests/functional/test_mips64el_malta.py | 45 ++-- tests/functional/test_mips_malta.py | 19 +- tests/functional/test_mipsel_malta.py | 24 +- tests/functional/test_or1k_sim.py | 7 +- tests/functional/test_ppc64_e500.py | 7 +- tests/functional/test_ppc64_hv.py | 39 +--- tests/functional/test_ppc64_tuxrun.py | 7 +- tests/functional/test_ppc_40p.py | 7 +- tests/functional/test_ppc_amiga.py | 20 +- tests/functional/test_ppc_bamboo.py | 15 +- tests/functional/test_ppc_mac.py | 8 +- tests/functional/test_ppc_mpc8544ds.py | 8 +- tests/functional/test_ppc_virtex_ml507.py | 10 +- tests/functional/test_rx_gdbsim.py | 13 +- tests/functional/test_s390x_ccw_virtio.py | 6 +- tests/functional/test_s390x_topology.py | 7 +- tests/functional/test_sh4_r2d.py | 14 +- tests/functional/test_sh4eb_r2d.py | 14 +- tests/functional/test_sparc64_sun4u.py | 11 +- tests/functional/test_sparc_sun4m.py | 7 +- tests/functional/test_virtio_gpu.py | 16 +- tests/functional/test_xtensa_lx60.py | 8 +- 69 files changed, 887 insertions(+), 756 deletions(-) create mode 100644 tests/functional/qemu_test/archive.py create mode 100644 tests/functional/qemu_test/decorators.py create mode 100644 tests/functional/qemu_test/uncompress.py mode change 100644 => 100755 tests/functional/test_aarch64_aspeed.py mode change 100644 => 100755 tests/functional/test_arm_aspeed_ast1030.py mode change 100644 => 100755 tests/functional/test_arm_aspeed_ast2500.py mode change 100644 => 100755 tests/functional/test_arm_aspeed_ast2600.py mode change 100644 => 100755 tests/functional/test_arm_aspeed_palmetto.py mode change 100644 => 100755 tests/functional/test_arm_aspeed_rainier.py mode change 100644 => 100755 tests/functional/test_arm_aspeed_romulus.py
Signature · 1 line
2.46.0