mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
tests: Speed up conventional encryption tests for gpg.
* tests/openpgp/conventional-mdc.test: Add an s2k-count option. * tests/openpgp/conventional.test: Ditto. -- Due to measuring the iteration count for the passphrase hashing, the conventional encryption tests are running quite slow. This patch fixes it by using a fixed and lower value for the iteration count. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
2d68dc437e
commit
2543f0ab9c
@ -10,6 +10,10 @@
|
|||||||
|
|
||||||
. $srcdir/defs.inc || exit 3
|
. $srcdir/defs.inc || exit 3
|
||||||
|
|
||||||
|
# We use use a lower than default value for the S2K count to run the
|
||||||
|
# tests faster. We used a fixed value of 65536 already the past.
|
||||||
|
s2k="--s2k-count=65536"
|
||||||
|
|
||||||
#info Checking conventional encryption
|
#info Checking conventional encryption
|
||||||
for ciph in `all_cipher_algos`; do
|
for ciph in `all_cipher_algos`; do
|
||||||
progress "$ciph"
|
progress "$ciph"
|
||||||
@ -20,9 +24,9 @@ for ciph in `all_cipher_algos`; do
|
|||||||
else
|
else
|
||||||
dd if=data-80000 of=z bs=1 count=$i 2>/dev/null
|
dd if=data-80000 of=z bs=1 count=$i 2>/dev/null
|
||||||
fi
|
fi
|
||||||
echo "Hier spricht HAL" | $GPG --passphrase-fd 0 \
|
echo "Hier spricht HAL" | $GPG --passphrase-fd 0 $s2k \
|
||||||
--force-mdc --cipher $ciph -c -o x --yes z
|
--force-mdc --cipher $ciph -c -o x --yes z
|
||||||
echo "Hier spricht HAL" | $GPG --passphrase-fd 0 \
|
echo "Hier spricht HAL" | $GPG --passphrase-fd 0 $s2k \
|
||||||
-o y --yes x
|
-o y --yes x
|
||||||
cmp z y || error "$ciph/$i: mismatch"
|
cmp z y || error "$ciph/$i: mismatch"
|
||||||
done
|
done
|
||||||
|
@ -10,19 +10,23 @@
|
|||||||
|
|
||||||
. $srcdir/defs.inc || exit 3
|
. $srcdir/defs.inc || exit 3
|
||||||
|
|
||||||
|
# We use use a lower than default value for the S2K count to run the
|
||||||
|
# tests faster. We used a fixed value of 65536 already the past.
|
||||||
|
s2k="--s2k-count=65536"
|
||||||
|
|
||||||
#info Checking conventional encryption
|
#info Checking conventional encryption
|
||||||
for i in plain-2 data-32000 ; do
|
for i in plain-2 data-32000 ; do
|
||||||
echo "Hier spricht HAL" | $GPG --passphrase-fd 0 -c -o x --yes $i
|
echo "Hier spricht HAL" | $GPG --passphrase-fd 0 $s2k -c -o x --yes $i
|
||||||
echo "Hier spricht HAL" | $GPG --passphrase-fd 0 -o y --yes x
|
echo "Hier spricht HAL" | $GPG --passphrase-fd 0 $s2k -o y --yes x
|
||||||
cmp $i y || error "$i: mismatch"
|
cmp $i y || error "$i: mismatch"
|
||||||
done
|
done
|
||||||
|
|
||||||
for a in `all_cipher_algos`; do
|
for a in `all_cipher_algos`; do
|
||||||
progress "$a"
|
progress "$a"
|
||||||
for i in plain-1 data-80000 ; do
|
for i in plain-1 data-80000 ; do
|
||||||
echo "Hier spricht HAL" | $GPG --passphrase-fd 0 \
|
echo "Hier spricht HAL" | $GPG --passphrase-fd 0 $s2k \
|
||||||
--cipher-algo $a -c -o x --yes $i
|
--cipher-algo $a -c -o x --yes $i
|
||||||
echo "Hier spricht HAL" | $GPG --passphrase-fd 0 -o y --yes x
|
echo "Hier spricht HAL" | $GPG --passphrase-fd 0 $s2k -o y --yes x
|
||||||
cmp $i y || error "$i: ($a) mismatch"
|
cmp $i y || error "$i: ($a) mismatch"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user