diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-10-03 14:48:49 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-10-03 14:48:52 +0200 |
commit | 1fb4cee4c60bdefd8c0e95d518f541a760fed70d (patch) | |
tree | fc698a361e3d4635132d0b657b1dc9c2d1805c48 | |
parent | 1f65960fac8cad4d7f86a8ce9d7a2c15cc8a0c0e (diff) | |
download | gnutls-tmp-armv8.tar.gz |
tests: introduced further parallelization in provable* teststmp-armv8
This runs independent verification steps in parallel, improving running time significantly.
-rwxr-xr-x | tests/cert-tests/provable-dh | 19 | ||||
-rwxr-xr-x | tests/cert-tests/provable-privkey | 41 | ||||
-rwxr-xr-x | tests/cert-tests/provable-privkey-dsa2048 | 21 | ||||
-rwxr-xr-x | tests/cert-tests/provable-privkey-rsa2048 | 21 |
4 files changed, 58 insertions, 44 deletions
diff --git a/tests/cert-tests/provable-dh b/tests/cert-tests/provable-dh index d1c1546b5f..452a725314 100755 --- a/tests/cert-tests/provable-dh +++ b/tests/cert-tests/provable-dh @@ -46,18 +46,19 @@ if test "${rc}" != "0"; then exit 1 fi -${VALGRIND} "${CERTTOOL}" --verify-provable-privkey --load-privkey "$OUTFILE" -rc=$? +${VALGRIND} "${CERTTOOL}" --verify-provable-privkey --load-privkey "$OUTFILE" & +PID1=$! -if test "${rc}" != "0"; then - echo "test1: Could not generate DH parameters" - exit 1 -fi +${VALGRIND} "${CERTTOOL}" --verify-provable-privkey --load-privkey "$OUTFILE" --seed "$SEED" & +PID2=$! -${VALGRIND} "${CERTTOOL}" --verify-provable-privkey --load-privkey "$OUTFILE" --seed "$SEED" -rc=$? +wait $PID1 +rc1=$? -if test "${rc}" != "0"; then +wait $PID2 +rc2=$? + +if test "${rc1}" != "0" || test "${rc2}" != "0"; then echo "test1: Could not verify the generated parameters" exit 1 fi diff --git a/tests/cert-tests/provable-privkey b/tests/cert-tests/provable-privkey index 2852f34cd6..4e11c61a9a 100755 --- a/tests/cert-tests/provable-privkey +++ b/tests/cert-tests/provable-privkey @@ -30,21 +30,13 @@ if ! test -z "${VALGRIND}"; then fi #RSA keys -${VALGRIND} "${CERTTOOL}" --verify-provable-privkey --load-privkey "${srcdir}/data/provable2048.pem" -rc=$? +${VALGRIND} "${CERTTOOL}" --verify-provable-privkey --load-privkey "${srcdir}/data/provable2048.pem" & +PID1=$! -if test "${rc}" != "0"; then - echo "Could not verify the 2048-bit key" - exit 1 -fi -${VALGRIND} "${CERTTOOL}" --verify-provable-privkey --load-privkey "${srcdir}/data/provable3072.pem" -rc=$? +${VALGRIND} "${CERTTOOL}" --verify-provable-privkey --load-privkey "${srcdir}/data/provable3072.pem" & +PID2=$! -if test "${rc}" != "0"; then - echo "Could not verify the 3072-bit key" - exit 1 -fi if test "${FIPS140}" = 1;then SEED="30:EC:33:4F:97:DB:C0:BA:9C:86:52:A7:B5:D3:F7:B2:DB:BB:48:A4:84:2E:19:0D:21:0E:01:DA:BD:53:59:81:50:37:55:EE:96:A2:70:A5:98:E9:D9:1B:22:54:66:91:69:EB:DF:45:99:D9:F7:2A:CA" @@ -55,10 +47,29 @@ DSAFILE=provable-dsa2048.pem fi #DSA keys -${VALGRIND} "${CERTTOOL}" --verify-provable-privkey --load-privkey "${srcdir}/data/${DSAFILE}" -rc=$? +${VALGRIND} "${CERTTOOL}" --verify-provable-privkey --load-privkey "${srcdir}/data/${DSAFILE}" & +PID3=$! + +wait $PID1 +rc1=$? + +wait $PID2 +rc2=$? + +wait $PID3 +rc3=$? + +if test "${rc1}" != "0"; then + echo "Could not verify the 2048-bit key" + exit 1 +fi + +if test "${rc2}" != "0"; then + echo "Could not verify the 3072-bit key" + exit 1 +fi -if test "${rc}" != "0"; then +if test "${rc3}" != "0"; then echo "Could not verify the 2048-bit DSA key" exit 1 fi diff --git a/tests/cert-tests/provable-privkey-dsa2048 b/tests/cert-tests/provable-privkey-dsa2048 index 160998ff07..fa65f091a4 100755 --- a/tests/cert-tests/provable-privkey-dsa2048 +++ b/tests/cert-tests/provable-privkey-dsa2048 @@ -37,19 +37,20 @@ if test "${rc}" != "0"; then exit 1 fi -${VALGRIND} "${CERTTOOL}" --verify-provable-privkey --load-privkey "$OUTFILE" -rc=$? +${VALGRIND} "${CERTTOOL}" --verify-provable-privkey --load-privkey "$OUTFILE" & +PID1=$! -if test "${rc}" != "0"; then - echo "Could not verify the generated key 1" - exit 1 -fi +${VALGRIND} "${CERTTOOL}" --verify-provable-privkey --load-privkey "$OUTFILE" --seed "$SEED" & +PID2=$! -${VALGRIND} "${CERTTOOL}" --verify-provable-privkey --load-privkey "$OUTFILE" --seed "$SEED" -rc=$? +wait $PID1 +rc1=$? -if test "${rc}" != "0"; then - echo "Could not verify the generated key 2" +wait $PID2 +rc2=$? + +if test "${rc1}" != "0" || test "${rc2}" != "0"; then + echo "Could not verify the generated parameters" exit 1 fi diff --git a/tests/cert-tests/provable-privkey-rsa2048 b/tests/cert-tests/provable-privkey-rsa2048 index 7f3e035a3a..3cd7aab441 100755 --- a/tests/cert-tests/provable-privkey-rsa2048 +++ b/tests/cert-tests/provable-privkey-rsa2048 @@ -37,19 +37,20 @@ if test "${rc}" != "0"; then exit 1 fi -${VALGRIND} "${CERTTOOL}" --verify-provable-privkey --load-privkey "$OUTFILE" -rc=$? +${VALGRIND} "${CERTTOOL}" --verify-provable-privkey --load-privkey "$OUTFILE" & +PID1=$! -if test "${rc}" != "0"; then - echo "Could not verify the generated key 1" - exit 1 -fi +${VALGRIND} "${CERTTOOL}" --verify-provable-privkey --load-privkey "$OUTFILE" --seed "AF:BF:D6:96:BA:5D:05:E3:78:A9:4B:BF:E2:95:BA:F9:94:AC:B8:7F:BC:C8:ED:FF:7A:48:EE:4F" & +PID2=$! -${VALGRIND} "${CERTTOOL}" --verify-provable-privkey --load-privkey "$OUTFILE" --seed "AF:BF:D6:96:BA:5D:05:E3:78:A9:4B:BF:E2:95:BA:F9:94:AC:B8:7F:BC:C8:ED:FF:7A:48:EE:4F" -rc=$? +wait $PID1 +rc1=$? -if test "${rc}" != "0"; then - echo "Could not verify the generated key 2" +wait $PID2 +rc2=$? + +if test "${rc1}" != "0" || test "${rc2}" != "0"; then + echo "test1: Could not verify the generated parameters" exit 1 fi |