The logical sector size used by LUKS1 is 512 bytes and LUKS2 uses 512 to 4069 bytes. The default password used is "pass", but can be overridden by setting the PASS environment variable. The device mapper name is set to the name of the temp directory so that its easy to correlate device mapper name with a particular test run. Also since this name is unique per test run, multiple simultaneous test runs are allowed. Note that cryptsetup is passing the --disable-locks parameter to allow cryptsetup run successfully when /run/lock/cryptsetup is not accessible. Since the device mapper name is unique per test run, there is no need to worry about locking the device to serialize access. Signed-off-by: Pierre-Louis Bonicoli <pierre-louis.bonicoli@libregerbil.fr> Tested-by: Glenn Washburn <development@efficientek.com> Signed-off-by: Glenn Washburn <development@efficientek.com> Reviewed-by: Patrick Steinhardt <ps@pks.im> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
24 lines
377 B
Plaintext
24 lines
377 B
Plaintext
#!@BUILD_SHEBANG@
|
|
|
|
set -e
|
|
|
|
if [ "x$EUID" = "x" ] ; then
|
|
EUID=`id -u`
|
|
fi
|
|
|
|
if [ "$EUID" != 0 ] ; then
|
|
exit 99
|
|
fi
|
|
|
|
if ! which mkfs.ext2 >/dev/null 2>&1; then
|
|
echo "mkfs.ext2 not installed; cannot test luks2."
|
|
exit 99
|
|
fi
|
|
|
|
if ! which cryptsetup >/dev/null 2>&1; then
|
|
echo "cryptsetup not installed; cannot test luks2."
|
|
exit 99
|
|
fi
|
|
|
|
"@builddir@/grub-fs-tester" luks2
|