diff options
author | Theo Buehler <tb@openbsd.org> | 2022-12-18 01:30:19 +0100 |
---|---|---|
committer | Theo Buehler <tb@openbsd.org> | 2022-12-18 01:30:19 +0100 |
commit | 320501da40a6b43965775a68b5019d86a146e21a (patch) | |
tree | 25162614cdce1efa0b161b1ebcad48a340a98314 | |
parent | da826ecc77a941f88a13287ad1e1034a3086f389 (diff) | |
download | portable-320501da40a6b43965775a68b5019d86a146e21a.tar.gz portable-320501da40a6b43965775a68b5019d86a146e21a.tar.bz2 portable-320501da40a6b43965775a68b5019d86a146e21a.zip |
Use bigger hammer to disable benchmarks
-rw-r--r-- | patches/bn_shift.patch | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/patches/bn_shift.patch b/patches/bn_shift.patch index f0298a2..446609b 100644 --- a/patches/bn_shift.patch +++ b/patches/bn_shift.patch | |||
@@ -1,26 +1,15 @@ | |||
1 | --- tests/bn_shift.c.orig Sun Dec 18 01:05:29 2022 | 1 | --- tests/bn_shift.c.orig Sun Dec 18 01:05:29 2022 |
2 | +++ tests/bn_shift.c Sun Dec 18 01:15:00 2022 | 2 | +++ tests/bn_shift.c Sun Dec 18 01:29:36 2022 |
3 | @@ -26,6 +26,10 @@ | 3 | @@ -314,6 +314,8 @@ test_bn_rshift_to_zero(void) |
4 | |||
5 | #include <openssl/bn.h> | ||
6 | |||
7 | +#ifndef _MSC_VER | ||
8 | +#define INCLUDE_BENCHMARKS | ||
9 | +#endif | ||
10 | + | ||
11 | static const char *bn_shift_want_hex = \ | ||
12 | "02AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" \ | ||
13 | "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8"; | ||
14 | @@ -314,6 +318,8 @@ test_bn_rshift_to_zero(void) | ||
15 | return failed; | 4 | return failed; |
16 | } | 5 | } |
17 | 6 | ||
18 | +#ifdef INCLUDE_BENCHMARKS | 7 | +#if 0 |
19 | + | 8 | + |
20 | static void | 9 | static void |
21 | benchmark_bn_lshift1(BIGNUM *bn) | 10 | benchmark_bn_lshift1(BIGNUM *bn) |
22 | { | 11 | { |
23 | @@ -507,9 +513,12 @@ benchmark_run(const struct benchmark *bm, int seconds) | 12 | @@ -507,9 +509,12 @@ benchmark_run(const struct benchmark *bm, int seconds) |
24 | BN_free(bn); | 13 | BN_free(bn); |
25 | } | 14 | } |
26 | 15 | ||
@@ -29,11 +18,11 @@ | |||
29 | static void | 18 | static void |
30 | benchmark_bn_shift(void) | 19 | benchmark_bn_shift(void) |
31 | { | 20 | { |
32 | +#ifdef INCLUDE_BENCHMARKS | 21 | +#if 0 |
33 | const struct benchmark *bm; | 22 | const struct benchmark *bm; |
34 | size_t i; | 23 | size_t i; |
35 | 24 | ||
36 | @@ -517,6 +526,9 @@ benchmark_bn_shift(void) | 25 | @@ -517,6 +522,9 @@ benchmark_bn_shift(void) |
37 | bm = &benchmarks[i]; | 26 | bm = &benchmarks[i]; |
38 | benchmark_run(bm, 5); | 27 | benchmark_run(bm, 5); |
39 | } | 28 | } |