mrfs_fstime failure

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Apr 3 05:56:35 UTC 2014


On 2014-04-03 03:26, Chris Johns wrote:
> On 3/04/2014 7:19 am, Joel Sherrill wrote:
>>
>> On 4/1/2014 5:03 PM, Chris Johns wrote:
>>> On 2/04/2014 6:44 am, Joel Sherrill wrote:
>>>> Hi
>>>>
>>>> I think this is a long standing failure.
>>>>
>>>> *** BEGIN OF TEST FSTIME RFS ***
>>>> Initializing filesystem RFS
>>>> Sleep a few seconds
>>>> ../../../../../../../rtems/c/src/../../testsuites/fstests/mrfs_fstime/../fstime/test.c:
>>>>
>>>> 131 st.st_ctime == st.st_mtime
>>>>
>>>> When I break at end of stat, I see this.
>>>>
>>>> (gdb) p *buf
>>>> $1 = {st_dev = 34401048, st_ino = 2, st_mode = 16877, st_nlink = 1,
>>>> st_uid = 0, st_gid = 0, st_rdev = 0, st_size = 512, st_atim = {
>>>>       tv_sec = 567993600, tv_nsec = 0}, st_mtim = {tv_sec = 567993600,
>>>> tv_nsec = 0}, st_ctim = {tv_sec = 567993606, tv_nsec = 0},
>>>>     st_blksize = 512, st_blocks = 1}
>>>>
>>>> Something is happening in test.c with gdb and I can't print the stat buf.
>>>>
>>>> Any ideas? Since this is a generic failure, it would be good to
>>>> eliminate it.
>>>>
>>> It is specific to the RFS as far as I know. The code in the test says ...
>>>
>>>     /*
>>>      * If O_CREAT is set and the file did not previously exist, upon
>>>      * successful completion, open() shall mark for update the st_atime,
>>>      * st_ctime, and st_mtime fields of the file and the st_ctime and
>>>      * st_mtime fields of the parent directory.
>>>      */
>>>
>>> Does this apply to the creation of any node in the file system ?
>> We would have to find the place in the POSIX standard. This statements
>> like it is
>> from http://pubs.opengroup.org/onlinepubs/009695399/functions/fopen.html.
>>
>> This would imply to me that it should but can the FAT filesystem support
>> this?
>
> No idea.

I removed this test for the FAT file system:

http://git.rtems.org/rtems/commit/?id=bdcf4102f71d1bc2a50f23d2d425d85c24ec0900

>
>> Are you hinting that it is generic code which should be in the system
>> call layer?
>
> No, just wondering where I should look to make the change in the RFS.

The IMFS and JFFS2 pass this test.  It is file system specific, see FAT as a 
counter example.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list