Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/sbin/resize_ffs Skip tests where the old or the new im...



details:   https://anonhg.NetBSD.org/src/rev/8538ffa43731
branches:  trunk
changeset: 745884:8538ffa43731
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Mar 15 11:17:59 2020 +0000

description:
Skip tests where the old or the new image size seem to not fit into
the working directory.

diffstat:

 tests/sbin/resize_ffs/common.sh |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r 6f58aaac2251 -r 8538ffa43731 tests/sbin/resize_ffs/common.sh
--- a/tests/sbin/resize_ffs/common.sh   Sun Mar 15 11:17:22 2020 +0000
+++ b/tests/sbin/resize_ffs/common.sh   Sun Mar 15 11:17:59 2020 +0000
@@ -115,6 +115,12 @@
        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}"



Home | Main Index | Thread Index | Old Index