Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/fs/vfs expect correct errno in nfsro case. from yamt
details: https://anonhg.NetBSD.org/src/rev/c8c00ccfa481
branches: trunk
changeset: 760545:c8c00ccfa481
user: pooka <pooka%NetBSD.org@localhost>
date: Fri Jan 07 11:39:27 2011 +0000
description:
expect correct errno in nfsro case. from yamt
diffstat:
tests/fs/vfs/t_ro.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diffs (33 lines):
diff -r 753424c10fd8 -r c8c00ccfa481 tests/fs/vfs/t_ro.c
--- a/tests/fs/vfs/t_ro.c Fri Jan 07 11:36:27 2011 +0000
+++ b/tests/fs/vfs/t_ro.c Fri Jan 07 11:39:27 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ro.c,v 1.2 2010/12/31 18:26:25 pooka Exp $ */
+/* $NetBSD: t_ro.c,v 1.3 2011/01/07 11:39:27 pooka Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -95,6 +95,12 @@
{
int fd;
char buf[FUNSIZE+1];
+ int expected;
+
+ if (FSTYPE_NFSRO(tc))
+ expected = EACCES;
+ else
+ expected = EROFS;
FSTEST_ENTER();
RL(fd = rump_sys_open(AFILE, O_RDONLY));
@@ -103,8 +109,8 @@
ATF_REQUIRE_STREQ(buf, FUNTEXT);
RL(rump_sys_close(fd));
- ATF_REQUIRE_ERRNO(EROFS, rump_sys_open(AFILE, O_WRONLY) == -1);
- ATF_REQUIRE_ERRNO(EROFS, rump_sys_open(AFILE, O_RDWR) == -1);
+ ATF_REQUIRE_ERRNO(expected, rump_sys_open(AFILE, O_WRONLY) == -1);
+ ATF_REQUIRE_ERRNO(expected, rump_sys_open(AFILE, O_RDWR) == -1);
FSTEST_EXIT();
}
Home |
Main Index |
Thread Index |
Old Index