mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
tests: no tables for no devices
If dm table does't contain any PREFIX device, don't bother to call other commands No tracing if test is skipped.
This commit is contained in:
parent
f5466fe435
commit
1a7dd13e70
@ -132,6 +132,8 @@ STACKTRACE() {
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
test -f SKIP_THIS_TEST && exit 200
|
||||||
|
|
||||||
test -z "$LVM_TEST_NODEBUG" -a -f debug.log && {
|
test -z "$LVM_TEST_NODEBUG" -a -f debug.log && {
|
||||||
IDX=
|
IDX=
|
||||||
for i in debug.log* ; do
|
for i in debug.log* ; do
|
||||||
@ -139,16 +141,18 @@ STACKTRACE() {
|
|||||||
sed -e "s,^,## DEBUG${IDX}: ," $i
|
sed -e "s,^,## DEBUG${IDX}: ," $i
|
||||||
IDX=$(($IDX + 1))
|
IDX=$(($IDX + 1))
|
||||||
done
|
done
|
||||||
test -e clvmddebug.log && {
|
if test -e clvmddebug.log ; then
|
||||||
echo "<======== CLVMD debug log ========>"
|
echo "<======== CLVMD debug log ========>"
|
||||||
sed -e "s,^,## CLVMD: ," clvmddebug.log
|
sed -e "s,^,## CLVMD: ," clvmddebug.log
|
||||||
}
|
fi
|
||||||
test -e strace.log && {
|
if test -e strace.log ; then
|
||||||
echo "<======== Strace debug log ========>"
|
echo "<======== Strace debug log ========>"
|
||||||
sed -e "s,^,## STRACE: ," strace.log
|
sed -e "s,^,## STRACE: ," strace.log
|
||||||
}
|
fi
|
||||||
|
dmsetup info -c | grep1_ "$PREFIX" > out
|
||||||
|
if test $(wc -l < out) -gt 1 ; then
|
||||||
echo "<======== Info ========>"
|
echo "<======== Info ========>"
|
||||||
dmsetup info -c | grep1_ "$PREFIX" | sed -e "s,^,## DMINFO: ,"
|
sed -e "s,^,## DMINFO: ," out
|
||||||
echo "<======== Active table ========>"
|
echo "<======== Active table ========>"
|
||||||
dmsetup table | grep "$PREFIX" | sed -e "s,^,## DMTABLE: ,"
|
dmsetup table | grep "$PREFIX" | sed -e "s,^,## DMTABLE: ,"
|
||||||
echo "<======== Inactive table ========>"
|
echo "<======== Inactive table ========>"
|
||||||
@ -163,15 +167,14 @@ STACKTRACE() {
|
|||||||
"$DM_DEV_DIR" | sed -e "s,^,## LSLR: ,"
|
"$DM_DEV_DIR" | sed -e "s,^,## LSLR: ,"
|
||||||
echo "<======== Udev DB content ========>"
|
echo "<======== Udev DB content ========>"
|
||||||
for i in /sys/block/dm-* /sys/block/loop* ; do
|
for i in /sys/block/dm-* /sys/block/loop* ; do
|
||||||
udevadm info --path "$i" || true
|
udevadm info --query=all --path "$i" || true
|
||||||
done | sed -e "s,^,## UDEV: ,"
|
done | sed -e "s,^,## UDEV: ,"
|
||||||
|
fi
|
||||||
echo "<======== Script file \"$(< TESTNAME)\" ========>"
|
echo "<======== Script file \"$(< TESTNAME)\" ========>"
|
||||||
local script=$0
|
local script=$0
|
||||||
test -f "$script" || script="$TESTOLDPWD/$0"
|
test -f "$script" || script="$TESTOLDPWD/$0"
|
||||||
awk '{print "## Line:", NR, "\t", $0}' "$script"
|
awk '{print "## Line:", NR, "\t", $0}' "$script"
|
||||||
}
|
}
|
||||||
|
|
||||||
test -f SKIP_THIS_TEST && exit 200
|
|
||||||
}
|
}
|
||||||
|
|
||||||
init_udev_transaction() {
|
init_udev_transaction() {
|
||||||
|
Loading…
Reference in New Issue
Block a user