Blob Blame History Raw
diff -rupN cryptsetup-2.0.6.old/tests/align-test2 cryptsetup-2.0.6/tests/align-test2
--- cryptsetup-2.0.6.old/tests/align-test2	2018-12-03 12:53:41.293185399 +0100
+++ cryptsetup-2.0.6/tests/align-test2	2018-12-03 12:54:27.821936718 +0100
@@ -9,7 +9,9 @@ PWD1="93R4P4pIqAH8"
 PWD2="mymJeD8ivEhE"
 FAST_PBKDF="--pbkdf pbkdf2 --pbkdf-force-iterations 1000"
 
-EXPCT=8192
+# FIXME: we need some sane API to get this information. This is hack.
+LUKS2_HDR_DEFAULT_LEN=$(grep -e "#define LUKS2_HDR_DEFAULT_LEN" ../lib/luks2/luks2.h | cut -d ' ' -f 3)
+EXPCT=$((LUKS2_HDR_DEFAULT_LEN/512))
 
 cleanup() {
 	udevadm settle >/dev/null 2>&1