Skip to contentSkip to conversation

doc: add missing 'Asset' type in function test doc

PATCH In review Aditya Gupta 3 participants 3 messages Mar 6, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 doc: add missing 'Asset' type in function test doc

Seems 'Asset' got missed in the documentation by mistake.

Also fix the one spellcheck issue pointed by spellcheck

---
 docs/devel/testing/functional.rst | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
docs/devel/testing/functional.rst +4 -2
index ecc738922b7c..50fca2a0291e 100644
@@ -251,7 +251,7 @@ Many functional tests download assets (e.g. Linux kernels, initrds,
 firmware images, etc.) from the internet to be able to run tests with
 them. This imposes additional challenges to the test framework.
 
-First there is the the problem that some people might not have an
+First there is the problem that some people might not have an
 unconstrained internet connection, so such tests should not be run by
 default when running ``make check``. To accomplish this situation,
 the tests that download files should only be added to the "thorough"
@@ -274,7 +274,9 @@ the tests are run. This pre-caching is done with the qemu_test.Asset
 class. To use it in your test, declare an asset in your test class with
 its URL and SHA256 checksum like this::
 
-    ASSET_somename = (
+    from qemu_test import Asset
+
+    ASSET_somename = Asset(
         ('https://www.qemu.org/assets/images/qemu_head_200.png'),
         '34b74cad46ea28a2966c1d04e102510daf1fd73e6582b6b74523940d5da029dd')
 
Signature · 1 line
2.48.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 23 lines · Aditya Gupta

Seems 'Asset' got missed in the documentation by mistake.

Also fix the one spellcheck issue pointed by spellcheck

---
  docs/devel/testing/functional.rst | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)
docs/devel/testing/functional.rst +1 -1
index ecc738922b7c..50fca2a0291e 100644
@@ -251,7 +251,7 @@ Many functional tests download assets (e.g. Linux kernels, initrds,
  firmware images, etc.) from the internet to be able to run tests with
  them. This imposes additional challenges to the test framework.
 
-First there is the the problem that some people might not have an
+First there is the problem that some people might not have an
  unconstrained internet connection, so such tests should not be run by
  default when running ``make check``. To accomplish this situation,
  the tests that download files should only be added to the "thorough"

docs/devel/testing/functional.rst the tests are run. This pre-caching is done with the qemu_test.Asset · line 282

Quoted 10 lines
docs/devel/testing/functional.rst +3 -1
@@ -274,7 +274,9 @@ the tests are run. This pre-caching is done with the qemu_test.Asset
  class. To use it in your test, declare an asset in your test class with
  its URL and SHA256 checksum like this::
 
-    ASSET_somename = (
+    from qemu_test import Asset
+
+    ASSET_somename = Asset(
          ('https://www.qemu.org/assets/images/qemu_head_200.png'),
          '34b74cad46ea28a2966c1d04e102510daf1fd73e6582b6b74523940d5da029dd')
 
#2 lore raw
Quoted 27 lines · Philippe Mathieu-Daudé
Quoted 26 lines · Aditya Gupta

Seems 'Asset' got missed in the documentation by mistake.

Also fix the one spellcheck issue pointed by spellcheck

---
  docs/devel/testing/functional.rst | 6 ++++--

  1 file changed, 4 insertions(+), 2 deletions(-)
docs/devel/testing/functional.rst +0 -0
index ecc738922b7c..50fca2a0291e 100644
@@ -251,7 +251,7 @@ Many functional tests download assets (e.g. Linux 
 kernels, initrds,

  firmware images, etc.) from the internet to be able to run tests with them. This imposes additional challenges to the test framework.

docs/devel/testing/functional.rst +1 -1
-First there is the the problem that some people might not have an
+First there is the problem that some people might not have an

  unconstrained internet connection, so such tests should not be run by default when running ``make check``. To accomplish this situation, the tests that download files should only be added to the "thorough"

docs/devel/testing/functional.rst +0 -0
@@ -274,7 +274,9 @@ the tests are run. This pre-caching is done with the 

qemu_test.Asset
  class. To use it in your test, declare an asset in your test class with its URL and SHA256 checksum like this::

Quoted 8 lines
Quoted 6 lines

-    ASSET_somename = (
+    from qemu_test import Asset
+
+    ASSET_somename = Asset( ('https://www.qemu.org/assets/images/qemu_head_200.png'), '34b74cad46ea28a2966c1d04e102510daf1fd73e6582b6b74523940d5da029dd')

Thanks, queued!

Thomas