From 1a7b909f971dee8c215cf1877cd95a3d690730e1 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 18 Oct 2026 20:33:03 +0900 Subject: internal/system: file-based big lock Simultaneous commits or reverts can race if they have overlapping targets. This big lock synchronises entry into the Commit and Revert critical sections across all cmd/hakurei processes. Signed-off-by: Ophestra --- cmd/hakurei/testsuite/main.go | 2 +- cmd/hakurei/testsuite/sandbox/tester/main.go | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) (limited to 'cmd') diff --git a/cmd/hakurei/testsuite/main.go b/cmd/hakurei/testsuite/main.go index c9defc18..0e031430 100644 --- a/cmd/hakurei/testsuite/main.go +++ b/cmd/hakurei/testsuite/main.go @@ -860,7 +860,7 @@ func main() { if dents, err := os.ReadDir(testsuite.HakureiPrefix); err != nil { log.Fatal(err) } else { - if len(dents) != 3 { + if len(dents) != 4 { log.Fatal("leftover hakurei work directories") } } diff --git a/cmd/hakurei/testsuite/sandbox/tester/main.go b/cmd/hakurei/testsuite/sandbox/tester/main.go index 452712d9..79d17c79 100644 --- a/cmd/hakurei/testsuite/sandbox/tester/main.go +++ b/cmd/hakurei/testsuite/sandbox/tester/main.go @@ -164,7 +164,6 @@ func main() { } if want.TrySocket != "" { - retry: abstractConn, abstractErr := net.Dial("unix", "@"+want.TrySocket) pathnameConn, pathnameErr := net.Dial("unix", want.TrySocket) ok := true @@ -182,16 +181,6 @@ func main() { } } - if errors.Is( - abstractErr, - syscall.EAGAIN, - ) || errors.Is( - pathnameErr, - syscall.EAGAIN, - ) { - goto retry - } - abstractWantErr := error(want.ErrnoAbstract) pathnameWantErr := error(want.ErrnoPathname) if want.ErrnoAbstract == 0 { -- cgit v1.3.1