diff options
author | Alan Somers <asomers@FreeBSD.org> | 2018-01-08 00:10:45 +0000 |
---|---|---|
committer | Alan Somers <asomers@FreeBSD.org> | 2018-01-08 00:10:45 +0000 |
commit | 1d23aa6ec73baf53cb6f336c4ce91d6cb1c1fb0f (patch) | |
tree | c45c31a7f1be3b9ffac943202614a0a18329c728 /tests/sys/geom/class/eli/onetime_test.sh | |
parent | 4b6b56b32b4887cb85ca9a0fefb985f52da722a7 (diff) | |
download | src-1d23aa6ec73baf53cb6f336c4ce91d6cb1c1fb0f.tar.gz src-1d23aa6ec73baf53cb6f336c4ce91d6cb1c1fb0f.zip |
geli: optimize tests
Reduce the geli tests' runtime by about a third:
* In integrity_test:copy, use a file-backed md(4) device instead of a
malloc'd one. That way we can corrupt the underlying storage without
needing to detach and reattach the geli device.
* In integrity_test:{copy, hmac, data} and onetime_test:{onetime,
onetime_a}, move reads of /dev/random out of the loop.
MFC after: 2 weeks
Notes
Notes:
svn path=/head/; revision=327685
Diffstat (limited to 'tests/sys/geom/class/eli/onetime_test.sh')
-rw-r--r-- | tests/sys/geom/class/eli/onetime_test.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/sys/geom/class/eli/onetime_test.sh b/tests/sys/geom/class/eli/onetime_test.sh index e37875850984..fff1a1fa396b 100644 --- a/tests/sys/geom/class/eli/onetime_test.sh +++ b/tests/sys/geom/class/eli/onetime_test.sh @@ -10,7 +10,6 @@ onetime_test() atf_check -s exit:0 -o ignore -e ignore \ geli onetime -e $ealgo -l $keylen -s $secsize ${md} - atf_check dd if=/dev/random of=rnd bs=${secsize} count=${sectors} status=none atf_check dd if=rnd of=/dev/${md}.eli bs=${secsize} count=${sectors} status=none md_rnd=`dd if=rnd bs=${secsize} count=${sectors} status=none | md5` @@ -82,7 +81,8 @@ onetime_a_body() . $(atf_get_srcdir)/conf.sh sectors=8 - atf_check dd if=/dev/random of=rnd bs=1024 count=1024 status=none + atf_check dd if=/dev/random of=rnd bs=$MAX_SECSIZE count=$sectors \ + status=none for_each_geli_config onetime_a_test } onetime_a_cleanup() |