From bb812db6e0414f9cfb2b1f7ea0af5111584a080c Mon Sep 17 00:00:00 2001 From: tb <> Date: Thu, 4 Sep 2025 16:38:40 +0000 Subject: wycheproof: start migrating to testvectors_v1 In https://github.com/C2SP/wycheproof/pull/169, upstream removed the testvector/ path, thereby creating the need to migrate if we want to benefit from future changes and tests. While this has been around for a very long time and generally provided more and better coverage, there never was sufficient motivation to do so. As a first step, change use of the testVectorPath constant to use of a path variable so we can switch the tests one by one by appending _v1 when appropriate. --- src/regress/lib/libcrypto/wycheproof/wycheproof.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/regress') diff --git a/src/regress/lib/libcrypto/wycheproof/wycheproof.go b/src/regress/lib/libcrypto/wycheproof/wycheproof.go index 8f0dfc8b2e..7ecb344b5c 100644 --- a/src/regress/lib/libcrypto/wycheproof/wycheproof.go +++ b/src/regress/lib/libcrypto/wycheproof/wycheproof.go @@ -1,4 +1,4 @@ -/* $OpenBSD: wycheproof.go,v 1.161 2024/11/24 10:13:16 tb Exp $ */ +/* $OpenBSD: wycheproof.go,v 1.162 2025/09/04 16:38:40 tb Exp $ */ /* * Copyright (c) 2018,2023 Joel Sing * Copyright (c) 2018,2019,2022-2024 Theo Buehler @@ -2767,16 +2767,17 @@ func main() { skipNormal := regexp.MustCompile(`_(ecpoint|p1363|sect\d{3}[rk]1|secp(160|192))_`) for _, test := range tests { - tvs, err := filepath.Glob(filepath.Join(testVectorPath, test.pattern)) + path := testVectorPath + tvs, err := filepath.Glob(filepath.Join(path, test.pattern)) if err != nil { log.Fatalf("Failed to glob %v test vectors: %v", test.name, err) } if len(tvs) == 0 { - log.Fatalf("Failed to find %v test vectors at %q\n", test.name, testVectorPath) + log.Fatalf("Failed to find %v test vectors at %q\n", test.name, path) } for _, tv := range tvs { if test.variant == Skip || (test.variant == Normal && skipNormal.Match([]byte(tv))) { - fmt.Printf("INFO: Skipping tests from \"%s\"\n", strings.TrimPrefix(tv, testVectorPath+"/")) + fmt.Printf("INFO: Skipping tests from \"%s\"\n", strings.TrimPrefix(tv, path+"/")) continue } wg.Add(1) -- cgit v1.2.3-55-g6feb