Commit Graph

406 Commits

Author SHA1 Message Date
Neil Horman 58b7b94ae5 Convert all perf tools to not use ossl_time_divide
It looses information as its doing integer division

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/tools/pull/184)
2024-05-02 15:51:43 +02:00
Neil Horman 2db2bd1fc2 make x509storeissuer do timekeeping like the other tests
Also, while I'm in here, fix an aliasing issue in threadcount, in which
the main routine had a variable overriding the global one.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/tools/pull/184)
2024-05-02 15:51:43 +02:00
Neil Horman 42debe8613 convert sslnew to measure time consistently
Make it do the same math the other tests do

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/tools/pull/184)
2024-04-30 10:39:34 -04:00
Neil Horman 7efe27febf make rsasign measure time consistently
Like the other tests, measure time per thread and average those

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/tools/pull/184)
2024-04-30 10:39:34 -04:00
Neil Horman 3486229fa9 convert randbytes to use consistent time measurements
modify randbytes to measure time the way the other tests do

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/tools/pull/184)
2024-04-30 10:39:34 -04:00
Neil Horman bd3ad5fa87 Convert providerdoall to be consistent in time measurement
Convert it to do the same math the other tests do

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/tools/pull/184)
2024-04-30 10:39:34 -04:00
Neil Horman 8e82dd6faa convert pemread to be consistent in its time measurement
like handshake and newrawkey, record times per thread and average them

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/tools/pull/184)
2024-04-30 10:39:34 -04:00
Neil Horman cb9d8154db adjust newraw key to record time like the handshake test
the handshake test records the average time of each thread running
its test, while other tests record the overall duration, leading to
inconsistencies in how we do measurement.

Bring newrawkey into line with how handshake does it.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/tools/pull/184)
2024-04-30 10:39:34 -04:00
Neil Horman 291a580209 Fix up stylistic errors
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/tools/pull/168)
2024-04-24 19:18:43 +02:00
Neil Horman 3079057789 add basic rw lock performance test
Add a test to iteratively call [read|write] lock/unlock and see how many
iterations we can get through for a given number of threads

Also accepts an environment variable LOCK_WRITERS to designate how many
of the started threads should be write threads vs read threads

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/tools/pull/168)
2024-04-24 19:17:46 +02:00
Neil Horman f6a78a269c fix variable aliasing in x509storeissuer
threadcount is defined globally and in main, which is fine, but doing so
causes assignments to use the local scope rather than the global, which
results in div-by-zero in the thread function when we divide NUM_CALLS
by threadcount

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/tools/pull/182)
2024-04-24 13:41:03 +01:00
sashan 50849d4829 Adjust Makefile for non-gnu OSes
Let Makefile to use CC variable to chose compiler conveniently.
Rename current CFLAGS to CPPFLAGS.

Also we need to pass '-pthread' option on OpenBSD. The option
is carried in CFLAGS now.

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/tools/pull/188)
2024-04-17 10:29:18 +02:00
Neil Horman 8a5794563f Add label validation to prs
Add a check to ensure that we don't merge prs that don't have severity:
urgent or approval: ready to merge set

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/tools/pull/190)
2024-04-15 11:15:29 +02:00
Neil Horman 4dc3b331fb Update HOWTO-make-a-release.md
updating instructions to remind us to notify community platform owners of a freeze

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/tools/pull/190)
2024-04-10 08:42:17 -04:00
Dmitry Misharov 533166818d Remove FTP url from announcements and add GH releases URL
Co-authored-by: Anton Arapov <anton@deadbeef.mx>

