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 test for `ln -s / foo && cd foo'.
details: https://anonhg.NetBSD.org/src/rev/2a38426a7d17
branches: trunk
changeset: 768544:2a38426a7d17
user: riastradh <riastradh%NetBSD.org@localhost>
date: Fri Aug 19 01:25:27 2011 +0000
description:
Add test for `ln -s / foo && cd foo'.
diffstat:
tests/fs/vfs/t_vnops.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diffs (43 lines):
diff -r f9d4ba880fd7 -r 2a38426a7d17 tests/fs/vfs/t_vnops.c
--- a/tests/fs/vfs/t_vnops.c Thu Aug 18 21:44:55 2011 +0000
+++ b/tests/fs/vfs/t_vnops.c Fri Aug 19 01:25:27 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_vnops.c,v 1.27 2011/08/11 10:52:12 uch Exp $ */
+/* $NetBSD: t_vnops.c,v 1.28 2011/08/19 01:25:27 riastradh Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -534,6 +534,17 @@
}
static void
+symlink_root(const atf_tc_t *tc, const char *mp)
+{
+
+ USES_SYMLINKS;
+
+ RL(rump_sys_chdir(mp));
+ RL(rump_sys_symlink("/", "foo"));
+ RL(rump_sys_chdir("foo"));
+}
+
+static void
attrs(const atf_tc_t *tc, const char *mp)
{
struct stat sb, sb2;
@@ -827,6 +838,7 @@
ATF_TC_FSAPPLY(create_exist, "create with O_EXCL");
ATF_TC_FSAPPLY(rename_nametoolong, "rename to file with name too long");
ATF_TC_FSAPPLY(symlink_zerolen, "symlink with 0-len target");
+ATF_TC_FSAPPLY(symlink_root, "symlink to root directory");
ATF_TC_FSAPPLY(attrs, "check setting attributes works");
ATF_TC_FSAPPLY(fcntl_lock, "check fcntl F_SETLK");
ATF_TC_FSAPPLY(fcntl_getlock_pids,"fcntl F_GETLK w/ many procs, PR kern/44494");
@@ -847,6 +859,7 @@
ATF_TP_FSAPPLY(create_exist);
ATF_TP_FSAPPLY(rename_nametoolong);
ATF_TP_FSAPPLY(symlink_zerolen);
+ ATF_TP_FSAPPLY(symlink_root);
ATF_TP_FSAPPLY(attrs);
ATF_TP_FSAPPLY(fcntl_lock);
ATF_TP_FSAPPLY(fcntl_getlock_pids);
Home |
Main Index |
Thread Index |
Old Index