Module Name:    src
Committed By:   gson
Date:           Sun Oct 31 11:36:26 UTC 2021

Modified Files:
        src/tests/lib/libc/stdio: t_intr.sh

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


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/stdio/t_intr.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libc/stdio/t_intr.sh
diff -u src/tests/lib/libc/stdio/t_intr.sh:1.5 src/tests/lib/libc/stdio/t_intr.sh:1.6
--- src/tests/lib/libc/stdio/t_intr.sh:1.5	Thu Sep  9 21:47:47 2021
+++ src/tests/lib/libc/stdio/t_intr.sh	Sun Oct 31 11:36:26 2021
@@ -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 @@ SSIZE=256000
 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} \

Reply via email to