tests: remove vol_id from tests
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
22aa51661b
commit
283a8c1598
|
@ -91,8 +91,6 @@ esac
|
|||
AM_CONDITIONAL([LINUX], test "x$linux_os" = xyes)
|
||||
|
||||
AC_PATH_PROG(PERL, perl)
|
||||
AC_PATH_PROG(BLKID, blkid, [], [$PATH:/sbin])
|
||||
AC_PATH_PROG(VOLID, vol_id, [], [$PATH:/lib/udev])
|
||||
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
|
|
|
@ -14,10 +14,6 @@ TS_HELPER_ISMOUNTED="$TOPDIR/lib/test_ismounted"
|
|||
# TODO: use partx
|
||||
TS_HELPER_PARTITIONS="$TOPDIR/shlibs/blkid/samples/partitions"
|
||||
|
||||
# external commands
|
||||
TS_ECMD_BLKID="@BLKID@"
|
||||
TS_ECMD_VOLID="@VOLID@"
|
||||
|
||||
U_L_LIBRARY_PATH="$TOPDIR/shlibs/blkid/src/.libs:$TOPDIR/shlibs/uuid/src/.libs"
|
||||
|
||||
# paths to commands
|
||||
|
|
|
@ -100,7 +100,6 @@ function ts_init_env {
|
|||
TS_MOUNTPOINT="$TS_OUTDIR/${TS_TESTNAME}-mnt"
|
||||
|
||||
TS_VERBOSE=$(ts_has_option "verbose" "$*")
|
||||
TS_HAS_VOLUMEID="no"
|
||||
|
||||
BLKID_FILE="$TS_OUTDIR/${TS_TESTNAME}.blkidtab"
|
||||
|
||||
|
@ -115,11 +114,6 @@ function ts_init_env {
|
|||
|
||||
export BLKID_FILE
|
||||
|
||||
if [ -x $TS_CMD_MOUNT ]; then
|
||||
ldd $TS_CMD_MOUNT | grep -q 'libvolume_id' &> /dev/null
|
||||
[ "$?" == "0" ] && TS_HAS_VOLUMEID="yes"
|
||||
fi
|
||||
|
||||
rm -f $TS_OUTPUT
|
||||
touch $TS_OUTPUT
|
||||
|
||||
|
@ -282,44 +276,16 @@ function ts_device_deinit {
|
|||
fi
|
||||
}
|
||||
|
||||
function ts_udev_dev_support {
|
||||
if [ "$TS_HAS_VOLUMEID" == "yes" ] && [ ! -L "/dev/disk/$1/$2" ]; then
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
function ts_uuid_by_devname {
|
||||
local DEV="$1"
|
||||
local UUID=""
|
||||
if [ -x "$TS_ECMD_BLKID" ]; then
|
||||
UUID=$($TS_ECMD_BLKID -c /dev/null -w /dev/null -s "UUID" $DEV | sed 's/.*UUID="//g; s/"//g')
|
||||
elif [ -x "$TS_ECMD_VOLID" ]; then
|
||||
UUID=$($TS_ECMD_VOLID -u $DEV)
|
||||
fi
|
||||
echo $UUID
|
||||
echo $($TS_CMD_BLKID -p -s UUID -o value $1)
|
||||
}
|
||||
|
||||
function ts_label_by_devname {
|
||||
local DEV="$1"
|
||||
local TYPE=""
|
||||
if [ -x "$TS_ECMD_BLKID" ]; then
|
||||
LABEL=$($TS_ECMD_BLKID -c /dev/null -w /dev/null -s "LABEL" $DEV | sed 's/.*LABEL="//g; s/"//g')
|
||||
elif [ -x "$TS_ECMD_VOLID" ]; then
|
||||
LABEL=$($TS_ECMD_VOLID -l $DEV)
|
||||
fi
|
||||
echo $LABEL
|
||||
echo $($TS_CMD_BLKID -p -s LABEL -o value $1)
|
||||
}
|
||||
|
||||
function ts_fstype_by_devname {
|
||||
local DEV="$1"
|
||||
local TYPE=""
|
||||
if [ -x "$TS_ECMD_BLKID" ]; then
|
||||
TYPE=$($TS_ECMD_BLKID -c /dev/null -w /dev/null -s "TYPE" $DEV | sed 's/.*TYPE="//g; s/"//g')
|
||||
elif [ -x "$TS_ECMD_VOLID" ]; then
|
||||
TYPE=$($TS_ECMD_VOLID -t $DEV)
|
||||
fi
|
||||
echo $TYPE
|
||||
echo $($TS_CMD_BLKID -p -s TYPE -o value $1)
|
||||
}
|
||||
|
||||
function ts_device_has {
|
||||
|
|
|
@ -70,9 +70,6 @@ ts_log "check the image"
|
|||
ts_device_has "TYPE" "cramfs" $DEVICE
|
||||
[ "$?" == "0" ] || ts_die "Cannot found cramfs on $DEVICE" $DEVICE
|
||||
|
||||
ts_udev_dev_support "by-label" $LABEL
|
||||
[ "$?" == "0" ] || ts_skip "udev ignores /dev/loop*" $DEVICE
|
||||
|
||||
ts_log "mount the image"
|
||||
$TS_CMD_MOUNT -L $LABEL $TS_MOUNTPOINT 2>&1 >> $TS_OUTPUT
|
||||
|
||||
|
|
|
@ -33,8 +33,6 @@ mkfs.ext3 -L $LABEL $DEVICE &> /dev/null || ts_die "Cannot make ext3 on $DEVICE"
|
|||
ts_device_has "LABEL" $LABEL $DEVICE \
|
||||
|| ts_die "Cannot found LABEL '$LABEL' on $DEVICE" $DEVICE
|
||||
|
||||
ts_udev_dev_support "by-label" $LABEL || ts_skip "udev ignores /dev/loop*" $DEVICE
|
||||
|
||||
[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
|
||||
|
||||
ts_fstab_add "LABEL=$LABEL"
|
||||
|
|
|
@ -33,8 +33,6 @@ mkfs.ext3 -L $LABEL $DEVICE &> /dev/null || ts_die "Cannot make ext3 on $DEVICE"
|
|||
ts_device_has "LABEL" $LABEL $DEVICE \
|
||||
|| ts_die "Cannot found LABEL '$LABEL' on $DEVICE" $DEVICE
|
||||
|
||||
ts_udev_dev_support "by-label" $LABEL || ts_skip "udev ignores /dev/loop*" $DEVICE
|
||||
|
||||
[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
|
||||
|
||||
ts_fstab_add "$DEVICE"
|
||||
|
|
|
@ -34,8 +34,6 @@ mkfs.ext3 -L $LABEL $DEVICE &> /dev/null || ts_die "Cannot make ext3 on $DEVICE"
|
|||
ts_device_has "LABEL" $LABEL $DEVICE \
|
||||
|| ts_die "Cannot found LABEL '$LABEL' on $DEVICE" $DEVICE
|
||||
|
||||
ts_udev_dev_support "by-label" $LABEL || ts_skip "udev ignores /dev/loop*" $DEVICE
|
||||
|
||||
ts_device_has_uuid $DEVICE || ts_die "Cannot found UUID on $DEVICE" $DEVICE
|
||||
|
||||
UUID=$(ts_uuid_by_devname $DEVICE)
|
||||
|
|
|
@ -33,8 +33,6 @@ ts_device_has_uuid $DEVICE || ts_die "Cannot found UUID on $DEVICE" $DEVICE
|
|||
|
||||
UUID=$(ts_uuid_by_devname $DEVICE)
|
||||
|
||||
ts_udev_dev_support "by-uuid" $UUID || ts_skip "udev ignores /dev/loop*" $DEVICE
|
||||
|
||||
[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
|
||||
|
||||
ts_fstab_add "UUID=$UUID"
|
||||
|
|
|
@ -33,8 +33,6 @@ ts_device_has_uuid $DEVICE || ts_die "Cannot found UUID on $DEVICE" $DEVICE
|
|||
|
||||
UUID=$(ts_uuid_by_devname $DEVICE)
|
||||
|
||||
ts_udev_dev_support "by-uuid" $UUID || ts_skip "udev ignores /dev/loop*" $DEVICE
|
||||
|
||||
[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
|
||||
|
||||
ts_fstab_add "$DEVICE"
|
||||
|
|
|
@ -33,8 +33,6 @@ mkfs.ext3 -L $LABEL $DEVICE &> /dev/null || ts_die "Cannot make ext3 on $DEVICE"
|
|||
ts_device_has "LABEL" $LABEL $DEVICE \
|
||||
|| ts_die "Cannot found LABEL '$LABEL' on $DEVICE" $DEVICE
|
||||
|
||||
ts_udev_dev_support "by-label" $LABEL || ts_skip "udev ignores /dev/loop*" $DEVICE
|
||||
|
||||
ts_device_has_uuid $DEVICE || ts_die "Cannot found UUID on $DEVICE" $DEVICE
|
||||
|
||||
UUID=$(ts_uuid_by_devname $DEVICE)
|
||||
|
|
|
@ -34,9 +34,6 @@ mkfs.ext3 -L $LABEL $DEVICE &> /dev/null || ts_die "Cannot make ext3 on $DEVICE"
|
|||
ts_device_has "LABEL" $LABEL $DEVICE \
|
||||
|| ts_die "Cannot found LABEL '$LABEL' on $DEVICE" $DEVICE
|
||||
|
||||
ts_udev_dev_support "by-label" $LABEL \
|
||||
|| ts_skip "udev ignores /dev/loop*" $DEVICE
|
||||
|
||||
[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
|
||||
|
||||
# variant A)
|
||||
|
|
|
@ -33,9 +33,6 @@ ts_device_has_uuid $DEVICE || ts_die "Cannot found UUID on $DEVICE" $DEVICE
|
|||
|
||||
UUID=$(ts_uuid_by_devname $DEVICE)
|
||||
|
||||
ts_udev_dev_support "by-uuid" $UUID \
|
||||
|| ts_skip "udev ignores /dev/loop*" $DEVICE
|
||||
|
||||
[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
|
||||
|
||||
# variant A)
|
||||
|
|
|
@ -34,8 +34,6 @@ $TS_CMD_MKSWAP -L $LABEL $DEVICE > /dev/null 2>> $TS_OUTPUT \
|
|||
ts_device_has "LABEL" $LABEL $DEVICE \
|
||||
|| ts_die "Cannot found LABEL '$LABEL' on $DEVICE" $DEVICE
|
||||
|
||||
ts_udev_dev_support "by-label" $LABEL || ts_skip "udev ignores /dev/loop*" $DEVICE
|
||||
|
||||
LD_LIBRARY_PATH="$U_L_LIBRARY_PATH" \
|
||||
$TS_CMD_SWAPON -L $LABEL 2>&1 >> $TS_OUTPUT
|
||||
|
||||
|
|
|
@ -34,8 +34,6 @@ ts_device_has_uuid $DEVICE || ts_die "Cannot found UUID on $DEVICE" $DEVICE
|
|||
|
||||
UUID=$(ts_uuid_by_devname $DEVICE)
|
||||
|
||||
ts_udev_dev_support "by-uuid" $UUID || ts_skip "udev ignores /dev/loop*" $DEVICE
|
||||
|
||||
LD_LIBRARY_PATH="$U_L_LIBRARY_PATH" \
|
||||
$TS_CMD_SWAPON -U $UUID 2>&1 >> $TS_OUTPUT
|
||||
|
||||
|
|
Loading…
Reference in New Issue