- POSIX specifies utimes returns EPERM, not EACCESS, when there are
   insufficient rights and times is not NULL

 - the timeval structures need to be initialized, because garbage in
   the nanosecond part would cause EINVAL

Signed-off-by: Jiri Palecek <[email protected]>
---
 testcases/kernel/syscalls/utimes/utimes01.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/testcases/kernel/syscalls/utimes/utimes01.c 
b/testcases/kernel/syscalls/utimes/utimes01.c
index 7705269..2fddb99 100644
--- a/testcases/kernel/syscalls/utimes/utimes01.c
+++ b/testcases/kernel/syscalls/utimes/utimes01.c
@@ -209,7 +209,7 @@ static struct test_case tcase[] = {
                 .m_sec          = 2000,
                 .user           = "nobody",
                 .ret            = -1,
-                .err            = EACCES, // RHEL4U1 + 2.6.18 returns EPERM
+                .err            = EPERM, // RHEL4U1 + 2.6.18 returns EPERM,
         },
         { // case03
                 .ttype          = FILE_NOT_EXIST,
@@ -240,7 +240,7 @@ static int do_test(struct test_case *tc)
 {
         int sys_ret;
         int result = RESULT_OK;
-       struct timeval tv[2];
+        struct timeval tv[2] = { 0 };
         const char *fpath = FNAME;
         int rc, cmp_ok = 1;
         struct stat st;
-- 
1.6.4.3




------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to