Skip to content

Commit

Permalink
tests: Skip kern tests t35 and t40 unless there is enough disk space
Browse files Browse the repository at this point in the history
t35 requires 500MB and t40 requires 100MB.
  • Loading branch information
snogge authored and garlick committed Dec 29, 2024
1 parent 6985948 commit 4c6e4bd
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/kern/runtest
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,21 @@ chmod 755 $PATH_MNTDIR $PATH_EXPDIR
export PATH_EXPDIR
export PATH_MNTDIR

# t35 and t40 requires a certain amount of disk space
# It's not possible to check until $PATH_MNTDIR is created
case "$TEST" in
t35|t40)
avail=$(df -B1024K --output=avail "$PATH_MNTDIR" | tail -n1)
case "$TEST" in
t35) required=500;;
t40) required=100;;
esac
if [ "$avail" -lt "$required" ]; then
echo "Requires ${required}MB free space on $PATH_MNTDIR, only ${avail}MB available" >"$TEST.out"
exit 77
fi;;
esac

export MALLOC_CHECK_=3

# t00 is a special interactive test, not normally run
Expand Down

0 comments on commit 4c6e4bd

Please sign in to comment.