summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lib/aux.sh7
-rw-r--r--test/lib/inittest.sh1
-rw-r--r--test/shell/vgchange-many.sh2
3 files changed, 10 insertions, 0 deletions
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 67df0f5b3..6fceb68b1 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -1066,6 +1066,13 @@ wait_pvmove_lv_ready() {
done
}
+# return total memory size in kB units
+total_mem() {
+ while IFS=":" read -r a b ; do
+ case "$a" in MemTotal*) echo ${b%% kB} ; break ;; esac
+ done < /proc/meminfo
+}
+
test -z "$LVM_TEST_AUX_TRACE" || set -x
test -f DEVICES && devs=$(< DEVICES)
diff --git a/test/lib/inittest.sh b/test/lib/inittest.sh
index 96dfff243..dd4f0607d 100644
--- a/test/lib/inittest.sh
+++ b/test/lib/inittest.sh
@@ -78,6 +78,7 @@ echo "$TESTNAME" >TESTNAME
echo "Kernel is $(uname -a)"
# Report SELinux mode
echo "Selinux mode is $(getenforce 2>/dev/null || echo not installed)."
+free -h
# Set vars from utils now that we have TESTDIR/PREFIX/...
prepare_test_vars
diff --git a/test/shell/vgchange-many.sh b/test/shell/vgchange-many.sh
index 16e051682..cbb436313 100644
--- a/test/shell/vgchange-many.sh
+++ b/test/shell/vgchange-many.sh
@@ -16,6 +16,8 @@
# Number of LVs to create
DEVICES=1000
+# On low-memory boxes let's not stress too much
+test "$(aux total_mem)" -gt 524288 || DEVICES=256
aux prepare_pvs 1 400