28 Commits

Author SHA1 Message Date
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
Milan Broz
8f442bc97a tests: Avoid new plain type warnings if missing options. 2023-10-05 10:31:41 +02:00
Milan Broz
5042ec2cd0 Use unconditionally sleep 1 in scsi_debug test 2023-06-04 11:59:05 +02: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
089edb74b4 Fix return code for skipped align tests. 2021-07-29 20:19:45 +02:00
Milan Broz
8c60cf8645 Silence also scsi_debug module load in tests. 2021-07-29 17:41:25 +02:00
Milan Broz
cab332c367 Silence all modprobe/rmmod calls in tests.
On systems where are modules compiled-in or missing this produces nois,
test will be skipped later anyway.
2021-07-29 16:20:00 +02:00
Milan Broz
c403f73ad0 Skip tests id scsi_debug is compiled-in or in use.
We need standalone scsi_debug module for some tests.
2021-07-28 23:20:45 +02: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
Ondrej Kozina
61305a50c1 Add delay=0 parameter to scsi_debug in all tests.
Speed up tests significantly.
2018-10-11 16:21:36 +02:00
Ondrej Kozina
ee689d88b4 Add blkid scan when attemting to open plain device.
Warn user about existing device signatures on candidate ciphertext
device and prompt for action confirmation.

Fixes #411.
2018-09-25 13:13:18 +02:00
Milan Broz
cd2a1a169f Skip test if scsi_debug is not available. 2018-07-07 10:24:35 +02:00
Ondrej Kozina
13796ee4c7 Add --with-default-luks-format configure time option.
Add option to override default LUKS format version (currently LUKS1).
2018-04-25 12:19:45 +02: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
8debcf9f92 Do not use too complicated regular expression in test. 2017-08-15 12:01:59 +02:00
Milan Broz
166d23a813 Fix tests for GNU grep syntax. 2014-07-27 16:31:46 +02:00
Milan Broz
20149281a4 Fix tests to work with pwquality compiled in. 2013-01-10 15:34:11 +01:00
Milan Broz
570b0ecd49 Replace some tabs. 2012-03-20 16:47:20 +01:00
Milan Broz
e5244bc47c Fix new tests to use sha1 (ripemd160 not supported in some backends).
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@579 36d66b0a-2a48-0410-832c-cd162a569da5
2011-07-25 15:24:16 +00:00
Milan Broz
9c71c74d59 Add --enable-discards option to allow discards/TRIM requests.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@572 36d66b0a-2a48-0410-832c-cd162a569da5
2011-07-17 22:35:40 +00:00