forked from rosa/hakurei
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>
This commit is contained in:
24
test/interactive/raceattr.nix
Normal file
24
test/interactive/raceattr.nix
Normal file
@@ -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
|
||||
'';
|
||||
})
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user