Changeset d1c5c01f in rtems


Ignore:
Timestamp:
Sep 13, 2013, 3:06:06 PM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
bdcf4102
Parents:
736983f1
git-author:
Sebastian Huber <sebastian.huber@…> (09/13/13 15:06:06)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/13/13 15:07:15)
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/psxtests/psxfile01/test.c

    r736983f1 rd1c5c01f  
    618618
    619619  /*
    620    * Verify truncate changed only atime.
     620   * Verify truncate changed all except atime.
    621621   */
    622622  status = stat( "/tmp/j", &buf );
     
    626626  mtime2 = buf.st_mtime;
    627627  ctime2 = buf.st_ctime;
    628   rtems_test_assert( atime1 != atime2);
    629   rtems_test_assert( mtime1 == mtime2);
    630   rtems_test_assert( ctime1 == ctime2);
     628  rtems_test_assert( atime1 == atime2);
     629  rtems_test_assert( mtime1 != mtime2);
     630  rtems_test_assert( ctime1 != ctime2);
    631631
    632632  IMFS_dump();
Note: See TracChangeset for help on using the changeset viewer.