gramine icon indicating copy to clipboard operation
gramine copied to clipboard

[LibOS] Add `O_APPEND` emulation for single process

Open dimakuv opened this issue 1 year ago • 1 comments

Description of the changes

This PR adds O_APPEND emulation, but only within a single process.

Note that Gramine doesn't support multi-process operations on the same file anyhow, in particular, the file position is not synchronized among multiple processes. This PR doesn't change this limitation of Gramine, thus O_APPEND writes don't work correctly (may overwrite file contents).

Note that Linux has a bug in pwrite(). Gramine emulates this bug in the same way.

Fixes #1921.

See also:

  • https://github.com/gramineproject/gramine/issues/584
  • https://github.com/gramineproject/gramine/issues/1152

How to test this PR?

A new FS test is added. One LTP test is uncommented.


This change is Reviewable

dimakuv avatar Jul 04 '24 08:07 dimakuv

Jenkins, test this please (Jenkins was dead when this PR was created)

dimakuv avatar Jul 30 '24 08:07 dimakuv