From nobody Sun Feb 8 20:34:40 2026 Received: from canpmsgout10.his.huawei.com (canpmsgout10.his.huawei.com [113.46.200.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A52FE1A704B for ; Wed, 7 Jan 2026 02:01:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.225 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767751292; cv=none; b=aGfCR635VfeNrXVFMXZTG3q6VcFESZrMolvLykNjZMMBMWSEJzcuWcupR41Si5M57xU/ONo9iw9JvQw9Ctdz3URzIX8xoMW5Iiw7rhwSD8D3M4K5absPJ+C5InU0tdz3oD77CdF2MOShgJYuQ88h5n9CeI6h9RynsUZ4XYNrpME= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767751292; c=relaxed/simple; bh=3+7txiwxrrbdsHQyB0U3no1bfribyIa8QCz53GtQhOk=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=itd0L48Ayi6xg/HVnxrfALVKXUeTpr2ymPwt1Dd+7wRCvktehhw96l9StqqLQ3Q99K58302f/SVhsKv9s9Rpa9t2zK4WQ9YjMp0Ih4VSmvjj3qvddf3u+OxUzaNR7HJvUzj7gsJKs3fyJmGfWWuuO1S+n+pMltLMQ+f5JUqSZQw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=hisilicon.com; spf=pass smtp.mailfrom=hisilicon.com; arc=none smtp.client-ip=113.46.200.225 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=hisilicon.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=hisilicon.com Received: from mail.maildlp.com (unknown [172.19.163.163]) by canpmsgout10.his.huawei.com (SkyGuard) with ESMTPS id 4dmB5D3m26z1K96g; Wed, 7 Jan 2026 09:58:08 +0800 (CST) Received: from kwepemf200017.china.huawei.com (unknown [7.202.181.10]) by mail.maildlp.com (Postfix) with ESMTPS id ABD9140565; Wed, 7 Jan 2026 10:01:21 +0800 (CST) Received: from localhost.localdomain (10.90.31.46) by kwepemf200017.china.huawei.com (7.202.181.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Wed, 7 Jan 2026 10:01:21 +0800 From: Jie Zhan To: , , CC: , , , Subject: [PATCH] lib/crypto: tests: Fix syntax error for old python versions Date: Wed, 7 Jan 2026 09:58:29 +0800 Message-ID: <20260107015829.2000699-1-zhanjie9@hisilicon.com> X-Mailer: git-send-email 2.30.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: kwepems100002.china.huawei.com (7.221.188.206) To kwepemf200017.china.huawei.com (7.202.181.10) Content-Type: text/plain; charset="utf-8" '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 <=3D 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 --- 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" =20 def gen_unkeyed_testvecs(alg): print('') --=20 2.33.0