summaryrefslogtreecommitdiffstats
path: root/tests/align-test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 08:35:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 08:35:42 +0000
commit8909d83a3ed226e4a7c962261217cb2c14ff2ec9 (patch)
tree6244f99976b171d94833db21dc498c3a89d04fe4 /tests/align-test
parentReleasing progress-linux version 2:2.6.1-6~progress7.99u1. (diff)
downloadcryptsetup-8909d83a3ed226e4a7c962261217cb2c14ff2ec9.tar.xz
cryptsetup-8909d83a3ed226e4a7c962261217cb2c14ff2ec9.zip
Merging upstream version 2:2.7.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/align-test')
-rwxr-xr-xtests/align-test18
1 files changed, 13 insertions, 5 deletions
diff --git a/tests/align-test b/tests/align-test
index 5941cde..d2932ae 100755
--- a/tests/align-test
+++ b/tests/align-test
@@ -12,8 +12,13 @@ FAST_PBKDF="--pbkdf-force-iterations 1000"
FIPS_MODE=$(cat /proc/sys/crypto/fips_enabled 2>/dev/null)
-CRYPTSETUP_VALGRIND=../.libs/cryptsetup
-CRYPTSETUP_LIB_VALGRIND=../.libs
+if [ -n "$CRYPTSETUP_TESTS_RUN_IN_MESON" ]; then
+ CRYPTSETUP_VALGRIND=$CRYPTSETUP
+else
+ CRYPTSETUP_VALGRIND=../.libs/cryptsetup
+ CRYPTSETUP_LIB_VALGRIND=../.libs
+fi
+
function fips_mode()
{
@@ -54,7 +59,10 @@ function valgrind_setup()
{
command -v valgrind >/dev/null || fail "Cannot find valgrind."
[ ! -f $CRYPTSETUP_VALGRIND ] && fail "Unable to get location of cryptsetup executable."
- export LD_LIBRARY_PATH="$CRYPTSETUP_LIB_VALGRIND:$LD_LIBRARY_PATH"
+ [ ! -f valg.sh ] && fail "Unable to get location of valg runner script."
+ if [ -z "$CRYPTSETUP_TESTS_RUN_IN_MESON" ]; then
+ export LD_LIBRARY_PATH="$CRYPTSETUP_LIB_VALGRIND:$LD_LIBRARY_PATH"
+ fi
}
function valgrind_run()
@@ -92,7 +100,7 @@ add_device() {
exit 77
fi
- sleep 2
+ sleep 1
DEV=$(grep -l -e scsi_debug /sys/block/*/device/model | cut -f4 -d /)
if [ ! -e /sys/block/$DEV/alignment_offset ] ; then
@@ -176,7 +184,7 @@ format_plain() # sector size
{
echo -n "Formatting plain device (sector size $1)..."
if [ -n "$DM_SECTOR_SIZE" ] ; then
- echo $PWD1 | $CRYPTSETUP open --type plain --hash sha256 --sector-size $1 $DEV $DEV_NAME || fail
+ echo $PWD1 | $CRYPTSETUP open --type plain --cipher aes-cbc-essiv:sha256 --key-size 256 --hash sha256 --sector-size $1 $DEV $DEV_NAME || fail
$CRYPTSETUP close $DEV_NAME || fail
echo "PASSED"
else