[MacPorts] #58729: legacy-support missing futimens() (and utimensat)

MacPorts noreply at macports.org
Wed Feb 3 11:34:27 UTC 2021


#58729: legacy-support missing futimens() (and utimensat)
-----------------------------+----------------------
  Reporter:  RJVB            |      Owner:  kencu
      Type:  enhancement     |     Status:  assigned
  Priority:  Normal          |  Milestone:
 Component:  ports           |    Version:
Resolution:                  |   Keywords:
      Port:  legacy-support  |
-----------------------------+----------------------

Comment (by Ionic):

 The APFS retrofit FUSE driver is read-only, so timestamp updates won't
 work anyway.

 ZFS is third-party, so not really relevant.

 However, I've since updated the test cases to check for `utimes`
 compatibility (only in case of non-APFS file systems, of course) and found
 an interesting bug.

 On both 10.13 natively, as well as with our copied implementation on older
 system, the test fails when the mtime is set to `UTIME_OMIT`:

 {{{
 test/test_utimensat
 Testing: === {305419896, 987654321} {354826056, 123456789} ===
 Testing: === {0, -1} {354826056, 123456789} ===
 Testing: === {305419896, 987654321} {0, -1} ===
 Testing: === {0, -1} {0, -1} ===
 Testing: === {0, -2} {354826056, 123456789} ===
 Testing: === {305419896, 987654321} {0, -2} ===
 assert EQ failed {1612234261, 305419896} post stat vs. utimensat Atime
 seconds (utimensat Atime explicit)
 }}}

 Obviously, `utimensat` doesn't update the `atime` correctly if the `mtime`
 is set to `UTIME_OMIT`, but only on non-APFS (or even just on HFS+) file
 systems.

 That's not a problem as such, because we're essentially bug-for-bug
 compatible, but I'll have to change the test case to accept the failure.

-- 
Ticket URL: <https://trac.macports.org/ticket/58729#comment:23>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list