summaryrefslogtreecommitdiffstats
path: root/tests/00modules-test
blob: 64e054a0535ba64868f6b07f0091bb54bd89021d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash

[ -z "$CRYPTSETUP_PATH" ] && CRYPTSETUP_PATH=".."

function pversion() {
	if [ ! -x $CRYPTSETUP_PATH/$1 ] ; then
		return
	fi

	echo -n "$CRYPTSETUP_PATH/"
	$CRYPTSETUP_PATH/$1 --version
}

echo "Cryptsetup test environment ($(date))"
uname -a
if [ "$(cat /proc/sys/crypto/fips_enabled 2>/dev/null)" = "1" ] ; then
	echo "Kernel running in FIPS mode."
fi

if [ -f /etc/os-release ] ; then
	source /etc/os-release
	echo "$PRETTY_NAME ($NAME) $VERSION"
fi

echo "Memory"
free -h

pversion cryptsetup
pversion veritysetup
pversion integritysetup
pversion cryptsetup-reencrypt

[ $(id -u) != 0 ] && exit 77

modprobe dm-crypt     >/dev/null 2>&1
modprobe dm-verity    >/dev/null 2>&1
modprobe dm-integrity >/dev/null 2>&1
modprobe dm-zero      >/dev/null 2>&1

dmsetup version

echo "Device mapper targets:"
dmsetup targets

exit 0