Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/fs/common Since rump implicit threads now bind to proc...
details: https://anonhg.NetBSD.org/src/rev/2afccf6c46f5
branches: trunk
changeset: 758301:2afccf6c46f5
user: pooka <pooka%NetBSD.org@localhost>
date: Sun Oct 31 22:05:35 2010 +0000
description:
Since rump implicit threads now bind to proc1 instead of proc0, we
need our shovel threads bound to proc1 instead of proc0 in order
to have access to the same set of descriptors as the implicit thread
which opens the fd in the rump kernel.
Also, sprinkle some printfs and make failure more dramatic.
fixes the puffs tests. pointed out by pgoyette.
diffstat:
tests/fs/common/fstest_puffs.c | 28 +++++++++++++++++++---------
1 files changed, 19 insertions(+), 9 deletions(-)
diffs (87 lines):
diff -r b00c7ca0d567 -r 2afccf6c46f5 tests/fs/common/fstest_puffs.c
--- a/tests/fs/common/fstest_puffs.c Sun Oct 31 20:05:04 2010 +0000
+++ b/tests/fs/common/fstest_puffs.c Sun Oct 31 22:05:35 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fstest_puffs.c,v 1.3 2010/09/01 19:41:27 pooka Exp $ */
+/* $NetBSD: fstest_puffs.c,v 1.4 2010/10/31 22:05:35 pooka Exp $ */
/*
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -72,20 +72,24 @@
phdr = (void *)buf;
preq = (void *)buf;
- rump_pub_lwproc_newlwp(0);
+ rump_pub_lwproc_newlwp(1);
for (;;) {
ssize_t n;
n = rump_sys_read(puffsfd, buf, sizeof(*phdr));
- if (n <= 0)
+ if (n <= 0) {
+ fprintf(stderr, "readshovel r1 %d / %d\n", n, errno);
break;
+ }
assert(phdr->pth_framelen < BUFSIZE);
n = rump_sys_read(puffsfd, buf+sizeof(*phdr),
phdr->pth_framelen - sizeof(*phdr));
- if (n <= 0)
+ if (n <= 0) {
+ fprintf(stderr, "readshovel r2 %d / %d\n", n, errno);
break;
+ }
/* Analyze request */
if (PUFFSOP_OPCLASS(preq->preq_opclass) == PUFFSOP_VFS) {
@@ -97,11 +101,13 @@
}
n = phdr->pth_framelen;
- if (write(comfd, buf, n) != n)
+ if (write(comfd, buf, n) != n) {
+ fprintf(stderr, "readshovel write %d / %d\n", n, errno);
break;
+ }
}
- return NULL;
+ abort();
}
static void *
@@ -113,7 +119,7 @@
size_t toread;
int comfd, puffsfd;
- rump_pub_lwproc_newlwp(0);
+ rump_pub_lwproc_newlwp(1);
comfd = args->pta_servfd;
puffsfd = args->pta_rumpfd;
@@ -134,6 +140,8 @@
do {
n = read(comfd, buf+off, toread);
if (n <= 0) {
+ fprintf(stderr, "writeshovel read %d / %d\n",
+ n, errno);
break;
}
off += n;
@@ -144,11 +152,13 @@
} while (toread);
n = rump_sys_write(puffsfd, buf, phdr->pth_framelen);
- if ((size_t)n != phdr->pth_framelen)
+ if ((size_t)n != phdr->pth_framelen) {
+ fprintf(stderr, "writeshovel wr %d / %d\n", n, errno);
break;
+ }
}
- return NULL;
+ abort();
}
static void
Home |
Main Index |
Thread Index |
Old Index