summaryrefslogtreecommitdiff
path: root/tests/cli
diff options
context:
space:
mode:
authorJakob Unterwurzacher2021-08-16 17:15:07 +0200
committerJakob Unterwurzacher2021-08-16 17:15:07 +0200
commitad4b99170b9ad438909f5cba8c32109a18697a7a (patch)
tree48651be848bd65b6b4a86f26da4126bce383ae61 /tests/cli
parent763499ee80f5acb7ab1db70d86c65485bebb115e (diff)
tests/cli: escape filenames in TestBadname logs
I just got this message (not reproducible) with unescaped binary garbage. UnmountErr: "/var/tmp/gocryptfs-test-parent-1026/114471933/TestMountBackground.899727687.mnt" was not found in MountInfo, cannot check for FD leaks UnmountErr: "/var/tmp/gocryptfs-test-parent-1026/114471933/TestConfigPipe.212912444.mnt" was not found in MountInfo, cannot check for FD leaks DecryptName "mzaZRF9_0IU-_5vv2wPC_i": unPad16 error: Padding too long, padLen=49 > 16 OpenDir ".": invalid entry "KqQ346cuOAFHv_qSta5PhAwrongPattern": bad message DecryptName "mzaZRF9_0IU-_5vv2wP_in": unPad16 error: Padding byte at i=10 is invalid --- FAIL: TestBadname (0.11s) cli_test.go:885: Case 5 failed: 'KqQ346cuOAFHv_qSta5P_invalid_file GOCRYPTFS_BAD_NAME' in [file_invalid_file GOCRYPTFS_BAD_NAME,file,mzaZRF9_0IU-_5vv2wPC_invalid_file GOCRYPTFS_BAD_NAME,file GOCRYPTFS_BAD_NAME,�*A���y���Gfnvalid_file GOCRYPTFS_BAD_NAME,mzaZRF9_0IU-_5vv2wP_invalid_file GOCRYPTFS_BAD_NAME] Invalid cipherdir: directory /var/tmp/gocryptfs-test-parent-1026/114471933/TestInitNotEmpty not empty FAIL FAIL github.com/rfjakob/gocryptfs/tests/cli 4.817s
Diffstat (limited to 'tests/cli')
-rw-r--r--tests/cli/cli_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/cli/cli_test.go b/tests/cli/cli_test.go
index 33c9e7b..8728622 100644
--- a/tests/cli/cli_test.go
+++ b/tests/cli/cli_test.go
@@ -882,7 +882,7 @@ func TestBadname(t *testing.T) {
for i := 0; i < len(results); i++ {
if !results[i] {
- t.Errorf("Case %d failed: '%s' in [%s]", i+1, searchstrings[i], strings.Join(names, ","))
+ t.Errorf("Case %d failed: %q in [%q]", i+1, searchstrings[i], strings.Join(names, ","))
}
}
}