Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls/fcntl
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19747
Modified Files:
fcntl27.c
Log Message:
Corrected this test, should be positive test versus negative...based on the
properties of the open() call in the setup().
Index: fcntl27.c
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/fcntl/fcntl27.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** fcntl27.c 13 Jan 2006 22:29:27 -0000 1.3
--- fcntl27.c 9 Mar 2006 20:15:39 -0000 1.4
***************
*** 106,114 ****
extern int Tst_count; /* Test Case counter for tst_* routines */
- int exp_enos[]={EAGAIN, 0};
-
char fname[255];
int fd;
int
main(int ac, char **av)
--- 106,114 ----
extern int Tst_count; /* Test Case counter for tst_* routines */
char fname[255];
int fd;
+ int exp_enos[]={0};
+
int
main(int ac, char **av)
***************
*** 128,132 ****
setup();
- /* set the expected errnos... */
TEST_EXP_ENOS(exp_enos);
--- 128,131 ----
***************
*** 146,166 ****
/* check return code */
! if ( TEST_RETURN == -1 ) {
TEST_ERROR_LOG(TEST_ERRNO);
- if (TEST_ERRNO != exp_enos[0]) {
- tst_resm(TFAIL,
- "fcntl(%s, F_SETLEASE,F_RDLCK)"
- " Failed, errno=%d : %s",
- fname, TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
tst_resm(TPASS,
! "expected failure - errno "
! "= %d : %s",
! TEST_ERRNO, strerror(TEST_ERRNO));
}
! } else {
tst_resm(TFAIL, "fcntl(%s, F_SETLEASE, F_RDLCK)"
! " did not return -1, returned %d",
! fname, TEST_RETURN);
}
#endif
--- 145,157 ----
/* check return code */
! if ( TEST_RETURN == 0 ) {
TEST_ERROR_LOG(TEST_ERRNO);
tst_resm(TPASS,
! "fcntl(fd, F_SETLEASE,F_RDLCK) succeeded");
}
! else {
tst_resm(TFAIL, "fcntl(%s, F_SETLEASE, F_RDLCK)"
! " failed with errno %d : %s", TEST_ERRNO,
! strerror(TEST_ERRNO));
}
#endif
|