Skip to content

Commit 4c6e4bd

Browse files
snoggegarlick
authored andcommitted
tests: Skip kern tests t35 and t40 unless there is enough disk space
t35 requires 500MB and t40 requires 100MB.
1 parent 6985948 commit 4c6e4bd

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/kern/runtest

+15
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,21 @@ chmod 755 $PATH_MNTDIR $PATH_EXPDIR
105105
export PATH_EXPDIR
106106
export PATH_MNTDIR
107107

108+
# t35 and t40 requires a certain amount of disk space
109+
# It's not possible to check until $PATH_MNTDIR is created
110+
case "$TEST" in
111+
t35|t40)
112+
avail=$(df -B1024K --output=avail "$PATH_MNTDIR" | tail -n1)
113+
case "$TEST" in
114+
t35) required=500;;
115+
t40) required=100;;
116+
esac
117+
if [ "$avail" -lt "$required" ]; then
118+
echo "Requires ${required}MB free space on $PATH_MNTDIR, only ${avail}MB available" >"$TEST.out"
119+
exit 77
120+
fi;;
121+
esac
122+
108123
export MALLOC_CHECK_=3
109124

110125
# t00 is a special interactive test, not normally run

0 commit comments

Comments
 (0)