Date: Thu, 22 Jun 2017 07:37:10 +0000 (UTC) From: Peter Holm <pho@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r320227 - user/pho/stress2/misc Message-ID: <201706220737.v5M7bArH093124@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pho Date: Thu Jun 22 07:37:10 2017 New Revision: 320227 URL: https://svnweb.freebsd.org/changeset/base/320227 Log: Added test for free disk space. Sponsored by: Dell EMC Isilon Modified: user/pho/stress2/misc/sendfile5.sh Modified: user/pho/stress2/misc/sendfile5.sh ============================================================================== --- user/pho/stress2/misc/sendfile5.sh Thu Jun 22 07:35:59 2017 (r320226) +++ user/pho/stress2/misc/sendfile5.sh Thu Jun 22 07:37:10 2017 (r320227) @@ -42,7 +42,12 @@ cd /tmp sed '1,/^EOF/d' < $here/$0 > sendfile5.c mycc -o sendfile5 -Wall -Wextra -O2 sendfile5.c rm -f sendfile5.c -dd if=/dev/zero of=$diskimage bs=1m count=1k 2>&1 | egrep -v "records|transferred" +need=1024 +[ `df -k $(dirname $diskimage) | tail -1 | awk '{print int($4 / 1024)'}` \ + -lt $need ] && + printf "Need %d MB on %s.\n" $need `dirname $diskimage` && exit 0 +dd if=/dev/zero of=$diskimage bs=1m count=$need 2>&1 | + egrep -v "records|transferred" cd $here mount | grep $mntpoint | grep -q /dev/md && umount -f $mntpoint
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706220737.v5M7bArH093124>