geli: optimize tests
authorasomers <asomers@FreeBSD.org>
Mon, 8 Jan 2018 00:10:45 +0000 (00:10 +0000)
committerasomers <asomers@FreeBSD.org>
Mon, 8 Jan 2018 00:10:45 +0000 (00:10 +0000)
commitfa15b017173665c4b88f0b097516de726837f693
treec45c31a7f1be3b9ffac943202614a0a18329c728
parentfd459f1474747c82eeb7be3f8057e81cd0a004bc
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
tests/sys/geom/class/eli/conf.sh
tests/sys/geom/class/eli/integrity_test.sh
tests/sys/geom/class/eli/onetime_test.sh