Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/fs/common Hardcode a check for ZFS and too little free...
details: https://anonhg.NetBSD.org/src/rev/916fee7b991d
branches: trunk
changeset: 1008223:916fee7b991d
user: martin <martin%NetBSD.org@localhost>
date: Sun Mar 15 12:12:42 2020 +0000
description:
Hardcode a check for ZFS and too little free space in workdir to skip
ZFS tests if the atf working directory is size restricted (ZFS has a
hardcoded minimal size of 64MB for a storage pool and 128 MB disk size).
diffstat:
tests/fs/common/h_fsmacros.h | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diffs (24 lines):
diff -r fa1122668ab9 -r 916fee7b991d tests/fs/common/h_fsmacros.h
--- a/tests/fs/common/h_fsmacros.h Sun Mar 15 12:01:41 2020 +0000
+++ b/tests/fs/common/h_fsmacros.h Sun Mar 15 12:12:42 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: h_fsmacros.h,v 1.42 2018/06/19 09:20:46 gson Exp $ */
+/* $NetBSD: h_fsmacros.h,v 1.43 2020/03/15 12:12:42 martin Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -249,6 +249,14 @@
atf_check_fstype(const atf_tc_t *tc, const char *fs)
{
const char *fstype;
+ struct statvfs fsstat;
+
+ if (strcmp(fs, "zfs") == 0) {
+ /* XXX ZFS hardcodes a minimal size */
+ if (statvfs(".", &fsstat) == 0 &&
+ (fsstat.f_frsize * fsstat.f_bfree) <= 64*1024*1024)
+ atf_tc_skip("not enough free space in work directory");
+ }
if (!atf_tc_has_config_var(tc, "fstype"))
return true;
Home |
Main Index |
Thread Index |
Old Index