Mon Nov 1 14:04:02 2010 UTC ()
Create the process we use later in the test.  Otherwise cwd doesn't
go right and the test fails because of attempting to create files
in the wrong directory.


(pooka)
diff -r1.12 -r1.13 src/tests/fs/vfs/t_renamerace.c

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

--- src/tests/fs/vfs/t_renamerace.c 2010/09/01 19:41:28 1.12
+++ src/tests/fs/vfs/t_renamerace.c 2010/11/01 14:04:02 1.13
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: t_renamerace.c,v 1.12 2010/09/01 19:41:28 pooka Exp $ */ 1/* $NetBSD: t_renamerace.c,v 1.13 2010/11/01 14:04:02 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>
@@ -77,26 +77,29 @@ w2(void *arg) @@ -77,26 +77,29 @@ w2(void *arg)
77#define NWRK 8 77#define NWRK 8
78static void 78static void
79renamerace(const atf_tc_t *tc, const char *mp) 79renamerace(const atf_tc_t *tc, const char *mp)
80{ 80{
81 pthread_t pt1[NWRK], pt2[NWRK]; 81 pthread_t pt1[NWRK], pt2[NWRK];
82 int i; 82 int i;
83 83
84 if (FSTYPE_LFS(tc)) 84 if (FSTYPE_LFS(tc))
85 atf_tc_expect_signal(-1, "PR kern/43582"); 85 atf_tc_expect_signal(-1, "PR kern/43582");
86 86
87 if (FSTYPE_MSDOS(tc)) 87 if (FSTYPE_MSDOS(tc))
88 atf_tc_skip("test fails in some setups, reason unknown"); 88 atf_tc_skip("test fails in some setups, reason unknown");
89 89
 90 RZ(rump_pub_lwproc_newproc());
 91 RL(wrkpid = rump_sys_getpid());
 92
90 RL(rump_sys_chdir(mp)); 93 RL(rump_sys_chdir(mp));
91 for (i = 0; i < NWRK; i++) 94 for (i = 0; i < NWRK; i++)
92 pthread_create(&pt1[i], NULL, w1, NULL); 95 pthread_create(&pt1[i], NULL, w1, NULL);
93 96
94 for (i = 0; i < NWRK; i++) 97 for (i = 0; i < NWRK; i++)
95 pthread_create(&pt2[i], NULL, w2, NULL); 98 pthread_create(&pt2[i], NULL, w2, NULL);
96 99
97 sleep(5); 100 sleep(5);
98 quittingtime = 1; 101 quittingtime = 1;
99 102
100 for (i = 0; i < NWRK; i++) 103 for (i = 0; i < NWRK; i++)
101 pthread_join(pt1[i], NULL); 104 pthread_join(pt1[i], NULL);
102 for (i = 0; i < NWRK; i++) 105 for (i = 0; i < NWRK; i++)