mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
tests: check for free space in test dir
Avoid starting test, when test dir has less then 50M of free space. Better to crash early before letting die machine on weird crash in OOM cases... Also show free disk space when test starts
This commit is contained in:
parent
a02db1c45a
commit
2fd2b197ab
@ -124,11 +124,17 @@ fi
|
||||
|
||||
echo "$TESTNAME" >TESTNAME
|
||||
|
||||
# Require 50M of free space in testdir
|
||||
test $(df -k . | awk '/\// {print $4}') -gt 51200 ||
|
||||
die "Testing requires more then 50M of free space in directory $TESTDIR!\n$(df -H)"
|
||||
|
||||
echo "Kernel is $(uname -a)"
|
||||
# Report SELinux mode
|
||||
echo "Selinux mode is $(getenforce 2>/dev/null || echo not installed)."
|
||||
free -m || true
|
||||
|
||||
df -h || true
|
||||
|
||||
# Set vars from utils now that we have TESTDIR/PREFIX/...
|
||||
prepare_test_vars
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user