* [PATCH-for-8.2?] tests/avocado: Make fetch_asset() inconditionally require a crypto hash
@ 2023-11-15 15:32 Philippe Mathieu-Daudé
2023-11-15 15:37 ` Philippe Mathieu-Daudé
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-11-15 15:32 UTC (permalink / raw)
To: qemu-devel
Cc: Alex Bennée, Beraldo Leal, Wainer dos Santos Moschetta,
Daniel P . Berrangé, Cleber Rosa,
Philippe Mathieu-Daudé, Thomas Huth
In a perfect world we'd have reproducible tests,
but then we'd be sure we run the same binaries.
If a binary artifact isn't hashed, we have no idea
what we are running. Therefore enforce hashing for
all our artifacts.
With this change, unhashed artifacts produce:
$ avocado run tests/avocado/multiprocess.py
(1/2) tests/avocado/multiprocess.py:Multiprocess.test_multiprocess_x86_64:
ERROR: QemuBaseTest.fetch_asset() missing 1 required positional argument: 'asset_hash' (0.19 s)
Inspired-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
Based-on: <20231115145852.494052-1-thuth@redhat.com>
"tests/avocado/multiprocess: Add asset hashes to silence warnings"
---
tests/avocado/avocado_qemu/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/avocado/avocado_qemu/__init__.py b/tests/avocado/avocado_qemu/__init__.py
index d71e989db6..304c428168 100644
--- a/tests/avocado/avocado_qemu/__init__.py
+++ b/tests/avocado/avocado_qemu/__init__.py
@@ -254,7 +254,7 @@ def setUp(self, bin_prefix):
self.cancel("No QEMU binary defined or found in the build tree")
def fetch_asset(self, name,
- asset_hash=None, algorithm=None,
+ asset_hash, algorithm=None,
locations=None, expire=None,
find_only=False, cancel_on_missing=True):
return super().fetch_asset(name,
--
2.41.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH-for-8.2?] tests/avocado: Make fetch_asset() inconditionally require a crypto hash
2023-11-15 15:32 [PATCH-for-8.2?] tests/avocado: Make fetch_asset() inconditionally require a crypto hash Philippe Mathieu-Daudé
@ 2023-11-15 15:37 ` Philippe Mathieu-Daudé
2023-11-15 15:41 ` Thomas Huth
2023-11-15 16:06 ` Alex Bennée
2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-11-15 15:37 UTC (permalink / raw)
To: qemu-devel
Cc: Alex Bennée, Beraldo Leal, Wainer dos Santos Moschetta,
Daniel P . Berrangé, Cleber Rosa, Thomas Huth
On 15/11/23 16:32, Philippe Mathieu-Daudé wrote:
> In a perfect world we'd have reproducible tests,
> but then we'd be sure we run the same binaries.
> If a binary artifact isn't hashed, we have no idea
> what we are running. Therefore enforce hashing for
> all our artifacts.
>
> With this change, unhashed artifacts produce:
>
> $ avocado run tests/avocado/multiprocess.py
> (1/2) tests/avocado/multiprocess.py:Multiprocess.test_multiprocess_x86_64:
> ERROR: QemuBaseTest.fetch_asset() missing 1 required positional argument: 'asset_hash' (0.19 s)
>
> Inspired-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> Based-on: <20231115145852.494052-1-thuth@redhat.com>
> "tests/avocado/multiprocess: Add asset hashes to silence warnings"
and:
Based-on: <20231114143531.291820-1-thuth@redhat.com>
"tests/avocado/intel_iommu: Add asset hashes to avoid warnings"
> ---
> tests/avocado/avocado_qemu/__init__.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/avocado/avocado_qemu/__init__.py b/tests/avocado/avocado_qemu/__init__.py
> index d71e989db6..304c428168 100644
> --- a/tests/avocado/avocado_qemu/__init__.py
> +++ b/tests/avocado/avocado_qemu/__init__.py
> @@ -254,7 +254,7 @@ def setUp(self, bin_prefix):
> self.cancel("No QEMU binary defined or found in the build tree")
>
> def fetch_asset(self, name,
> - asset_hash=None, algorithm=None,
> + asset_hash, algorithm=None,
> locations=None, expire=None,
> find_only=False, cancel_on_missing=True):
> return super().fetch_asset(name,
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH-for-8.2?] tests/avocado: Make fetch_asset() inconditionally require a crypto hash
2023-11-15 15:32 [PATCH-for-8.2?] tests/avocado: Make fetch_asset() inconditionally require a crypto hash Philippe Mathieu-Daudé
2023-11-15 15:37 ` Philippe Mathieu-Daudé
@ 2023-11-15 15:41 ` Thomas Huth
2023-11-15 16:06 ` Alex Bennée
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2023-11-15 15:41 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Alex Bennée, Beraldo Leal, Wainer dos Santos Moschetta,
Daniel P . Berrangé, Cleber Rosa
On 15/11/2023 16.32, Philippe Mathieu-Daudé wrote:
> In a perfect world we'd have reproducible tests,
> but then we'd be sure we run the same binaries.
> If a binary artifact isn't hashed, we have no idea
> what we are running. Therefore enforce hashing for
> all our artifacts.
>
> With this change, unhashed artifacts produce:
>
> $ avocado run tests/avocado/multiprocess.py
> (1/2) tests/avocado/multiprocess.py:Multiprocess.test_multiprocess_x86_64:
> ERROR: QemuBaseTest.fetch_asset() missing 1 required positional argument: 'asset_hash' (0.19 s)
>
> Inspired-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> Based-on: <20231115145852.494052-1-thuth@redhat.com>
> "tests/avocado/multiprocess: Add asset hashes to silence warnings"
> ---
> tests/avocado/avocado_qemu/__init__.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/avocado/avocado_qemu/__init__.py b/tests/avocado/avocado_qemu/__init__.py
> index d71e989db6..304c428168 100644
> --- a/tests/avocado/avocado_qemu/__init__.py
> +++ b/tests/avocado/avocado_qemu/__init__.py
> @@ -254,7 +254,7 @@ def setUp(self, bin_prefix):
> self.cancel("No QEMU binary defined or found in the build tree")
>
> def fetch_asset(self, name,
> - asset_hash=None, algorithm=None,
> + asset_hash, algorithm=None,
> locations=None, expire=None,
> find_only=False, cancel_on_missing=True):
> return super().fetch_asset(name,
I think this already makes sense to avoid that those annoying warnings could
get in again in the future!
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH-for-8.2?] tests/avocado: Make fetch_asset() inconditionally require a crypto hash
2023-11-15 15:32 [PATCH-for-8.2?] tests/avocado: Make fetch_asset() inconditionally require a crypto hash Philippe Mathieu-Daudé
2023-11-15 15:37 ` Philippe Mathieu-Daudé
2023-11-15 15:41 ` Thomas Huth
@ 2023-11-15 16:06 ` Alex Bennée
2 siblings, 0 replies; 4+ messages in thread
From: Alex Bennée @ 2023-11-15 16:06 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Beraldo Leal, Wainer dos Santos Moschetta,
Daniel P . Berrangé, Cleber Rosa, Thomas Huth
Philippe Mathieu-Daudé <philmd@linaro.org> writes:
s/inconditionally/unconditionally/
Otherwise:
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-11-15 16:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-15 15:32 [PATCH-for-8.2?] tests/avocado: Make fetch_asset() inconditionally require a crypto hash Philippe Mathieu-Daudé
2023-11-15 15:37 ` Philippe Mathieu-Daudé
2023-11-15 15:41 ` Thomas Huth
2023-11-15 16:06 ` Alex Bennée
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.