[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260107015829.2000699-1-zhanjie9@hisilicon.com>
Date: Wed, 7 Jan 2026 09:58:29 +0800
From: Jie Zhan <zhanjie9@...ilicon.com>
To: <ebiggers@...nel.org>, <ardb@...nel.org>, <dhowells@...hat.com>
CC: <linux-kernel@...r.kernel.org>, <linuxarm@...wei.com>,
<zhanjie9@...ilicon.com>, <jonathan.cameron@...wei.com>
Subject: [PATCH] lib/crypto: tests: Fix syntax error for old python versions
'make binrpm-pkg' throws me this error, with Python 3.9:
*** Error compiling '.../gen-hash-testvecs.py'...
File ".../scripts/crypto/gen-hash-testvecs.py", line 121
return f'{alg.upper().replace('-', '_')}_DIGEST_SIZE'
^
SyntaxError: f-string: unmatched '('
Old python versions, presumably <= 3.11, can't resolve these quotes.
Fix it with double quotes for compatibility.
Fixes: 15c64c47e484 ("lib/crypto: tests: Add SHA3 kunit tests")
Signed-off-by: Jie Zhan <zhanjie9@...ilicon.com>
---
scripts/crypto/gen-hash-testvecs.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/crypto/gen-hash-testvecs.py b/scripts/crypto/gen-hash-testvecs.py
index c1d0517140bd..c773294fba64 100755
--- a/scripts/crypto/gen-hash-testvecs.py
+++ b/scripts/crypto/gen-hash-testvecs.py
@@ -118,7 +118,7 @@ def print_c_struct_u8_array_field(name, value):
def alg_digest_size_const(alg):
if alg.startswith('blake2'):
return f'{alg.upper()}_HASH_SIZE'
- return f'{alg.upper().replace('-', '_')}_DIGEST_SIZE'
+ return f"{alg.upper().replace('-', '_')}_DIGEST_SIZE"
def gen_unkeyed_testvecs(alg):
print('')
--
2.33.0
Powered by blists - more mailing lists