From: Miroslav V. <mva...@re...> - 2011-12-16 09:39:09
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I'm pulling in this simple patch that should fix issues on slow machines as the luksFormat command takes there quite long. Thanks to Tony for helping to debug this! /M On 12/16/2011 10:32 AM, mva...@re... wrote: > From: Miroslav Vadkerti <mva...@re...> > > > Signed-off-by: Miroslav Vadkerti <mva...@re...> > --- > audit/crypto/tests/tp_luks_functions.bash | 6 ++++++ > 1 files changed, 6 insertions(+), 0 deletions(-) > > diff --git a/audit/crypto/tests/tp_luks_functions.bash b/audit/crypto/tests/tp_luks_functions.bash > index 21eb674..564736e 100644 > --- a/audit/crypto/tests/tp_luks_functions.bash > +++ b/audit/crypto/tests/tp_luks_functions.bash > @@ -23,10 +23,14 @@ > # default loop device to use > [ -z $LOOPDEV ] && LOOPDEV=$(losetup -f) > > +# set default expect timeout to 120s > +TIMEOUT=120 > + > # Create LUKS on $LOOPDEV with $LUKSPASS password > # $1 - password to use > function create_luks { > expect -c " > + set timeout $TIMEOUT > spawn cryptsetup luksFormat $LOOPDEV > expect {Are you sure} {send \"YES\r\"} > expect {Enter LUKS} {send \"$1\r\"} > @@ -77,6 +81,7 @@ function addkey_luks { > > # add new key slot > expect -c " > + set timeout $TIMEOUT > spawn cryptsetup luksAddKey $LOOPDEV > expect {Enter any} {send \"$1\r\"} > expect {Enter new} {send \"$2\r\"} > @@ -98,6 +103,7 @@ function open_luks { > > # try to open the device > expect -c " > + set timeout $TIMEOUT > spawn cryptsetup luksOpen $LOOPDEV $1 > expect {Enter passphrase} {send \"$2\r\"} > expect eof { exit 0 } - -- Miroslav Vadkerti :: QA Engineer / RHCE :: BaseOS QE - Security IRC mvadkert at #qe #urt #rpmdiff :: GnuPG ID 0x25881087 at pgp.mit.edu Phone +420 532 294 129 :: CZ +420 775 039 842 :: SK +421 904 135 440 Red Hat s.r.o, Purky?ova 99/71, 612 45, Brno, Czech Republic -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJO6xGzAAoJEBliWhMliBCHaR4H/0d/gwAdFwoY/nFu0DfozCqY 7dBIA9wwMV9CAqaaTsN8xfLQFzUrwjvMOyVjLxcAtHBjPcdQ7JLGlPfhT8kFrEtp +f9LEeSQCAFpRRCj43MUCX83uEoxQuN/sImOj7qHAw4VgWc1IJ5sHOvmbkOwVG/p A78lOMx1NHN6MsR00YW4qTttObtWNeXKGmLqC01iVo2nfLG9SgJevg58q1v7AB3h zryIxgwe5Y4pxoLSwYSstIxpZHybNuFTN62EiMazqT9m75lzBgmutxxRDhN4RTcQ gOroJZW1p39WLGYFn30i7HJd1Ja+ZIym6AmaplnTR24ZCAcc0l7njs/ISd30/aM= =jwUc -----END PGP SIGNATURE----- |