Closed mdietzer-fn closed 1 year ago
I believe this behaviour breaks the FAKETIME_FOLLOW_FILE
feature:
On Ubuntu 16.04, stat()
is a weak symbol pointing to statx()
. This means that https://github.com/wolfcw/libfaketime/blob/6fc4ae74f43bd906be74515778c35b2658672958/src/libfaketime.c#L2588 fails to find the "real" stat()
The consequence is that, when trying to read the timestamp of the follow file, the CHECK_MISSING_REAL(stat)
thinks there is no stat available, and fails to read the file's timestamp.
More generally, on platforms where some faked symbols are weak symbols, libfaketime is unable to find the "real" syscall, and fails.
In my environment I have implemented the following hack to allow me to proceed with the tests I'm working on, but is by no means a good solution: 1ddc2ff2356fa5db3f124f316264661a27530359
I propose changing the issue title to "libfaketime does not support weak symbols" and reclassifying this issue as a bug.
As the title says, currently libfaketime does not intercept the
statx
syscall ( https://man7.org/linux/man-pages/man2/statx.2.html )This syscall is used on modern Debian (bullseye) in its built-in programs at the last (such as
ls
andstat
). Example:I have verified this is an issue with both the packaged faketime as well as latest git