Reviewed-by: Anton Arapov <anton@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/tools/pull/187)
2024-04-05 09:06:49 +02:00
Tomas Mraz 39e3169cda Add 3.3 branch and remove obsolete ones in tools
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/tools/pull/185)
2024-03-22 10:53:08 +01:00
Tomas Mraz f86e03b3fd perf: Avoid taking too long time with high thread counts
We change the tests to perform the same number
of iterations regardless of the thread counts.
Although this raises the running time for small
number of threads, this avoids very long running
times for 100 or more threads.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/tools/pull/162)
2024-01-18 16:53:05 +01:00
Tomas Mraz 579bcdc9b1 perf/pemread.c: Divide per-thread iteration count by threadcount
Otherwise with larger number of threads it takes too long
to run.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/tools/pull/162)
2024-01-18 16:53:05 +01:00
Neil Horman 9bf20f9e8f update ghmerge to python3
using ghmerge currently creates errors for me, in the form of inability
to load various python packages, as fedora moved to python3 several
releases ago

propose updating the use of python to python3 here to support recent
distributions.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/tools/pull/176)
2024-01-18 16:37:53 +01:00
Tomas Mraz 589faa7757 Update README and README.md depending on which exists
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/tools/pull/166)
2024-01-18 10:52:33 +01:00
Richard Levitte 6b183599a3 Add a note on where to find the QueryApp libraries
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/tools/pull/172)
2024-01-18 10:50:27 +01:00
James Muir b10fe821ae fix typo
"copryight" -> "copyright"

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/tools/pull/173)
2024-01-18 10:49:32 +01:00
Tomas Mraz 3c62359a94 HOWTO-handle-security-issue.md: Various minor updates
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/tools/pull/174)
2024-01-18 10:48:32 +01:00
Neil Horman 9e55bc7304 Allow for setting of extra cflags
When I build to run these tests under perf, I need to include a few
extra cflags (notably -rpath an -fno-omit-frame-pointer).  They're not
generally needed, but it would be nice to be able to set them easily in
an environment.

Add CFLAGS and LDFLAGS support to allow for easy
configuration

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/tools/pull/175)
2024-01-17 15:32:48 -05:00
Hugo Landau 259b15489c Allow gitaddrev path to be customised via environment variable
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/tools/pull/171)
2023-11-08 12:02:32 +01:00
Hugo Landau 257fd56d90 ghmerge: Add support for technical policies
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/tools/pull/171)
2023-11-08 12:02:32 +01:00
Hugo Landau 2ddf1e0a00 Make ghmerge compatible with Git worktrees
Git worktrees have .git be a file containing a string identifying the
location of the real .git directory. Thus -d will not match these
worktrees. Use -e instead.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/tools/pull/171)
2023-11-08 12:02:32 +01:00
Hugo Landau 9a56a661d5 Fix shebang lines for NixOS compatibility
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/tools/pull/171)
2023-11-08 12:02:32 +01:00
Richard Levitte e31cc76864 Move OpenSSL-Query from omc-tools
Fixes #134

Co-authored-by: Matthias St. Pierre <matthias.st.pierre@ncp-e.com>

Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/tools/pull/170)
2023-11-08 07:03:29 +01:00
Tomas Mraz cfc0cf920f Add 3.2 branch to pick-to-branch and opensslpull
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/tools/pull/169)
2023-10-30 10:59:29 +01:00
Dimitri Papadopoulos 861d005d9c release-tools/do-copyright-year: Always update copyright year in README.md
The copyright in README.md is supposed to have global scope.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/tools/pull/159)
2023-09-11 15:44:15 +02:00
Richard Levitte fccdc29287 Reorganize the release HOWTO
This splits up HOWTO-make-a-release.md into two new documents that reflect
the fact that *staging* and *publishing* a release are really two separate
things.

This also reflects that we're working towards full automation for staging
releases.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/tools/pull/145)
2023-09-11 15:41:44 +02:00
Pauli b6c9089c4c Add how to handle security issues document
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/tools/pull/165)
2023-08-10 09:55:54 +10:00
Matt Caswell 4307d538d9 Add a performance test for PEM_read_bio_PrivateKey()
We repeatedly attempt to load an RSA Private Key and measure performance.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/tools/pull/161)
2023-07-14 10:29:17 +01:00
Richard Levitte 2e35e54163 Enable a different announcement for premium releases
The basic data of what is considered premium and what is considered
public releases, a new bash function is added, std_release_type(), found in
release-tools/release-aux/release-data-fn.sh.

