Milan Broz
c9008528f9
tests: Remove function xx() bashism.
...
Posix does not use function keyword, moreover, we use it inconsistently.
2025-01-27 20:43:33 +01:00
Milan Broz
3d535dcf31
tests: Add trap for segfault and sigabrt
...
If bash test script uses a pattern that test that command should fail
command && fail
(IOW fail function is called only if command exited successfully),
it can mask potential segfault, as it return non-zero exit code.
Fix it by using trap for scripts that uses this pattern.
The same applies for SIGABRT (abort() call).
2025-01-27 20:42:25 +01:00
Ondrej Kozina
9a5a3855a0
Enable valgrind tests in meson.
2023-11-15 18:40:44 +01:00
daniel.zatovic
429afe8fc3
Add valgrind support to more tests.
2022-08-10 07:45:13 +00:00
Alyssa Ross
c0cef43a4e
Skip cryptsetup tests when cryptsetup is disabled
...
If configured with --disable-cryptsetup (e.g. if only veritysetup is
required), these tests won't be able to run cryptsetup, so they need
to be skipped.
2022-02-02 16:51:49 +00:00
Milan Broz
91db91352f
Get rid of SHA1 in tests.
...
OpenSSL with FIPS provider now doesn't not support SHA1.
Kernel still does, but some operations fail anyway (we get
hash size from crypto backend).
Let's remove most of the SHA1 use in tests, SHA1 removal
will happen anyway.
The LUKS1 compatimage is regenerated with the same parameters,
just hash is switched to sha256 so we do not need to fix tests.
2022-01-21 12:29:36 +01:00
Milan Broz
57eab17262
Use tabs in tests scripts consistently.
...
Really...
2020-12-02 13:04:44 +01:00
Milan Broz
ff364347cf
Add FAIL backtrace to all bash tests.
2019-06-20 15:11:56 +02:00
Ondrej Kozina
ff0030d74f
Add missing --retry parameter in tests cleanup.
2019-06-18 13:26:20 +02:00
Milan Broz
456ab38caa
Allow to set CRYPTSETUP_PATH in tests for system installed cryptsetup tools.
...
Run: make check CRYPTSETUP_PATH=/sbin
2019-03-08 08:16:45 +01:00
Milan Broz
943cc16020
Fix test to print exit line and use explicit key size.
2019-01-25 13:38:24 +01:00
Milan Broz
238c74643b
Add some more hash algorithms test.
2019-01-15 14:06:51 +01:00
Milan Broz
d77bbe93c1
Use non-recursive automake.
...
This change also causes that now binaries and libraries are placed in
build root directory.
Now we can use subdir-objects for automake.
2017-10-12 11:48:17 +02:00
Milan Broz
a0880b64f2
Add magic exit code for automake to count skipped tests.
2017-08-23 16:54:04 +02:00
Milan Broz
31a4d552a2
Support keyfile offset and keyfile size option even for plain volumes.
...
For historic reasons, in the plain mode the hashing is not used
if keyfile is used (with exception of --key-file=-).
Print warning if the parameters are ignored.
For other cases, uses keyfile offset, keyfile size and hash
as psecified on commandline.
Partially fixes issue#243
2015-02-20 12:55:21 +01:00
Milan Broz
09c229fe6c
Support limitation for "plain" hash (no hash).
...
This can be used for mapping problematic cryptosystems which
wipes some key (losetup sometimes set last byte to zero).
2013-11-10 19:31:02 +01:00
Milan Broz
db56125708
Fix hash limiting if parameter is not a number.
...
If hash lenght specification was not a number, the whole key was set
to zero instead of command failure.
Resolves
https://bugzilla.redhat.com/show_bug.cgi?id=1028362
2013-11-10 19:08:01 +01:00
Milan Broz
96d67485d9
Seems that dmsetup table is broken in recent lvm2, let's support "x: table" as well.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@551 36d66b0a-2a48-0410-832c-cd162a569da5
2011-06-13 16:45:09 +00:00
Milan Broz
b53b577b19
Fix keyfile=- processing in create command (1.3.0, issue 104)
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@524 36d66b0a-2a48-0410-832c-cd162a569da5
2011-05-17 15:34:40 +00:00
Milan Broz
93da52f883
Rewrite key input handling, add limits.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@474 36d66b0a-2a48-0410-832c-cd162a569da5
2011-03-19 00:17:10 +00:00
Milan Broz
25512d89ae
Clean up plain password hashing, do not ignore error in crypto backend.
...
(New backend can fail there).
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@451 36d66b0a-2a48-0410-832c-cd162a569da5
2011-03-13 23:50:49 +00:00
Milan Broz
2124cbf5ee
Fix error output redirection in tests.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@439 36d66b0a-2a48-0410-832c-cd162a569da5
2011-03-10 21:01:49 +00:00
Milan Broz
ca73541753
Add settle to test scripts (needed only for old systems).
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@403 36d66b0a-2a48-0410-832c-cd162a569da5
2010-12-19 23:46:10 +00:00
Milan Broz
058976ff08
Add password hash test for create command.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@401 36d66b0a-2a48-0410-832c-cd162a569da5
2010-12-10 15:36:41 +00:00