mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
tests: reuse existing check dev_md5sum
Create md5sum in reusable way and use exiting check function.
This commit is contained in:
parent
d080abf7d6
commit
fa23234e71
@ -19,8 +19,7 @@
|
|||||||
|
|
||||||
# Snapshot should remain unmodified
|
# Snapshot should remain unmodified
|
||||||
check_s_() {
|
check_s_() {
|
||||||
rm -f debug.log
|
check dev_md5sum $vg s
|
||||||
md5sum -c md5
|
|
||||||
#diff data "$DM_DEV_DIR/$vg/s"
|
#diff data "$DM_DEV_DIR/$vg/s"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -31,7 +30,7 @@ aux prepare_vg
|
|||||||
# 8M file with some random data
|
# 8M file with some random data
|
||||||
dd if=/dev/urandom of=data bs=1M count=1
|
dd if=/dev/urandom of=data bs=1M count=1
|
||||||
dd if=data of=data bs=1M count=7 seek=1
|
dd if=data of=data bs=1M count=7 seek=1
|
||||||
echo "$(md5sum data | cut -d' ' -f1) $DM_DEV_DIR/$vg/s" >md5
|
echo "$(md5sum data | cut -d' ' -f1) $DM_DEV_DIR/$vg/s" >md5.${vg}-s
|
||||||
|
|
||||||
lvcreate -aey -L 8M -n o $vg
|
lvcreate -aey -L 8M -n o $vg
|
||||||
dd if=data of="$DM_DEV_DIR/$vg/o" bs=1M
|
dd if=data of="$DM_DEV_DIR/$vg/o" bs=1M
|
||||||
|
Loading…
Reference in New Issue
Block a user