aboutsummaryrefslogtreecommitdiff
path: root/tests/test_helpers
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_helpers')
-rw-r--r--tests/test_helpers/helpers.go2
-rw-r--r--tests/test_helpers/mount_unmount.go6
2 files changed, 7 insertions, 1 deletions
diff --git a/tests/test_helpers/helpers.go b/tests/test_helpers/helpers.go
index c8cd151..fd2ea9c 100644
--- a/tests/test_helpers/helpers.go
+++ b/tests/test_helpers/helpers.go
@@ -9,6 +9,7 @@ import (
"os"
"os/exec"
"path/filepath"
+ "strings"
"syscall"
"testing"
@@ -146,6 +147,7 @@ func InitFS(t *testing.T, extraArgs ...string) string {
prefix := "x."
if t != nil {
prefix = t.Name() + "."
+ prefix = strings.ReplaceAll(prefix, "/", "_")
}
dir, err := os.MkdirTemp(TmpDir, prefix)
if err != nil {
diff --git a/tests/test_helpers/mount_unmount.go b/tests/test_helpers/mount_unmount.go
index 4abc432..3927dd5 100644
--- a/tests/test_helpers/mount_unmount.go
+++ b/tests/test_helpers/mount_unmount.go
@@ -35,7 +35,11 @@ type mountInfo struct {
// Contrary to InitFS(), you MUST passt "-extpass=echo test" (or another way for
// getting the master key) explicitly.
func Mount(c string, p string, showOutput bool, extraArgs ...string) error {
- args := []string{"-q", "-wpanic", "-nosyslog", "-fg", fmt.Sprintf("-notifypid=%d", os.Getpid())}
+ args := []string{"-q", "-nosyslog", "-fg", fmt.Sprintf("-notifypid=%d", os.Getpid())}
+ // We are warning-free on Linux, but not (yet) on other OS's
+ if runtime.GOOS == "linux" {
+ args = append(args, "-wpanic")
+ }
args = append(args, extraArgs...)
if _, isset := os.LookupEnv("FUSEDEBUG"); isset {
fmt.Println("FUSEDEBUG is set, enabling -fusedebug")