|
From: Roman K. <rk...@sw...> - 2005-05-26 06:13:34
|
Hi,
Test testcases/kernel/syscalls/fcntl/fcntl23.c fails (at least on
2.6.8+ kernels) with fcntl(fd, F_SETLEASE,F_RDLCK) resulting in EAGAIN.
AFAICT the reason is that it attempts to set a read lease on a file
which it opens read/write.
The attached file fixes it to open the file readonly.
Please consider applying.
Roman.
--- ltp-full-20050505/testcases/kernel/syscalls/fcntl/fcntl23.c.orig 2005-05-05 23:16:26.000000000 +0400
+++ ltp-full-20050505/testcases/kernel/syscalls/fcntl/fcntl23.c 2005-05-18 13:26:36.000000000 +0400
@@ -195,9 +195,9 @@
tst_tmpdir();
sprintf(fname,"tfile_%d",getpid());
- if ((fd = open(fname,O_RDWR|O_CREAT,0777)) == -1) {
+ if ((fd = open(fname,O_RDONLY|O_CREAT,0777)) == -1) {
tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT,0777) Failed, errno=%d : %s",
+ "open(%s, O_RDONLY|O_CREAT,0777) Failed, errno=%d : %s",
fname, errno, strerror(errno));
}
} /* End setup() */
|