Fri Jan 7 12:18:25 2011 UTC ()
xfail PR kern/44336


(pooka)
diff -r1.16 -r1.17 src/tests/fs/vfs/t_renamerace.c

cvs diff -r1.16 -r1.17 src/tests/fs/vfs/t_renamerace.c (expand / switch to unified diff)

--- src/tests/fs/vfs/t_renamerace.c 2011/01/07 11:53:23 1.16
+++ src/tests/fs/vfs/t_renamerace.c 2011/01/07 12:18:25 1.17
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: t_renamerace.c,v 1.16 2011/01/07 11:53:23 pooka Exp $ */ 1/* $NetBSD: t_renamerace.c,v 1.17 2011/01/07 12:18:25 pooka Exp $ */
2 2
3/* 3/*
4 * Modified for rump and atf from a program supplied 4 * Modified for rump and atf from a program supplied
5 * by Nicolas Joly in kern/40948 5 * by Nicolas Joly in kern/40948
6 */ 6 */
7 7
8#include <sys/types.h> 8#include <sys/types.h>
9#include <sys/mount.h> 9#include <sys/mount.h>
10#include <sys/utsname.h> 10#include <sys/utsname.h>
11 11
12#include <atf-c.h> 12#include <atf-c.h>
13#include <errno.h> 13#include <errno.h>
14#include <fcntl.h> 14#include <fcntl.h>
@@ -123,46 +123,49 @@ renamerace_dirs(const atf_tc_t *tc, cons @@ -123,46 +123,49 @@ renamerace_dirs(const atf_tc_t *tc, cons
123 pthread_t pt1, pt2; 123 pthread_t pt1, pt2;
124 124
125 if (FSTYPE_SYSVBFS(tc)) 125 if (FSTYPE_SYSVBFS(tc))
126 atf_tc_skip("directories not supported"); 126 atf_tc_skip("directories not supported");
127 127
128 if (FSTYPE_RUMPFS(tc)) 128 if (FSTYPE_RUMPFS(tc))
129 atf_tc_skip("rename not supported by fs"); 129 atf_tc_skip("rename not supported by fs");
130 130
131 /* XXX: msdosfs also sometimes hangs */ 131 /* XXX: msdosfs also sometimes hangs */
132 if (FSTYPE_FFS(tc) || FSTYPE_EXT2FS(tc) || FSTYPE_LFS(tc) || 132 if (FSTYPE_FFS(tc) || FSTYPE_EXT2FS(tc) || FSTYPE_LFS(tc) ||
133 FSTYPE_MSDOS(tc) || FSTYPE_FFSLOG(tc)) 133 FSTYPE_MSDOS(tc) || FSTYPE_FFSLOG(tc))
134 atf_tc_expect_signal(-1, "PR kern/43626"); 134 atf_tc_expect_signal(-1, "PR kern/43626");
135 135
 136 if (FSTYPE_P2K_FFS(tc))
 137 atf_tc_expect_fail("PR kern/44336"); /* child dies */
 138
136 RZ(rump_pub_lwproc_rfork(RUMP_RFCFDG)); 139 RZ(rump_pub_lwproc_rfork(RUMP_RFCFDG));
137 RL(wrkpid = rump_sys_getpid()); 140 RL(wrkpid = rump_sys_getpid());
138 141
139 RL(rump_sys_chdir(mp)); 142 RL(rump_sys_chdir(mp));
140 pthread_create(&pt1, NULL, w1_dirs, NULL); 143 pthread_create(&pt1, NULL, w1_dirs, NULL);
141 pthread_create(&pt2, NULL, w2, NULL); 144 pthread_create(&pt2, NULL, w2, NULL);
142 145
143 sleep(5); 146 sleep(5);
144 quittingtime = 1; 147 quittingtime = 1;
145 148
146 pthread_join(pt1, NULL); 149 pthread_join(pt1, NULL);
147 pthread_join(pt2, NULL); 150 pthread_join(pt2, NULL);
148 RL(rump_sys_chdir("/")); 151 RL(rump_sys_chdir("/"));
149 152
150 /* 153 /*
151 * Doesn't always trigger when run on a slow backend 154 * Doesn't always trigger when run on a slow backend
152 * (i.e. not on tmpfs/mfs). So do the usual kludge. 155 * (i.e. not on tmpfs/mfs). So do the usual kludge.
153 */ 156 */
154 if (FSTYPE_FFS(tc) || FSTYPE_EXT2FS(tc) || FSTYPE_LFS(tc) || 157 if (FSTYPE_FFS(tc) || FSTYPE_EXT2FS(tc) || FSTYPE_LFS(tc) ||
155 FSTYPE_MSDOS(tc)) 158 FSTYPE_MSDOS(tc) || FSTYPE_P2K_FFS(tc))
156 abort(); 159 abort();
157} 160}
158 161
159ATF_TC_FSAPPLY(renamerace, "rename(2) race with file unlinked mid-operation"); 162ATF_TC_FSAPPLY(renamerace, "rename(2) race with file unlinked mid-operation");
160ATF_TC_FSAPPLY(renamerace_dirs, "rename(2) race with directories"); 163ATF_TC_FSAPPLY(renamerace_dirs, "rename(2) race with directories");
161 164
162ATF_TP_ADD_TCS(tp) 165ATF_TP_ADD_TCS(tp)
163{ 166{
164 167
165 ATF_TP_FSAPPLY(renamerace); /* PR kern/41128 */ 168 ATF_TP_FSAPPLY(renamerace); /* PR kern/41128 */
166 ATF_TP_FSAPPLY(renamerace_dirs); 169 ATF_TP_FSAPPLY(renamerace_dirs);
167 170
168 return atf_no_error(); 171 return atf_no_error();