master - tests: add help function
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d6090a10f01e6daf5c66e7098a3b0f85560a80ce Commit: d6090a10f01e6daf5c66e7098a3b0f85560a80ce Parent: 1d068682404c7af35c0b40586a6e5479443fc851 Author: Zdenek Kabelac <[email protected]> AuthorDate: Mon Sep 16 11:02:58 2013 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Mon Sep 16 11:22:04 2013 +0200
tests: add help function
Add mkdev_md5sum to create and checksum given LV. Add dev_md5sum to verify device has matching md5 sum.
--- test/lib/aux.sh | 6 ++++++ test/lib/check.sh | 8 ++++++++ 2 files changed, 14 insertions(+), 0 deletions(-)
test/lib/aux.sh +6 -0
@@ -506,6 +506,12 @@ unhide_dev() { lvmconf "$filter" } +mkdev_md5sum() { + rm -f debug.log + mkfs.ext2 "$DM_DEV_DIR/$1/$2" || return 1 + md5sum "$DM_DEV_DIR/$1/$2" > "md5.$1-$2" +} + generate_config() { if test -n "$profile_name"; then config_values=PROFILE_VALUES_$profile_name
test/lib/check.sh +8 -0
@@ -280,5 +280,13 @@ pvlv_counts() { vg_field $local_vg snap_count $num_snaps } +# Compare md5 check generated from get dev_md5sum +dev_md5sum() { + md5sum -c "md5.$1-$2" || \ + (get lv_field $1/$2 "name,size,seg_pe_ranges" + die "LV $1/$2 has different MD5 check sum!") +} + +#set -x unset LVM_VALGRIND "$@"