Module Name: src
Committed By: pooka
Date: Wed Jan 12 21:45:39 UTC 2011
Modified Files:
src/tests/fs/vfs: t_union.c
Log Message:
Instead of hardcoding fs list just try to mount union and skip all
file systems which return EOPNOTSUPP.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/fs/vfs/t_union.c
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/vfs/t_union.c
diff -u src/tests/fs/vfs/t_union.c:1.1 src/tests/fs/vfs/t_union.c:1.2
--- src/tests/fs/vfs/t_union.c:1.1 Wed Jan 12 21:13:27 2011
+++ src/tests/fs/vfs/t_union.c Wed Jan 12 21:45:39 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_union.c,v 1.1 2011/01/12 21:13:27 pooka Exp $ */
+/* $NetBSD: t_union.c,v 1.2 2011/01/12 21:45:39 pooka Exp $ */
#include <sys/types.h>
#include <sys/mount.h>
@@ -22,9 +22,6 @@
#define MSTR "magic bus"
-#define HAS_WHITEOUT (FSTYPE_FFS(tc) || FSTYPE_FFSLOG(tc) || \
- FSTYPE_LFS(tc) || FSTYPE_RUMPFS(tc))
-
static void
xput_tfile(const char *mp, const char *path)
{
@@ -74,10 +71,6 @@
struct dirent *dp;
int error, fd, dsize;
- if (!HAS_WHITEOUT) {
- atf_tc_skip("file system does not support VOP_WHITEOUT");
- }
-
snprintf(lowerpath, sizeof(lowerpath), "%s.lower", mp);
RL(rump_sys_mkdir(lowerpath, 0777));
@@ -91,8 +84,13 @@
unionargs.mntflags = UNMNT_BELOW;
if (rump_sys_mount(MOUNT_UNION, mp, 0,
- &unionargs, sizeof(unionargs)) == -1)
- atf_tc_fail_errno("union mount");
+ &unionargs, sizeof(unionargs)) == -1) {
+ if (errno == EOPNOTSUPP) {
+ atf_tc_skip("fs does not support VOP_WHITEOUT");
+ } else {
+ atf_tc_fail_errno("union mount");
+ }
+ }
/* first, test we can read the old file from the new namespace */
error = xread_tfile(mp, TFILE);