Source-Changes-HG archive

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

[src/trunk]: src/tests/lib/libc/stdio Skip the test when there is insufficien...



details:   https://anonhg.NetBSD.org/src/rev/7e80c64ff9e4
branches:  trunk
changeset: 990619:7e80c64ff9e4
user:      gson <gson%NetBSD.org@localhost>
date:      Sun Oct 31 11:36:26 2021 +0000

description:
Skip the test when there is insufficient disk space.  Fixes PR misc/56324.

diffstat:

 tests/lib/libc/stdio/t_intr.sh |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (22 lines):

diff -r ac72ccf5bd24 -r 7e80c64ff9e4 tests/lib/libc/stdio/t_intr.sh
--- a/tests/lib/libc/stdio/t_intr.sh    Sun Oct 31 10:56:19 2021 +0000
+++ b/tests/lib/libc/stdio/t_intr.sh    Sun Oct 31 11:36:26 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_intr.sh,v 1.5 2021/09/09 21:47:47 rillig Exp $
+# $NetBSD: t_intr.sh,v 1.6 2021/10/31 11:36:26 gson Exp $
 #
 # Copyright (c) 2021 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -36,6 +36,12 @@
 TMOUT=20
 
 h_test() {
+       local avail=$( df -m . | awk '{if (int($4) > 0) print $4}' )
+       local need=$(( 2 * $MAX * 8 / 1000000 ))
+       if [ $avail -lt $need ]; then
+               atf_skip "not enough free space in working directory"
+       fi
+
        "${DIR}/h_makenumbers" "$1" > numbers.in
        "${DIR}/h_intr" \
            -p "$2" -a ${SSIZE} -b ${BSIZE} -t ${TMOUT} \



Home | Main Index | Thread Index | Old Index