Skip to content

Commit

Permalink
crypto: testmgr - do comparison tests before inauthentic input tests
Browse files Browse the repository at this point in the history
Do test_aead_vs_generic_impl() before test_aead_inauthentic_inputs() so
that any differences with the generic driver are detected before getting
to the inauthentic input tests, which intentionally use only the driver
being tested (so that they run even if a generic driver is unavailable).

Signed-off-by: Eric Biggers <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
ebiggers authored and herbertx committed Mar 12, 2020
1 parent 6f3a06d commit 8ff357a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crypto/testmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2512,11 +2512,11 @@ static int test_aead_extra(const char *driver,
goto out;
}

err = test_aead_inauthentic_inputs(ctx);
err = test_aead_vs_generic_impl(ctx);
if (err)
goto out;

err = test_aead_vs_generic_impl(ctx);
err = test_aead_inauthentic_inputs(ctx);
out:
kfree(ctx->vec.key);
kfree(ctx->vec.iv);
Expand Down

0 comments on commit 8ff357a

Please sign in to comment.