Along with this, the non-descript variable 'tag' is renamed to 'release_tag',
and a spelling error is corrected.

Fixes #157

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/tools/pull/160)
2023-06-23 11:26:58 +02:00
Richard Levitte 988e13a8d4 release-tools/stage-release.sh: Update copyright year
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/tools/pull/155)
2023-05-30 14:41:18 +02:00
Richard Levitte 5b7dd86a62 release-tools/do-copyright-year: Do not commit the changes!
Leave it to the caller to do what they want with the changes.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/tools/pull/156)
2023-05-30 14:37:54 +02:00
Matt Caswell c32b758339 Add a performance test for OSSL_PROVIDER_do_all()
This tests calls the OSSL_PROVIDER_do_all() function repeatedly in a loop.
This function can be called directly by user code, but is also used during
the initialisation of an SSL_CTX to discover TLS capabilities from
providers (e.g. pluggable groups etc).

The underlying internal function ossl_provider_doall_activated() will
also be tested by this. That function is called during algorithm fetching
(if the algorithms have not yet been cached).

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/tools/pull/154)
2023-05-30 08:53:27 +01:00
Matt Caswell 1d04612972 Add a performance test for X509_CTX_CTX_get1_issuer()
This test just call X509_STORE_CTX_get1_issuer() in a loop with an empty
store. This function is usually called as part of chain building during a
certificate verify operation.

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/tools/pull/150)
2023-05-30 08:51:09 +01:00
Richard Levitte b756785860 A few fixes for release-tools/stage-release.sh
Correcting these issues:

- The update branch and release branch were created each on different sides
  of a 'next_release_state' call, which made them differ even though there
  shouldn't be any difference (i.e. --branch was given or implied).
- Running 'do-copyright-year' was done after configuration, and may change
  Configure, which means that the following 'make' call may reconfigure and
  intentionally fail, causing release staging failure.
- In the metadata, the 'staging_update_branch' entry was set to the original
  update branch.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/tools/pull/153)
2023-05-29 14:13:07 +02:00
Matt Caswell 9ef2b09785 Add an RSA signing performance test
Unlike "speed" this performs RSA operations in parallel using threads
(as opposed to the -multi speed option which uses "fork").

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/tools/pull/152)
2023-05-29 11:56:57 +01:00
Matt Caswell 6f61591b29 Add a performance test for EVP_PKEY_new_raw_public_key_ex()
We add a performance test for repeatedly calling
EVP_PKEY_new_raw_public_key_ex(). Note this test does not support 1.1.1.

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/tools/pull/149)
2023-05-29 11:53:08 +01:00
Matt Caswell 9a886099ee Add a performance test for constructing an SSL and associated BIO objects
We repeatedly call SSL_new() and BIO_new() (followed by appropriate free
calls), for a specified number of threads.

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/tools/pull/148)
2023-05-29 11:50:46 +01:00
Matt Caswell f4a04a226d Add details about the handshake script to the README
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/tools/pull/146)
2023-05-29 11:43:59 +01:00
Matt Caswell 22dba37b82 Add a --terse option
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/tools/pull/146)
2023-05-29 11:43:59 +01:00
Matt Caswell 0ecdcdf500 Add a handshake performance test
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/tools/pull/146)
2023-05-29 11:43:59 +01:00
Matt Caswell 7c8a60b00c Move some common code out of randbytes
We move some code out of the randbytes test into perflib so we can later
reuse it.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/tools/pull/146)
2023-05-29 11:43:59 +01:00
Matt Caswell 09644114f6 Add a README for the performance testing tools
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/tools/pull/146)
2023-05-29 11:43:59 +01:00
Matt Caswell 9af01374a3 Add a clean target for the Makefile
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/tools/pull/146)
2023-05-29 11:43:59 +01:00
Matt Caswell 3d19343a91 Create a RAND_bytes() performance testing script
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/tools/pull/146)
2023-05-29 11:43:59 +01:00