aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/149
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2017-06-26 13:35:08 +0100
committerMax Reitz <mreitz@redhat.com>2017-07-11 17:45:00 +0200
commit307d999198599fe672e69379c99b6db17b961b4e (patch)
tree462a36f09f39172a8ff272e6bfd65338ae7d44a3 /tests/qemu-iotests/149
parent13a1d4a71bdbc0968886ed656dee0e35dfaaf906 (diff)
iotests: reduce PBKDF iterations when testing LUKS
By default the PBKDF algorithm used with LUKS is tuned based on the number of iterations to produce 1 second of running time. This makes running the I/O test with the LUKS format orders of magnitude slower than with qcow2/raw formats. When creating LUKS images, set the iteration time to a 10ms to reduce the time overhead for LUKS, since security does not matter in I/O tests. Previously a full 'check -luks' would take $ time ./check -luks Passed all 22 tests real 23m9.988s user 21m46.223s sys 0m22.841s Now it takes $ time ./check -luks Passed all 22 tests real 4m39.235s user 3m29.590s sys 0m24.234s Still slow compared to qcow2/raw, but much improved none the less. Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 20170626123510.20134-4-berrange@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/149')
-rwxr-xr-xtests/qemu-iotests/1493
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/qemu-iotests/149 b/tests/qemu-iotests/149
index 84072513db..f62e618727 100755
--- a/tests/qemu-iotests/149
+++ b/tests/qemu-iotests/149
@@ -136,6 +136,7 @@ def cryptsetup_add_password(config, slot):
args = ["luksAddKey", config.image_path(),
"--key-slot", slot,
"--key-file", "-",
+ "--iter-time", "10",
pwfile]
cryptsetup(args, password)
@@ -164,6 +165,7 @@ def cryptsetup_format(config):
args.extend(["--hash", config.hash])
args.extend(["--key-slot", slot])
args.extend(["--key-file", "-"])
+ args.extend(["--iter-time", "10"])
args.append(config.image_path())
cryptsetup(args, password)
@@ -230,6 +232,7 @@ def qemu_img_create(config, size_mb):
opts = [
"key-secret=sec0",
+ "iter-time=10",
"cipher-alg=%s-%d" % (config.cipher, config.keylen),
"cipher-mode=%s" % config.mode,
"ivgen-alg=%s" % config.ivgen,