mirror of
https://github.com/narrrl/proton-drive-linux.git
synced 2026-11-04 00:47:00 +01:00
The second half of the simulation harness in docs/MILESTONE-3.0.0.md section 8.2. A run starts one or more real FUSE daemons on a shared FakeDrive. Each client owns a folder `c<n>` that only it writes. A seed then draws syscalls through the mounts, link flaps, restarts, pauses and settles. Every syscall is checked against a model of the client's tree as it happens. After the last step every link comes up and the run checks no loss, POSIX behaviour, no false conflicts, convergence and liveness. - sim::model is the POSIX model: the tree, what each call should answer, and how it changes the tree. - sim::run has the profiles: one client on a good link, one on a flaky link with flaps and restarts, and three clients. PDFS_SIM_SEEDS sets how many seeds each runs, and PDFS_SIM_SEED replays one. - sim::watchdog catches a call that never returns. It takes every thread's stack in the process, since no tracer can stop a thread blocked on a FUSE request. It then aborts the run's FUSE connections and writes the stacks next to the run's state. - The daemons' logs at INFO and above are kept, so a known open bug is told apart from a new failure. Known bugs are counted, and the seed ends where the mount leaves the model behind. PDFS_SIM_KNOWN=fail fails on them instead. - A restart retries opening the database while the last run still holds it. - The FakeDrive restamps a node's modification time on a rename or move, as Drive does (B113). The runs mount FUSE, so they are ignored by default. Run them with `cargo test -p pdfs-fuse --lib sim:: -- --ignored --test-threads=1`. Test-only; no behaviour change.