therealromster / cryptsetup

Automatically exported from code.google.com/p/cryptsetup
GNU General Public License v2.0
0 stars 0 forks source link

tests should auto-skip when running kernel or crypto backend lacks support for requested features #92

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
the compat-test relies on aes-cbc-essiv:sha256 support being enabled ... but if 
it doesnt exist, the test cannot pass and it fails.

perhaps add a new argument to the `prepare` function that takes a list of 
features necessary for the following test to pass, and if those features are 
missing, it returns a value like 77.

so the format would turn into something like:
prepare "[1] open - compat image - acceptance check" new
if [ $? -ne 77 ] ; then
  echo "compatkey" | $CRYPTSETUP luksOpen $LOOPDEV $DEV_NAME || fail
  check_exists
fi

Original issue reported on code.google.com by vapier@gmail.com on 7 Jan 2011 at 11:20

GoogleCodeExporter commented 9 years ago
It was meant that aes-cbc-essiv:sha256 is default, so it should be always 
enabled.

But right, it is configurable now.

Original comment by gmazyl...@gmail.com on 7 Jan 2011 at 11:52

GoogleCodeExporter commented 9 years ago

Original comment by gmazyl...@gmail.com on 7 Jan 2011 at 11:53

GoogleCodeExporter commented 9 years ago
I changed tests so it runs even with another default e.g.
./configure --with-luks1-cipher=twofish --with-luks1-mode=cbc-plain
it still work.

But supporting aes-cbc-essiv:sha256 in kernel for test is still required for 
running tests.

I do not think it makes much sense to add another hacks - cryptsetup will work, 
just running tests require configured aes.

Original comment by gmazyl...@gmail.com on 10 Mar 2011 at 10:39

GoogleCodeExporter commented 9 years ago
the idea is to automate the process as much as possible.  we enable tests in 
Gentoo on a wide variety of configurations (since the end user compiles their 
own kernel).  if the test suite isnt reliable (i.e. it fails when features are 
not enabled instead of automatically skipping), then we'll have to simply 
ignore it all the time.

Original comment by vapier@gmail.com on 29 Mar 2011 at 4:27

GoogleCodeExporter commented 9 years ago
I understand but if you compile cryptsetup with default mode which is 
unsupported by your kernel, it will skip almost everything - in this case it is 
better to fail IMHO.

Also the included test image contains formatted header so skipping this core 
test is not good idea either...

Anyway, I like how Gentoo works here and included cryptsetup tests need to be 
somehow unified and universal so I hope I'll fix this somehow in future. (With 
various crypto backends is the same problem - some of them are missing some 
algorithms, tests should not fail because of this - currently it works just 
because all seems to support SHA1/256.)

Well, I'll reopen it, I have just no time resources to do it now.

Original comment by gmazyl...@gmail.com on 29 Mar 2011 at 9:02