I'm trying to reimplement part of git. I'm writing integration tests (in Rust) that check byte-for-byte compatibility between the output of my library and git. I currently run both on the same files, cleaning the .git directory in between, so that the files have the same inodes and other metadata. I'm running into flaky tests. For example, the ctime of an executable file seems to get set when the file is read.
I think this is a symptom of a larger problem, which is that I really want a completely reproducible filesystem. Does such a thing exist? Ideally I would get to pick exactly what stat returns for each file.