Re: [PATCH] lib/crypto: tests: Fix syntax error for old python versions
From: Eric Biggers
Date: Tue Jan 06 2026 - 22:44:01 EST
On Tue, Jan 06, 2026 at 07:30:19PM -0800, Eric Biggers wrote:
> On Wed, Jan 07, 2026 at 09:58:29AM +0800, Jie Zhan wrote:
> > '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@xxxxxxxxxxxxx>
> > ---
> > scripts/crypto/gen-hash-testvecs.py | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
>
> I'll apply this, but it's weird that 'make binrpm-pkg' is doing anything
> with this script. It's not executed during the kernel build process.
> It's only run manually to generate some files that are checked in
> elsewhere in the tree.
>
> - Eric
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/log/?h=libcrypto-fixes
- Eric