git: test: Use snapshot testing for cryptoapi/cryptodev
Michael Neumann
mneumann at crater.dragonflybsd.org
Tue Sep 30 12:57:14 PDT 2025
commit 0d602a9a0ddcaa866f278ce897d6617b00d39f78
Author: Michael Neumann <mneumann at ntecs.de>
Date: Tue Sep 30 21:42:30 2025 +0200
test: Use snapshot testing for cryptoapi/cryptodev
The tests I wrote for cryptoapi where based on comparing the results
against the results of cryptodev - if they match, the test succeeds. But
as I am planning to remove cryptodev, this test methodology no longer
works.
Instead, store the test input data in fixtures.csv and run the test case
for each input. The generated output should then match the
expected_output.md in order for the tests to pass. This simplifies
adding new test fixtures and allows for re-generating the
expected_output.md.
Summary of changes:
test/crypto/cryptoapi/Makefile | 3 +-
test/crypto/cryptoapi/cryptoapi_test.c | 297 ++-
test/crypto/cryptoapi/expected_output.md | 3602 ++++++++++++++++++++++++++++++
test/crypto/cryptoapi/fixtures.csv | 241 ++
4 files changed, 4023 insertions(+), 120 deletions(-)
create mode 100644 test/crypto/cryptoapi/expected_output.md
create mode 100644 test/crypto/cryptoapi/fixtures.csv
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/0d602a9a0ddcaa866f278ce897d6617b00d39f78
--
DragonFly BSD source repository
More information about the Commits
mailing list