Module Name: src
Committed By: pooka
Date: Wed Aug 25 18:16:06 UTC 2010
Modified Files:
src/tests/fs/common: h_fsmacros.h
Log Message:
* fail with errnos
* in case unmount fails, call rump_pub_vfs_mount_print() to print
mountpoint status and dump active vnodes.
To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/tests/fs/common/h_fsmacros.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/fs/common/h_fsmacros.h
diff -u src/tests/fs/common/h_fsmacros.h:1.18 src/tests/fs/common/h_fsmacros.h:1.19
--- src/tests/fs/common/h_fsmacros.h:1.18 Mon Aug 9 19:32:26 2010
+++ src/tests/fs/common/h_fsmacros.h Wed Aug 25 18:16:06 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: h_fsmacros.h,v 1.18 2010/08/09 19:32:26 pooka Exp $ */
+/* $NetBSD: h_fsmacros.h,v 1.19 2010/08/25 18:16:06 pooka Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -68,26 +68,28 @@
do { \
if (_fs_##_fstest_newfs(_tc_, &_args_, \
FSTEST_IMGNAME, FSTEST_IMGSIZE, NULL) != 0) \
- atf_tc_fail("newfs failed"); \
+ atf_tc_fail_errno("newfs failed"); \
if (_fs_##_fstest_mount(_tc_, _args_, FSTEST_MNTNAME, 0) != 0) \
- atf_tc_fail("mount failed"); \
+ atf_tc_fail_errno("mount failed"); \
} while (/*CONSTCOND*/0);
#define FSTEST_CONSTRUCTOR_FSPRIV(_tc_, _fs_, _args_, _privargs_) \
do { \
if (_fs_##_fstest_newfs(_tc_, &_args_, \
FSTEST_IMGNAME, FSTEST_IMGSIZE, _privargs_) != 0) \
- atf_tc_fail("newfs failed"); \
+ atf_tc_fail_errno("newfs failed"); \
if (_fs_##_fstest_mount(_tc_, _args_, FSTEST_MNTNAME, 0) != 0) \
- atf_tc_fail("mount failed"); \
+ atf_tc_fail_errno("mount failed"); \
} while (/*CONSTCOND*/0);
#define FSTEST_DESTRUCTOR(_tc_, _fs_, _args_) \
do { \
- if (_fs_##_fstest_unmount(_tc_, FSTEST_MNTNAME, 0) != 0) \
- atf_tc_fail("unmount failed"); \
+ if (_fs_##_fstest_unmount(_tc_, FSTEST_MNTNAME, 0) != 0) { \
+ rump_pub_vfs_mount_print(FSTEST_MNTNAME, 1); \
+ atf_tc_fail_errno("unmount failed"); \
+ } \
if (_fs_##_fstest_delfs(_tc_, _args_) != 0) \
- atf_tc_fail("delfs failed"); \
+ atf_tc_fail_errno("delfs failed"); \
} while (/*CONSTCOND*/0);
#define ATF_TC_FSADD(fs,type,func,desc) \
@@ -105,15 +107,17 @@
atf_tc_skip("filesystem not selected"); \
FSTEST_CONSTRUCTOR(tc,fs,fs##func##tmp); \
func(tc,FSTEST_MNTNAME); \
- if (fs##_fstest_unmount(tc, FSTEST_MNTNAME, 0) != 0) \
- atf_tc_fail("unmount failed"); \
+ if (fs##_fstest_unmount(tc, FSTEST_MNTNAME, 0) != 0) { \
+ rump_pub_vfs_mount_print(FSTEST_MNTNAME, 1); \
+ atf_tc_fail_errno("unmount failed"); \
+ } \
} \
ATF_TC_CLEANUP(fs##_##func,tc) \
{ \
if (!atf_check_fstype(tc, type)) \
return; \
if (fs##_fstest_delfs(tc, fs##func##tmp) != 0) \
- atf_tc_fail("delfs failed"); \
+ atf_tc_fail_errno("delfs failed"); \
}
#define ATF_TP_FSADD(fs,func) \