summaryrefslogtreecommitdiffstats
path: root/tests/reencryption-compat-test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 08:35:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 08:35:41 +0000
commitf7458043ae6a2d2d54b911fac52e50341646bef2 (patch)
tree6c58e084cd8728490fd5bb8eead07db0be0038f4 /tests/reencryption-compat-test
parentAdding upstream version 2:2.6.1. (diff)
downloadcryptsetup-f7458043ae6a2d2d54b911fac52e50341646bef2.tar.xz
cryptsetup-f7458043ae6a2d2d54b911fac52e50341646bef2.zip
Adding upstream version 2:2.7.0.upstream/2%2.7.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/reencryption-compat-test')
-rwxr-xr-xtests/reencryption-compat-test17
1 files changed, 12 insertions, 5 deletions
diff --git a/tests/reencryption-compat-test b/tests/reencryption-compat-test
index 453831d..68a8c1f 100755
--- a/tests/reencryption-compat-test
+++ b/tests/reencryption-compat-test
@@ -6,8 +6,12 @@ REENC_BIN=$CRYPTSETUP
REENC="$REENC_BIN reencrypt"
FAST_PBKDF="--pbkdf-force-iterations 1000 --pbkdf pbkdf2"
-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
DEV_NAME=reenc9768
DEV_NAME2=reenc1273
@@ -33,7 +37,7 @@ function fips_mode()
function del_scsi_device()
{
rmmod scsi_debug >/dev/null 2>&1
- sleep 2
+ sleep 1
}
function remove_mapping()
@@ -68,7 +72,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()
@@ -88,7 +95,7 @@ function add_scsi_device() {
exit 77
fi
- sleep 2
+ sleep 1
SCSI_DEV="/dev/"$(grep -l -e scsi_debug /sys/block/*/device/model | cut -f4 -d /)
[ -b $SCSI_DEV ] || fail "Cannot find $SCSI_DEV."
}