gramine icon indicating copy to clipboard operation
gramine copied to clipboard

[LibOS] Implement utime, utimes, utimensat

Open efu39 opened this issue 7 months ago • 4 comments

Description of the changes

This PR implements support for the utime(), utimes(), and utimensat() syscalls in Gramine to provide file timestamp update functionality. The utime() syscall is fully implemented, while utimes() and utimensat() are stubbed with equivalent behavior. These additions enhance Gramine's syscall compatibility and enable several LTP test cases that were previously skipped due to the lack of utimensat() support. The implementation retains the existing data types for atime, mtime, and ctime in the LibOS file structure, resulting in a timestamp resolution of one second. I took reference of prior discussions (PR #1144 and discussion #942) and implemented with lower resolution to keep the implementation minimal.

How to test this PR?

Tested with LTP Test.

LTP Before PR: 422 passed, 906 skipped

LTP After PR: 436 passed, 892 skipped


This change is Reviewable

efu39 avatar May 20 '25 12:05 efu39

Add to whitelist.

donporter avatar May 20 '25 20:05 donporter

Jenkins, retest this please

efu39 avatar Jun 17 '25 11:06 efu39

Retest Jenkins-Direct-22.04, please. Timeout on fdatasync01 I cannot reproduce locally.

donporter avatar Jul 29 '25 12:07 donporter

Jenkins, retest Jenkins-Direct-22.04 please. Timeout on fdatasync01 I cannot reproduce locally.

donporter avatar Jul 29 '25 12:07 donporter