mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-24 06:04:19 +03:00
tests: reduce memory footprint
This commit is contained in:
parent
bb8e22d9cc
commit
e5ae9b0d2f
@ -17,9 +17,7 @@ SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
# Test reshaping under io load
|
||||
|
||||
# FIXME: This test requires 3GB in /dev/shm!
|
||||
test $(aux total_mem) -gt $((4096*1024)) || skip
|
||||
|
||||
which md5sum || skip
|
||||
which mkfs.ext4 || skip
|
||||
aux have_raid 1 13 2 || skip
|
||||
|
||||
@ -31,6 +29,11 @@ cleanup_mounted_and_teardown()
|
||||
aux teardown
|
||||
}
|
||||
|
||||
checksum_()
|
||||
{
|
||||
md5sum "$1" | cut -f1 -d' '
|
||||
}
|
||||
|
||||
aux prepare_pvs 16 32
|
||||
|
||||
get_devs
|
||||
@ -40,23 +43,20 @@ vgcreate $SHARED -s 1M "$vg" "${DEVICES[@]}"
|
||||
trap 'cleanup_mounted_and_teardown' EXIT
|
||||
|
||||
# Create 10-way striped raid5 (11 legs total)
|
||||
lvcreate --yes --type raid5_ls --stripesize 64K --stripes 10 -L200M -n$lv1 $vg
|
||||
lvcreate --yes --type raid5_ls --stripesize 64K --stripes 10 -L64M -n$lv1 $vg
|
||||
check lv_first_seg_field $vg/$lv1 segtype "raid5_ls"
|
||||
check lv_first_seg_field $vg/$lv1 stripesize "64.00k"
|
||||
check lv_first_seg_field $vg/$lv1 data_stripes 10
|
||||
check lv_first_seg_field $vg/$lv1 stripes 11
|
||||
echo y|mkfs -t ext4 /dev/$vg/$lv1
|
||||
|
||||
mkdir -p $mount_dir
|
||||
mount "$DM_DEV_DIR/$vg/$lv1" $mount_dir
|
||||
mkdir -p $mount_dir/1 $mount_dir/2
|
||||
mkdir -p "$mount_dir"
|
||||
mount "$DM_DEV_DIR/$vg/$lv1" "$mount_dir"
|
||||
|
||||
echo 3 >/proc/sys/vm/drop_caches
|
||||
# FIXME: This is filling up ram disk. Use sane amount of data please! Rate limit the data written!
|
||||
cp -r /usr/bin $mount_dir/1 >/dev/null 2>/dev/null &
|
||||
cp -r /usr/bin $mount_dir/2 >/dev/null 2>/dev/null &
|
||||
# FIXME: should this wait for above two processes and sync then?
|
||||
sync &
|
||||
dd if=/dev/urandom of="$mount_dir/random" bs=1M count=50 conv=fdatasync
|
||||
checksum_ "$mount_dir/random" >MD5
|
||||
|
||||
# FIXME: wait_for_sync - is this really testing anything under load?
|
||||
aux wait_for_sync $vg $lv1
|
||||
@ -80,11 +80,17 @@ done
|
||||
|
||||
aux delay_dev "$dev2" 0
|
||||
|
||||
kill -9 %%
|
||||
kill -9 %% || true
|
||||
wait
|
||||
|
||||
checksum_ "$mount_dir/random" >MD5_new
|
||||
|
||||
umount $mount_dir
|
||||
|
||||
fsck -fn "$DM_DEV_DIR/$vg/$lv1"
|
||||
|
||||
# Compare checksum is matching
|
||||
cat MD5 MD5_new
|
||||
diff MD5 MD5_new
|
||||
|
||||
vgremove -ff $vg
|
||||
|
Loading…
x
Reference in New Issue
Block a user