From 9d06f2c378e9ab8ae93fa08739ab57156a10c737 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 23 Aug 2026 01:19:22 -0700 Subject: [PATCH] test: keep per-test log directories in the FUSE DLM harness (#10893) --- test/fuse_dlm/framework_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/fuse_dlm/framework_test.go b/test/fuse_dlm/framework_test.go index 13cecec8f..69f4dbfd8 100644 --- a/test/fuse_dlm/framework_test.go +++ b/test/fuse_dlm/framework_test.go @@ -8,6 +8,7 @@ import ( "os/exec" "path/filepath" "strconv" + "strings" "sync" "syscall" "testing" @@ -263,7 +264,10 @@ func (c *dlmTestCluster) tailLog(name string) string { } func (c *dlmTestCluster) copyLogsForCI() { - ciLogDir := "/tmp/seaweedfs-fuse-dlm-logs" + // One subdirectory per test: a flat layout lets every teardown overwrite + // the previous test's logs, so the CI artifact only ever shows the last + // cluster, never the failing one. + ciLogDir := filepath.Join("/tmp/seaweedfs-fuse-dlm-logs", strings.ReplaceAll(c.t.Name(), "/", "_")) os.MkdirAll(ciLogDir, 0755) logsDir := filepath.Join(c.baseDir, "logs") entries, err := os.ReadDir(logsDir)