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

Simulate file locks in blockio-sim #415

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Commits on Oct 4, 2024

  1. Simulate file locking for HasBlockIO

    The simulation piggybacks on existing `HasFS` functionality for opening files in
    different `OpenMode`s. The simulation does not simulate inter-process locking.
    jorisdral committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    ef57860 View commit details
    Browse the repository at this point in the history
  2. Run lockstep tests with simulated HasFS and HasBlockIO

    With the nice addition that we now assert that there are no open file handles at
    the end of each iteration of the tests!
    jorisdral committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    c12b65b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    63d7868 View commit details
    Browse the repository at this point in the history
  4. Add tryLockFile implentation for MockFs

    It's better but not perfect. It passes the test, but would fail if there
    were genuine concurrency. Doing it properly would need an implementation
    in fs-api and fs-sim. Fortunately we do not need a concurrency safe
    implementation (for now).
    dcoutts committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    c253bd9 View commit details
    Browse the repository at this point in the history
  5. Tweak TestTree vs Property factoring in StateMachine tests

    Follow a more normal convention, and allow running individual tests more
    easily in GHCi via quickCheck $ theProperty
    dcoutts committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    2ee8a84 View commit details
    Browse the repository at this point in the history