Skip to content

Commit

Permalink
crypto: tcrypt - fix return value for multiple subtests
Browse files Browse the repository at this point in the history
[ Upstream commit 65c92cb ]

When a test mode invokes multiple tests (e.g., mode 0 invokes modes
1 through 199, and mode 3 tests three block cipher modes with des),
don't keep accumulating the return values with ret += tcrypt_test(),
which results in a bogus value if more than one report a nonzero
value (e.g., two reporting -2 (-ENOENT) end up reporting -4 (-EINTR)).
Instead, keep track of the minimum return value reported by any
subtest.

Fixes: 4e033a6 ("crypto: tcrypt - Do not exit on success in fips mode")
Signed-off-by: Robert Elliott <elliott@hpe.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
RobertCElliott authored and gregkh committed Dec 31, 2022
1 parent 51592cf commit 7b5bc00
Showing 1 changed file with 128 additions and 128 deletions.

0 comments on commit 7b5bc00

Please sign in to comment.