All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests/functional: Enforce sha256 as hashsum algorithm for all tests
@ 2026-01-21 10:19 Thomas Huth
  2026-01-21 10:25 ` Daniel P. Berrangé
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Thomas Huth @ 2026-01-21 10:19 UTC (permalink / raw)
  To: qemu-devel, Daniel P. Berrangé
  Cc: Philippe Mathieu-Daudé, Sourabh Jain, Aditya Gupta

From: Thomas Huth <thuth@redhat.com>

The functional testing framework currently supports both, sha256
and sha512 as hashsums for the assets. However, all but one test
currently only use sha256, which should also be sufficient according
to the current security standards. Having two algorithms around already
caused some confusion (e.g. the clean_functional_cache.py script only
supports sha256 right now), so standardize now on enforcing sha256
before more tests use a mix of the two algorithms.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/functional/ppc64/test_fadump.py | 4 +---
 tests/functional/qemu_test/asset.py   | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/tests/functional/ppc64/test_fadump.py b/tests/functional/ppc64/test_fadump.py
index 2d6b8017e8f..bd9692f64c0 100755
--- a/tests/functional/ppc64/test_fadump.py
+++ b/tests/functional/ppc64/test_fadump.py
@@ -32,9 +32,7 @@ class QEMUFadump(LinuxKernelTest):
     ASSET_VMLINUZ_KERNEL = Asset(
         ('https://archives.fedoraproject.org/pub/archive/fedora-secondary/'
          'releases/39/Everything/ppc64le/os/ppc/ppc64/vmlinuz'),
-        ('81e5541d243b50c8f9568906c6918dda22239744d637bb9a7b22d23c3d661226'
-         '8d5302beb2ca5c06f93bdbc9736c414ef5120756c8bf496ff488ad07d116d67f')
-        )
+         '6d77658130a7de1dd014ae14d7983c27f8ba1a61fa02e8d9064afdb8519e7e96')
 
     ASSET_FEDORA_INITRD = Asset(
         ('https://archives.fedoraproject.org/pub/archive/fedora-secondary/'
diff --git a/tests/functional/qemu_test/asset.py b/tests/functional/qemu_test/asset.py
index bae40765ce4..45a2e01e2e6 100644
--- a/tests/functional/qemu_test/asset.py
+++ b/tests/functional/qemu_test/asset.py
@@ -57,10 +57,8 @@ def _check(self, cache_file):
             return True
         if len(self.hash) == 64:
             hl = hashlib.sha256()
-        elif len(self.hash) == 128:
-            hl = hashlib.sha512()
         else:
-            raise AssetError(self, "unknown hash type")
+            raise AssetError(self, "unsupported hash type")
 
         # Calculate the hash of the file:
         with open(cache_file, 'rb') as file:
-- 
2.52.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] tests/functional: Enforce sha256 as hashsum algorithm for all tests
  2026-01-21 10:19 [PATCH] tests/functional: Enforce sha256 as hashsum algorithm for all tests Thomas Huth
@ 2026-01-21 10:25 ` Daniel P. Berrangé
  2026-01-21 23:34 ` Richard Henderson
  2026-01-22 17:32 ` Aditya Gupta
  2 siblings, 0 replies; 4+ messages in thread
From: Daniel P. Berrangé @ 2026-01-21 10:25 UTC (permalink / raw)
  To: Thomas Huth
  Cc: qemu-devel, Philippe Mathieu-Daudé, Sourabh Jain,
	Aditya Gupta

On Wed, Jan 21, 2026 at 11:19:57AM +0100, Thomas Huth wrote:
> From: Thomas Huth <thuth@redhat.com>
> 
> The functional testing framework currently supports both, sha256
> and sha512 as hashsums for the assets. However, all but one test
> currently only use sha256, which should also be sufficient according
> to the current security standards. Having two algorithms around already
> caused some confusion (e.g. the clean_functional_cache.py script only
> supports sha256 right now), so standardize now on enforcing sha256
> before more tests use a mix of the two algorithms.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  tests/functional/ppc64/test_fadump.py | 4 +---
>  tests/functional/qemu_test/asset.py   | 4 +---
>  2 files changed, 2 insertions(+), 6 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] tests/functional: Enforce sha256 as hashsum algorithm for all tests
  2026-01-21 10:19 [PATCH] tests/functional: Enforce sha256 as hashsum algorithm for all tests Thomas Huth
  2026-01-21 10:25 ` Daniel P. Berrangé
@ 2026-01-21 23:34 ` Richard Henderson
  2026-01-22 17:32 ` Aditya Gupta
  2 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2026-01-21 23:34 UTC (permalink / raw)
  To: qemu-devel

On 1/21/26 21:19, Thomas Huth wrote:
> From: Thomas Huth<thuth@redhat.com>
> 
> The functional testing framework currently supports both, sha256
> and sha512 as hashsums for the assets. However, all but one test
> currently only use sha256, which should also be sufficient according
> to the current security standards. Having two algorithms around already
> caused some confusion (e.g. the clean_functional_cache.py script only
> supports sha256 right now), so standardize now on enforcing sha256
> before more tests use a mix of the two algorithms.
> 
> Signed-off-by: Thomas Huth<thuth@redhat.com>
> ---
>   tests/functional/ppc64/test_fadump.py | 4 +---
>   tests/functional/qemu_test/asset.py   | 4 +---
>   2 files changed, 2 insertions(+), 6 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] tests/functional: Enforce sha256 as hashsum algorithm for all tests
  2026-01-21 10:19 [PATCH] tests/functional: Enforce sha256 as hashsum algorithm for all tests Thomas Huth
  2026-01-21 10:25 ` Daniel P. Berrangé
  2026-01-21 23:34 ` Richard Henderson
@ 2026-01-22 17:32 ` Aditya Gupta
  2 siblings, 0 replies; 4+ messages in thread
From: Aditya Gupta @ 2026-01-22 17:32 UTC (permalink / raw)
  To: Thomas Huth
  Cc: qemu-devel, Daniel P. Berrangé, Philippe Mathieu-Daudé,
	Sourabh Jain

On 26/01/21 11:19AM, Thomas Huth wrote:
> From: Thomas Huth <thuth@redhat.com>
> 
> The functional testing framework currently supports both, sha256
> and sha512 as hashsums for the assets. However, all but one test
> currently only use sha256, which should also be sufficient according
> to the current security standards. Having two algorithms around already
> caused some confusion (e.g. the clean_functional_cache.py script only
> supports sha256 right now), so standardize now on enforcing sha256
> before more tests use a mix of the two algorithms.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  tests/functional/ppc64/test_fadump.py | 4 +---
>  tests/functional/qemu_test/asset.py   | 4 +---
>  2 files changed, 2 insertions(+), 6 deletions(-)

Looks good to me.

Reviewed-by: Aditya Gupta <adityag@linux.ibm.com>

Thanks,
- Aditya G



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-01-22 17:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-21 10:19 [PATCH] tests/functional: Enforce sha256 as hashsum algorithm for all tests Thomas Huth
2026-01-21 10:25 ` Daniel P. Berrangé
2026-01-21 23:34 ` Richard Henderson
2026-01-22 17:32 ` Aditya Gupta

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.