Module Name: src
Committed By: pooka
Date: Fri Jan 7 11:39:28 UTC 2011
Modified Files:
src/tests/fs/vfs: t_ro.c
Log Message:
expect correct errno in nfsro case. from yamt
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/fs/vfs/t_ro.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/fs/vfs/t_ro.c
diff -u src/tests/fs/vfs/t_ro.c:1.2 src/tests/fs/vfs/t_ro.c:1.3
--- src/tests/fs/vfs/t_ro.c:1.2 Fri Dec 31 18:26:25 2010
+++ src/tests/fs/vfs/t_ro.c Fri Jan 7 11:39:27 2011
@@ -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();
}