* master - tests: aux fixes
@ 2018-05-15 20:05 Zdenek Kabelac
0 siblings, 0 replies; only message in thread
From: Zdenek Kabelac @ 2018-05-15 20:05 UTC (permalink / raw)
To: lvm-devel
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=550380c1a48697d6c5bc63b4d63c4b1d772dd14a
Commit: 550380c1a48697d6c5bc63b4d63c4b1d772dd14a
Parent: 3b3ee66b1f86518ef39a1b88a868083f9d2fc4e7
Author: Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate: Tue May 15 21:53:05 2018 +0200
Committer: Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Tue May 15 22:02:41 2018 +0200
tests: aux fixes
Properly check for kernel version.
Also detect sysfs throttling support.
---
test/lib/aux.sh | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index de3f218..5b2aebf 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -843,7 +843,7 @@ prepare_backing_dev() {
return 0
elif test "${LVM_TEST_PREFER_BRD-1}" = "1" && \
test ! -d /sys/block/ram0 && \
- test kernel_at_least 4 16 && \
+ kernel_at_least 4 16 && \
test "$size" -lt 16384; then
# try to use ramdisk if possible, but for
# big allocs (>16G) do not try to use ramdisk
@@ -1067,6 +1067,7 @@ enable_dev() {
# Throttle down performance of kcopyd when mirroring i.e. disk image
throttle_sys="/sys/module/dm_mirror/parameters/raid1_resync_throttle"
throttle_dm_mirror() {
+ test -e "$throttle_sys" || return
test -f THROTTLE || cat "$throttle_sys" > THROTTLE
echo ${1-1} > "$throttle_sys"
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-05-15 20:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-15 20:05 master - tests: aux fixes Zdenek Kabelac
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.