diff options
author | Jakob Unterwurzacher | 2025-06-20 20:48:49 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2025-06-20 20:48:49 +0200 |
commit | e6e27c1db0856d162c557e17e0eadff254d84fb8 (patch) | |
tree | 7d25cb8f00e62005ad49106d649421210fd68386 | |
parent | 66bfd4d9fef5df871348964526b64b700ee6a19c (diff) |
testing: reverse: add some verbose logging
-rw-r--r-- | tests/reverse/main_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/reverse/main_test.go b/tests/reverse/main_test.go index 142e3eb..6a3ed9b 100644 --- a/tests/reverse/main_test.go +++ b/tests/reverse/main_test.go @@ -2,7 +2,9 @@ package reverse_test import ( "bytes" + "flag" "fmt" + "log" "os" "testing" @@ -31,6 +33,8 @@ var dirC string func TestMain(m *testing.M) { var r int + flag.Parse() + testcases := []struct { plaintextnames bool deterministic_names bool @@ -42,6 +46,9 @@ func TestMain(m *testing.M) { for i, tc := range testcases { // Fill the global vars plaintextnames, deterministic_names = tc.plaintextnames, tc.deterministic_names + if testing.Verbose() { + log.Printf("TestMain: plaintextnames=%v deterministic_names=%v", plaintextnames, deterministic_names) + } dirA, dirB, _ = newReverseFS(nil) dirC = test_helpers.TmpDir + "/c" @@ -79,5 +86,9 @@ func newReverseFS(extraMountArgs []string) (backingDir, mntDir, ctlsockPath stri mountArgs := []string{"-reverse", "-extpass", "echo test", "-ctlsock", ctlsockPath} mountArgs = append(mountArgs, extraMountArgs...) test_helpers.MountOrExit(backingDir, mntDir, mountArgs...) + + if testing.Verbose() { + log.Printf("newReverseFS: mounted %q on %q", backingDir, mntDir) + } return } |