#1871 closed defect (fixed)

O_APPEND is broken for IMFS, DOSFS, and RFS

Reported by: Xiang Cui Owned by: Chris Johns
Priority: normal Milestone: 4.11
Component: fs Version: 4.11
Severity: normal Keywords:
Cc: sebastian.huber@… Blocked By:
Blocking:

Description

fd = open (name01, O_CREAT | O_WRONLY, mode);

status = close (fd);
rtems_test_assert (status == 0);


/*

  • Write data to the empty file */

fd = open (name01, O_WRONLY);
rtems_test_assert (fd != -1);

n = write (fd, databuf, len);
rtems_test_assert (n == len);
status = close (fd);
rtems_test_assert (status == 0);

/*

*Open the file using O_APPEND and write the data
*/

memset (readbuf, 0, len + 1);
fd = open (name01, O_WRONLY | O_APPEND);
n = write (fd, databuf, len);
rtems_test_assert (n == len);
pos = lseek (fd, 0, SEEK_CUR);
rtems_test_assert (pos == 2 * len); /* THE TEST FAILS HERE */

Attachments (1)

fsrdwr.diff (11.2 KB) - added by Xiang Cui on Aug 7, 2011 at 2:21:04 PM.
The patch for the fsrdwr

Download all attachments as: .zip

Change History (5)

Changed on Aug 7, 2011 at 2:21:04 PM by Xiang Cui

Attachment: fsrdwr.diff added

The patch for the fsrdwr

comment:1 Changed on Aug 7, 2011 at 2:21:51 PM by Xiang Cui

attachments.ispatch: 01
attachments.mimetype: application/octet-streamtext/plain

comment:2 Changed on May 4, 2012 at 1:36:30 PM by Sebastian Huber

Cc: Sebastian Huber added
Summary: [rfs] opening file with O_WRONL|O_APPEND doesn't work as expectO_APPEND is broken for IMFS, DOSFS, and RFS

comment:4 Changed on Nov 24, 2014 at 6:58:28 PM by Gedare Bloom

Version: HEAD4.11

Replace Version=HEAD with Version=4.11 for the tickets with Milestone >= 4.11

Note: See TracTickets for help on using tickets.