From: Cristian Stoica Date: Thu, 18 Jul 2013 15:57:07 +0000 (+0300) Subject: crypto: testmgr - remove double execution of the same test suite X-Git-Tag: accepted/tizen/common/20141203.182822~1545^2~56 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=032c8cacc702da8a53c24d24a4e3c3a572a34078;p=platform%2Fkernel%2Flinux-arm64.git crypto: testmgr - remove double execution of the same test suite This patch removes redundant execution of the same test suite in cases where alg and driver variables are the same (e.g. when alg_test is called from tcrypt_test) Signed-off-by: Cristian Stoica Reviewed-by: Horia Geanta Reviewed-by: Ruchika Gupta Signed-off-by: Herbert Xu --- diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 2f00607..e091ef6 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c @@ -3234,7 +3234,7 @@ int alg_test(const char *driver, const char *alg, u32 type, u32 mask) if (i >= 0) rc |= alg_test_descs[i].test(alg_test_descs + i, driver, type, mask); - if (j >= 0) + if (j >= 0 && j != i) rc |= alg_test_descs[j].test(alg_test_descs + j, driver, type, mask);