diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-09-13 17:06:06 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-09-13 17:07:15 +0200 |
commit | d1c5c01f62fdb2a34c96296e70a9f77973c5bab7 (patch) | |
tree | 99a9752c02bca848319ea92751b496d9b776314f /testsuites/psxtests/psxfile01 | |
parent | fstests/fstime: Fix according to POSIX (diff) | |
download | rtems-d1c5c01f62fdb2a34c96296e70a9f77973c5bab7.tar.bz2 |
psxtests/psxfile01: Fix according to POSIX
ftruncate() and open() with O_TRUNC shall upon successful completion
mark for update the st_ctime and st_mtime fields of the file.
truncate() shall upon successful completion, if the file size is
changed, mark for update the st_ctime and st_mtime fields of the file.
The POSIX standard "The Open Group Base Specifications Issue 7", IEEE
Std 1003.1, 2013 Edition says nothing about the behaviour of truncate()
if the file size remains unchanged.
Future directions of the standard may mandate the behaviour specified in
ftruncate():
http://austingroupbugs.net/view.php?id=489
Diffstat (limited to 'testsuites/psxtests/psxfile01')
-rw-r--r-- | testsuites/psxtests/psxfile01/test.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/testsuites/psxtests/psxfile01/test.c b/testsuites/psxtests/psxfile01/test.c index 4d7fe0b6eb..7326d60b57 100644 --- a/testsuites/psxtests/psxfile01/test.c +++ b/testsuites/psxtests/psxfile01/test.c @@ -617,7 +617,7 @@ since new path is not valid"); rtems_test_assert( !status ); /* - * Verify truncate changed only atime. + * Verify truncate changed all except atime. */ status = stat( "/tmp/j", &buf ); rtems_test_assert( !status ); @@ -625,9 +625,9 @@ since new path is not valid"); atime2 = buf.st_atime; mtime2 = buf.st_mtime; ctime2 = buf.st_ctime; - rtems_test_assert( atime1 != atime2); - rtems_test_assert( mtime1 == mtime2); - rtems_test_assert( ctime1 == ctime2); + rtems_test_assert( atime1 == atime2); + rtems_test_assert( mtime1 != mtime2); + rtems_test_assert( ctime1 != ctime2); IMFS_dump(); |