zfs: the keeper tests make their socket directory in the test's own temporary directory

The group's check failed TestOnlyRootOpensTheKeepersSocketAndANeedlessKeeperIsTheBusDown and TestAKeeperThatDoesNotAnswerIsWarnedOnce: stat /var/tmp: no such file or directory.

Builds: design 42 zfs-owns-zfs §18, A-37
This commit is contained in:
2026-11-13 03:12:40 +01:00
parent aa0a472b29
commit 8ae4fabfbe
+2 -2
View File
@@ -73,7 +73,7 @@ func TestOnlyRootOpensTheKeepersSocketAndANeedlessKeeperIsTheBusDown(t *testing.
k := &Keeper{Emit: func(string, any) error { return nil }, States: st,
Call: func(string, any) (json.RawMessage, error) { return nil, errors.New("down") },
PeerOf: func(net.Conn) (int, error) { return uid, nil }}
dir, err := os.MkdirTemp("/var/tmp", "zk")
dir, err := os.MkdirTemp("", "zk")
if err != nil {
t.Fatal(err)
}
@@ -148,7 +148,7 @@ func TestOnlyRootOpensTheKeepersSocketAndANeedlessKeeperIsTheBusDown(t *testing.
// A-37: a root process whose keeper does not answer acts as with the bus down and says so, once, in a warning, for the
// hand acts, the forgetting of applied keys and the pause alike.
func TestAKeeperThatDoesNotAnswerIsWarnedOnce(t *testing.T) {
dir, err := os.MkdirTemp("/var/tmp", "keeper-down")
dir, err := os.MkdirTemp("", "keeper-down")
if err != nil {
t.Fatal(err)
}