Module Name: src
Committed By: martin
Date: Sun Mar 15 11:17:59 UTC 2020
Modified Files:
src/tests/sbin/resize_ffs: common.sh
Log Message:
Skip tests where the old or the new image size seem to not fit into
the working directory.
To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/tests/sbin/resize_ffs/common.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/sbin/resize_ffs/common.sh
diff -u src/tests/sbin/resize_ffs/common.sh:1.16 src/tests/sbin/resize_ffs/common.sh:1.17
--- src/tests/sbin/resize_ffs/common.sh:1.16 Thu Mar 12 18:08:54 2020
+++ src/tests/sbin/resize_ffs/common.sh Sun Mar 15 11:17:59 2020
@@ -115,6 +115,12 @@ resize_ffs()
local fslevel=$5
local numdata=$6
local swap=$7
+ local avail=$( df -m . | awk '{if (int($4) > 0) print $4}' )
+ # convert MB size to blocks
+ avail=$(( $avail \* 2 \* 1024 ))
+ if [ $avail -lt $osize ] || [ $avail -lt $nsize ]; then
+ atf_skip "not enough free space in working directory"
+ fi
mkdir -p mnt
echo "bs is ${bs} numdata is ${numdata}"
echo "****resizing fs with blocksize ${bs}"