Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/fs/vfs Add some sanity checks for statvfs values.
details: https://anonhg.NetBSD.org/src/rev/88e24f188dae
branches: trunk
changeset: 756413:88e24f188dae
user: njoly <njoly%NetBSD.org@localhost>
date: Fri Jul 16 17:49:38 2010 +0000
description:
Add some sanity checks for statvfs values.
diffstat:
tests/fs/vfs/t_vfsops.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diffs (26 lines):
diff -r dc50142b37d1 -r 88e24f188dae tests/fs/vfs/t_vfsops.c
--- a/tests/fs/vfs/t_vfsops.c Fri Jul 16 15:47:06 2010 +0000
+++ b/tests/fs/vfs/t_vfsops.c Fri Jul 16 17:49:38 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_vfsops.c,v 1.2 2010/07/13 11:53:47 pooka Exp $ */
+/* $NetBSD: t_vfsops.c,v 1.3 2010/07/16 17:49:38 njoly Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -49,10 +49,16 @@
static void
tstatvfs(const atf_tc_t *tc, const char *path)
{
+ const char *fstype = atf_tc_get_md_var(tc, "X-fs.type");
struct statvfs svb;
if (rump_sys_statvfs1(path, &svb, ST_WAIT) == -1)
atf_tc_fail_errno("statvfs");
+
+ ATF_REQUIRE(svb.f_namemax > 0 && svb.f_namemax <= MAXNAMLEN);
+ if (!FSTYPE_PUFFS(tc))
+ ATF_REQUIRE_STREQ(svb.f_fstypename, fstype);
+ ATF_REQUIRE_STREQ(svb.f_mntonname, path);
}
static void
Home |
Main Index |
Thread Index |
Old Index