aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-04-08 15:39:04 +0900
committerOphestra <cat@gensokyo.uk>2026-04-08 15:51:36 +0900
commit351d6c5a35adcf07ccfe62add266d5db540400ed (patch)
tree5ac03f17b24dc05f2874bf224fd7e94c26d5b6e2 /test
parentf23f73701c4ccf96ab4a1c28d4ca163f8e96f2f4 (diff)
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 <cat@gensokyo.uk>
Diffstat (limited to 'test')
-rw-r--r--test/interactive/raceattr.nix24
1 files changed, 24 insertions, 0 deletions
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
+ '';
+ })
+ ];
+}