"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/reencryption-compat-test" between
cryptsetup-2.3.6.tar.xz and cryptsetup-2.4.0.tar.xz

About: cryptsetup is a utility used to conveniently setup disk encryption based on the dm-crypt kernel module. These include plain dm-crypt volumes, LUKS volumes, loop-AES and TrueCrypt compatible format.

reencryption-compat-test  (cryptsetup-2.3.6.tar.xz):reencryption-compat-test  (cryptsetup-2.4.0.tar.xz)
skipping to change at line 23 skipping to change at line 23
KEY1=key1 KEY1=key1
PWD1="93R4P4pIqAH8" PWD1="93R4P4pIqAH8"
PWD2="1cND4319812f" PWD2="1cND4319812f"
PWD3="1-9Qu5Ejfnqv" PWD3="1-9Qu5Ejfnqv"
MNT_DIR=./mnt_luks MNT_DIR=./mnt_luks
START_DIR=$(pwd) START_DIR=$(pwd)
function del_scsi_device() function del_scsi_device()
{ {
rmmod scsi_debug 2>/dev/null rmmod scsi_debug >/dev/null 2>&1
sleep 2 sleep 2
} }
function remove_mapping() function remove_mapping()
{ {
[ -b /dev/mapper/$DEV_NAME2 ] && dmsetup remove --retry $DEV_NAME2 [ -b /dev/mapper/$DEV_NAME2 ] && dmsetup remove --retry $DEV_NAME2
[ -b /dev/mapper/$DEV_NAME ] && dmsetup remove --retry $DEV_NAME [ -b /dev/mapper/$DEV_NAME ] && dmsetup remove --retry $DEV_NAME
[ ! -z "$LOOPDEV1" ] && losetup -d $LOOPDEV1 >/dev/null 2>&1 [ ! -z "$LOOPDEV1" ] && losetup -d $LOOPDEV1 >/dev/null 2>&1
rm -f $IMG $IMG_HDR $ORIG_IMG $KEY1 >/dev/null 2>&1 rm -f $IMG $IMG_HDR $ORIG_IMG $KEY1 >/dev/null 2>&1
umount $MNT_DIR > /dev/null 2>&1 umount $MNT_DIR > /dev/null 2>&1
skipping to change at line 57 skipping to change at line 57
} }
function skip() function skip()
{ {
[ -n "$1" ] && echo "$1" [ -n "$1" ] && echo "$1"
exit 77 exit 77
} }
function add_scsi_device() { function add_scsi_device() {
del_scsi_device del_scsi_device
modprobe scsi_debug $@ delay=0 if [ -d /sys/module/scsi_debug ] ; then
if [ $? -ne 0 ] ; then echo "Cannot use scsi_debug module (in use or compiled-in), test
echo "This kernel seems to not support proper scsi_debug module, skipped."
test skipped." exit 77
exit 77 fi
fi modprobe scsi_debug $@ delay=0 >/dev/null 2>&1
if [ $? -ne 0 ] ; then
sleep 2 echo "This kernel seems to not support proper scsi_debug module,
SCSI_DEV="/dev/"$(grep -l -e scsi_debug /sys/block/*/device/model | cut test skipped."
-f4 -d /) exit 77
[ -b $SCSI_DEV ] || fail "Cannot find $SCSI_DEV." fi
sleep 2
SCSI_DEV="/dev/"$(grep -l -e scsi_debug /sys/block/*/device/model | cut -
f4 -d /)
[ -b $SCSI_DEV ] || fail "Cannot find $SCSI_DEV."
} }
function open_crypt() # $1 pwd, $2 hdr function open_crypt() # $1 pwd, $2 hdr
{ {
if [ -n "$2" ] ; then if [ -n "$2" ] ; then
echo "$1" | $CRYPTSETUP luksOpen $LOOPDEV1 $DEV_NAME --header $2 || fail echo "$1" | $CRYPTSETUP luksOpen $LOOPDEV1 $DEV_NAME --header $2 || fail
elif [ -n "$1" ] ; then elif [ -n "$1" ] ; then
echo "$1" | $CRYPTSETUP luksOpen $LOOPDEV1 $DEV_NAME || fail echo "$1" | $CRYPTSETUP luksOpen $LOOPDEV1 $DEV_NAME || fail
else else
$CRYPTSETUP luksOpen -d $KEY1 $LOOPDEV1 $DEV_NAME || fail $CRYPTSETUP luksOpen -d $KEY1 $LOOPDEV1 $DEV_NAME || fail
 End of changes. 2 change blocks. 
12 lines changed or deleted 17 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)