From 351d6c5a35adcf07ccfe62add266d5db540400ed Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 8 Apr 2026 15:39:04 +0900 Subject: cmd/sharefs: reproduce vfs inode file attribute race This happens in the vfs permissions check only and stale data appears to never reach userspace. Signed-off-by: Ophestra --- test/interactive/raceattr.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 test/interactive/raceattr.nix (limited to 'test') diff --git a/test/interactive/raceattr.nix b/test/interactive/raceattr.nix new file mode 100644 index 00000000..8140beb1 --- /dev/null +++ b/test/interactive/raceattr.nix @@ -0,0 +1,24 @@ +{ lib, pkgs, ... }: +let + inherit (pkgs) buildGoModule; +in +{ + environment.systemPackages = [ + (buildGoModule rec { + name = "raceattr"; + pname = name; + tags = [ "raceattr" ]; + + src = builtins.path { + name = "${pname}-src"; + path = lib.cleanSource ../../cmd/sharefs/test; + filter = path: type: (type == "directory") || (type == "regular" && lib.hasSuffix ".go" path); + }; + vendorHash = null; + + preBuild = '' + go mod init hakurei.app/raceattr >& /dev/null + ''; + }) + ]; +} -- cgit v1.3.1