summaryrefslogtreecommitdiffstats
path: root/tests/bitlk-compat-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/bitlk-compat-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/bitlk-compat-test')
-rwxr-xr-xtests/bitlk-compat-test16
1 files changed, 13 insertions, 3 deletions
diff --git a/tests/bitlk-compat-test b/tests/bitlk-compat-test
index 8559e06..aa4a71f 100755
--- a/tests/bitlk-compat-test
+++ b/tests/bitlk-compat-test
@@ -8,8 +8,12 @@ TST_DIR=bitlk-images
MAP=bitlktst
DUMP_VK_FILE=bitlk-test-vk
-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
[ -z "$srcdir" ] && srcdir="."
@@ -93,7 +97,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()
@@ -156,6 +163,9 @@ for file in $(ls $TST_DIR/bitlk-*) ; do
echo $PASSPHRASE | $CRYPTSETUP bitlkDump -r $file --dump-volume-key --volume-key-file $DUMP_VK_FILE >/dev/null 2>&1
ret=$?
[ $ret -eq 0 ] || fail " failed to dump volume key"
+ $CRYPTSETUP bitlkOpen -r $file $MAP --volume-key-file $DUMP_VK_FILE --test-passphrase >/dev/null 2>&1
+ ret=$?
+ [ $ret -eq 1 ] || fail " test passphrase with volume key unexpectedly succeeded"
$CRYPTSETUP bitlkOpen -r $file $MAP --volume-key-file $DUMP_VK_FILE >/dev/null 2>&1
ret=$?
[ $ret -eq 1 ] && ( echo "$file" | grep -q -e "aes-cbc" ) && echo " [N/A]" && continue