Module Name:    src
Committed By:   martin
Date:           Wed Jul 10 05:57:43 UTC 2019

Modified Files:
        src/tests/bin/sh: t_patterns.sh

Log Message:
Make sure we have enough free inodes before running the filename_expansion
test.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/bin/sh/t_patterns.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/bin/sh/t_patterns.sh
diff -u src/tests/bin/sh/t_patterns.sh:1.4 src/tests/bin/sh/t_patterns.sh:1.5
--- src/tests/bin/sh/t_patterns.sh:1.4	Sun Nov 18 13:41:24 2018
+++ src/tests/bin/sh/t_patterns.sh	Wed Jul 10 05:57:43 2019
@@ -1,4 +1,4 @@
-# $NetBSD: t_patterns.sh,v 1.4 2018/11/18 13:41:24 kre Exp $
+# $NetBSD: t_patterns.sh,v 1.5 2019/07/10 05:57:43 martin Exp $
 #
 # Copyright (c) 2018 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -182,6 +182,8 @@ filename_expansion_body() {
 	atf_require_prog mv
 	atf_require_prog rm
 	atf_require_prog mkdir
+	atf_require_prog df
+	atf_require_prog awk
 
 	reset filename_expansion
 
@@ -194,6 +196,11 @@ filename_expansion_body() {
 	# save inodes, but would require running "ln" many times, so
 	# would be a lot slower.
 
+	free_inodes=$( df -i . | awk '/^Filesystem/{next}; { print $7 }' )
+	if [ $free_inodes -lt 17000 ]; then
+		atf_skip "not enough space"
+	fi
+
 	# This should work on a case insensitive, but preserving,
 	# filesystem - but case sensitive filesystems are preferred.
 

Reply via email to