public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2/test t-topology-support.sh
@ 2011-06-09 14:26 mbroz
0 siblings, 0 replies; 3+ messages in thread
From: mbroz @ 2011-06-09 14:26 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz@sourceware.org 2011-06-09 14:26:47
Modified files:
test : t-topology-support.sh
Log message:
Fix topology test.
Kernel version is misparsed in Fedora rawhide, just test sysfs file.
SCSI_DEBUG_DEV is no longer exported, use provided file instead.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-topology-support.sh.diff?cvsroot=lvm2&r1=1.6&r2=1.7
--- LVM2/test/t-topology-support.sh 2011/01/05 00:16:20 1.6
+++ LVM2/test/t-topology-support.sh 2011/06/09 14:26:47 1.7
@@ -10,22 +10,16 @@
which mkfs.ext3 || exit 200
-# Get linux minor version
-linux_minor=$(echo `uname -r` | cut -d'.' -f3 | cut -d'-' -f1)
-
-test $linux_minor -ge 31 || exit 200
-
. lib/test
check_logical_block_size()
{
- local DEV_=$1
- local LOGICAL_BS=$2
+ local DEV_=$(cat SCSI_DEBUG_DEV)
# Verify logical_block_size - requires Linux >= 2.6.31
SYSFS_LOGICAL_BLOCK_SIZE=`echo /sys/block/$(basename $DEV_)/queue/logical_block_size`
if [ -f "$SYSFS_LOGICAL_BLOCK_SIZE" ] ; then
ACTUAL_LOGICAL_BLOCK_SIZE=`cat $SYSFS_LOGICAL_BLOCK_SIZE`
- test $ACTUAL_LOGICAL_BLOCK_SIZE = $LOGICAL_BS
+ test $ACTUAL_LOGICAL_BLOCK_SIZE = $1
fi
}
@@ -60,13 +54,21 @@
PER_DEV_SIZE=34
DEV_SIZE=$(($NUM_DEVS*$PER_DEV_SIZE))
+# Test that kernel supports topology
+aux prepare_scsi_debug_dev $DEV_SIZE
+if [ ! -e /sys/block/$(basename $(cat SCSI_DEBUG_DEV))/alignment_offset ] ; then
+ aux cleanup_scsi_debug_dev
+ exit 200
+fi
+aux cleanup_scsi_debug_dev
+
# ---------------------------------------------
# Create "desktop-class" 4K drive
# (logical_block_size=512, physical_block_size=4096, alignment_offset=0):
LOGICAL_BLOCK_SIZE=512
aux prepare_scsi_debug_dev $DEV_SIZE \
sector_size=$LOGICAL_BLOCK_SIZE physblk_exp=3
-check_logical_block_size $SCSI_DEBUG_DEV $LOGICAL_BLOCK_SIZE
+check_logical_block_size $LOGICAL_BLOCK_SIZE
aux prepare_pvs $NUM_DEVS $PER_DEV_SIZE
vgcreate -c n $vg $(cat DEVICES)
@@ -81,7 +83,7 @@
LOGICAL_BLOCK_SIZE=512
aux prepare_scsi_debug_dev $DEV_SIZE \
sector_size=$LOGICAL_BLOCK_SIZE physblk_exp=3 lowest_aligned=7
-check_logical_block_size $SCSI_DEBUG_DEV $LOGICAL_BLOCK_SIZE
+check_logical_block_size $LOGICAL_BLOCK_SIZE
aux prepare_pvs $NUM_DEVS $PER_DEV_SIZE
vgcreate -c n $vg $(cat DEVICES)
@@ -96,7 +98,7 @@
LOGICAL_BLOCK_SIZE=4096
aux prepare_scsi_debug_dev $DEV_SIZE \
sector_size=$LOGICAL_BLOCK_SIZE
-check_logical_block_size $SCSI_DEBUG_DEV $LOGICAL_BLOCK_SIZE
+check_logical_block_size $LOGICAL_BLOCK_SIZE
aux prepare_pvs $NUM_DEVS $PER_DEV_SIZE
vgcreate -c n $vg $(cat DEVICES)
^ permalink raw reply [flat|nested] 3+ messages in thread
* LVM2/test t-topology-support.sh
@ 2010-05-24 19:27 mbroz
0 siblings, 0 replies; 3+ messages in thread
From: mbroz @ 2010-05-24 19:27 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz@sourceware.org 2010-05-24 19:27:38
Modified files:
test : t-topology-support.sh
Log message:
Fix topology test after last changes to not leak loop devices.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-topology-support.sh.diff?cvsroot=lvm2&r1=1.3&r2=1.4
--- LVM2/test/t-topology-support.sh 2010/04/07 14:46:27 1.3
+++ LVM2/test/t-topology-support.sh 2010/05/24 19:27:38 1.4
@@ -68,7 +68,8 @@
sector_size=$LOGICAL_BLOCK_SIZE physblk_exp=3
check_logical_block_size $SCSI_DEBUG_DEV $LOGICAL_BLOCK_SIZE
-aux prepare_vg $NUM_DEVS $PER_DEV_SIZE
+aux prepare_pvs $NUM_DEVS $PER_DEV_SIZE
+vgcreate -c n $vg $devs
test_snapshot_mount
vgremove $vg
@@ -82,7 +83,8 @@
sector_size=$LOGICAL_BLOCK_SIZE physblk_exp=3 lowest_aligned=7
check_logical_block_size $SCSI_DEBUG_DEV $LOGICAL_BLOCK_SIZE
-aux prepare_vg $NUM_DEVS $PER_DEV_SIZE
+aux prepare_pvs $NUM_DEVS $PER_DEV_SIZE
+vgcreate -c n $vg $devs
test_snapshot_mount
vgremove $vg
@@ -96,6 +98,7 @@
sector_size=$LOGICAL_BLOCK_SIZE
check_logical_block_size $SCSI_DEBUG_DEV $LOGICAL_BLOCK_SIZE
-aux prepare_vg $NUM_DEVS $PER_DEV_SIZE
+aux prepare_pvs $NUM_DEVS $PER_DEV_SIZE
+vgcreate -c n $vg $devs
test_snapshot_mount
vgremove $vg
^ permalink raw reply [flat|nested] 3+ messages in thread
* LVM2/test t-topology-support.sh
@ 2010-01-19 17:06 snitzer
0 siblings, 0 replies; 3+ messages in thread
From: snitzer @ 2010-01-19 17:06 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: snitzer@sourceware.org 2010-01-19 17:06:50
Modified files:
test : t-topology-support.sh
Log message:
test/t-topology-support.sh requires scsi_debug from >= 2.6.31
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-topology-support.sh.diff?cvsroot=lvm2&r1=1.1&r2=1.2
--- LVM2/test/t-topology-support.sh 2010/01/19 16:44:57 1.1
+++ LVM2/test/t-topology-support.sh 2010/01/19 17:06:50 1.2
@@ -10,6 +10,11 @@
which mkfs.ext3 || exit 200
+# Get linux minor version
+linux_minor=$(echo `uname -r` | cut -d'.' -f3 | cut -d'-' -f1)
+
+test $linux_minor -ge 31 || exit 200
+
. ./test-utils.sh
check_logical_block_size()
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-06-09 14:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-09 14:26 LVM2/test t-topology-support.sh mbroz
-- strict thread matches above, loose matches on Subject: below --
2010-05-24 19:27 mbroz
2010-01-19 17:06 snitzer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).