Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filesystem time on stat from nftw not faked #476

Open
nakato opened this issue Sep 17, 2024 · 0 comments
Open

Filesystem time on stat from nftw not faked #476

nakato opened this issue Sep 17, 2024 · 0 comments

Comments

@nakato
Copy link

nakato commented Sep 17, 2024

Filesystem time is not faked when the time of the file is retrieved through the stat of the function nftw() calls during a filesystem walk.

https://man7.org/linux/man-pages/man3/nftw.3p.html

An example usage of this is mkfs.btrfs from btrfs-progs since version v6.10.1.
Specifically since kdave/btrfs-progs@c6464d3

Example:

mkdir -p populateRoot/dir1/dir2
touch populateRoot/file populateRoot/dir1/dir2/dirfile
faketime -f "1970-01-01 00:00:01" mkfs.btrfs -r ./populateRoot btrfs.img
mount -o loop ./btrfs.img /mnt; ls -lha /mnt; umount /mnt; rm btrfs.img
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant