diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/defaults/ctlsock_test.go | 2 | ||||
-rw-r--r-- | tests/fsck/broken_fs_v1.4/Ef-68icxbQ-TuvmnWHuItB1BeLB92dNCXMXiz2M-zPI | bin | 0 -> 18 bytes | |||
-rw-r--r-- | tests/fsck/broken_fs_v1.4/V5DjvW5BXlGl1yCIJn4lPgdjdMvW_LUfc7G-R8W1cZ0 | bin | 0 -> 8 bytes | |||
-rw-r--r-- | tests/fsck/broken_fs_v1.4/ejZ3FX0zlFTpSfv-FBJ2u3ojwSN1XSqpNpCHxa5VGWw | bin | 0 -> 1 bytes | |||
l--------- | tests/fsck/broken_fs_v1.4/iI0MtUdzELPeOAZYwYZFee169hpGgd3l2PXQBcc9sl4 | 1 | ||||
-rw-r--r-- | tests/fsck/broken_fs_v1.4/trqecbMNXdzLqzpk7fSfKw/gocryptfs.diriv | 1 | ||||
-rw-r--r-- | tests/fsck/broken_fs_v1.4/yrwcjj2qoC4IYvhw9sbfRg/gocryptfs.diriv | 1 | ||||
-rw-r--r-- | tests/fsck/broken_fs_v1.4/yrwcjj2qoC4IYvhw9sbfRg/uC2yqKyQUXSJF-YF1Ya5nQ | 0 | ||||
-rw-r--r-- | tests/fsck/fsck_test.go | 6 | ||||
-rw-r--r-- | tests/reverse/ctlsock_test.go | 5 |
10 files changed, 7 insertions, 9 deletions
diff --git a/tests/defaults/ctlsock_test.go b/tests/defaults/ctlsock_test.go index 13e6912..b987bf6 100644 --- a/tests/defaults/ctlsock_test.go +++ b/tests/defaults/ctlsock_test.go @@ -25,7 +25,7 @@ func TestCtlSock(t *testing.T) { req.EncryptPath = "not-existing-dir/xyz" response = test_helpers.QueryCtlSock(t, sock, req) if response.ErrNo != int32(syscall.ENOENT) || response.Result != "" { - t.Errorf("incorrect error handling: %+v", response) + t.Errorf("incorrect error handling: wanted ErrNo=%d, have %+v", syscall.ENOENT, response) } // Strange paths should not cause a crash crashers := []string{"/foo", "foo/", "/foo/", ".", "/////", "/../../."} diff --git a/tests/fsck/broken_fs_v1.4/Ef-68icxbQ-TuvmnWHuItB1BeLB92dNCXMXiz2M-zPI b/tests/fsck/broken_fs_v1.4/Ef-68icxbQ-TuvmnWHuItB1BeLB92dNCXMXiz2M-zPI Binary files differnew file mode 100644 index 0000000..84b9a70 --- /dev/null +++ b/tests/fsck/broken_fs_v1.4/Ef-68icxbQ-TuvmnWHuItB1BeLB92dNCXMXiz2M-zPI diff --git a/tests/fsck/broken_fs_v1.4/V5DjvW5BXlGl1yCIJn4lPgdjdMvW_LUfc7G-R8W1cZ0 b/tests/fsck/broken_fs_v1.4/V5DjvW5BXlGl1yCIJn4lPgdjdMvW_LUfc7G-R8W1cZ0 Binary files differnew file mode 100644 index 0000000..6101efa --- /dev/null +++ b/tests/fsck/broken_fs_v1.4/V5DjvW5BXlGl1yCIJn4lPgdjdMvW_LUfc7G-R8W1cZ0 diff --git a/tests/fsck/broken_fs_v1.4/ejZ3FX0zlFTpSfv-FBJ2u3ojwSN1XSqpNpCHxa5VGWw b/tests/fsck/broken_fs_v1.4/ejZ3FX0zlFTpSfv-FBJ2u3ojwSN1XSqpNpCHxa5VGWw Binary files differnew file mode 100644 index 0000000..f76dd23 --- /dev/null +++ b/tests/fsck/broken_fs_v1.4/ejZ3FX0zlFTpSfv-FBJ2u3ojwSN1XSqpNpCHxa5VGWw diff --git a/tests/fsck/broken_fs_v1.4/iI0MtUdzELPeOAZYwYZFee169hpGgd3l2PXQBcc9sl4 b/tests/fsck/broken_fs_v1.4/iI0MtUdzELPeOAZYwYZFee169hpGgd3l2PXQBcc9sl4 new file mode 120000 index 0000000..4b707cb --- /dev/null +++ b/tests/fsck/broken_fs_v1.4/iI0MtUdzELPeOAZYwYZFee169hpGgd3l2PXQBcc9sl4 @@ -0,0 +1 @@ +%%%broken_symlink%%%
\ No newline at end of file diff --git a/tests/fsck/broken_fs_v1.4/trqecbMNXdzLqzpk7fSfKw/gocryptfs.diriv b/tests/fsck/broken_fs_v1.4/trqecbMNXdzLqzpk7fSfKw/gocryptfs.diriv new file mode 100644 index 0000000..41f0034 --- /dev/null +++ b/tests/fsck/broken_fs_v1.4/trqecbMNXdzLqzpk7fSfKw/gocryptfs.diriv @@ -0,0 +1 @@ +Wc diff --git a/tests/fsck/broken_fs_v1.4/yrwcjj2qoC4IYvhw9sbfRg/gocryptfs.diriv b/tests/fsck/broken_fs_v1.4/yrwcjj2qoC4IYvhw9sbfRg/gocryptfs.diriv new file mode 100644 index 0000000..29198ce --- /dev/null +++ b/tests/fsck/broken_fs_v1.4/yrwcjj2qoC4IYvhw9sbfRg/gocryptfs.diriv @@ -0,0 +1 @@ +LOã/;pl]Ù×n·ÌÙfooo diff --git a/tests/fsck/broken_fs_v1.4/yrwcjj2qoC4IYvhw9sbfRg/uC2yqKyQUXSJF-YF1Ya5nQ b/tests/fsck/broken_fs_v1.4/yrwcjj2qoC4IYvhw9sbfRg/uC2yqKyQUXSJF-YF1Ya5nQ new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/fsck/broken_fs_v1.4/yrwcjj2qoC4IYvhw9sbfRg/uC2yqKyQUXSJF-YF1Ya5nQ diff --git a/tests/fsck/fsck_test.go b/tests/fsck/fsck_test.go index 7506636..b5bbf84 100644 --- a/tests/fsck/fsck_test.go +++ b/tests/fsck/fsck_test.go @@ -2,7 +2,6 @@ package fsck import ( "os/exec" - "strings" "testing" "github.com/rfjakob/gocryptfs/internal/exitcodes" @@ -18,9 +17,4 @@ func TestBrokenFsV14(t *testing.T) { if code != exitcodes.FsckErrors { t.Errorf("wrong exit code, have=%d want=%d", code, exitcodes.FsckErrors) } - lines := strings.Split(out, "\n") - summaryLine := lines[len(lines)-2] - if summaryLine != "fsck: found 5 problems" { - t.Errorf("wrong summary line: %q", summaryLine) - } } diff --git a/tests/reverse/ctlsock_test.go b/tests/reverse/ctlsock_test.go index d60fbde..6ccc724 100644 --- a/tests/reverse/ctlsock_test.go +++ b/tests/reverse/ctlsock_test.go @@ -2,6 +2,7 @@ package reverse_test import ( "io/ioutil" + "syscall" "testing" "github.com/rfjakob/gocryptfs/internal/ctlsock" @@ -58,12 +59,12 @@ func TestCtlSockPathOps(t *testing.T) { // Check that we do not mix up information for different directories. req = ctlsock.RequestStruct{DecryptPath: "gocryptfs.longname.y6rxCn6Id8hIZL2t_STpdLZpu-aE2HpprJR25xD60mk="} response = test_helpers.QueryCtlSock(t, sock, req) - if response.ErrNo != -1 { + if response.ErrNo != int32(syscall.ENOENT) { t.Errorf("File should not exist: ErrNo=%d ErrText=%s", response.ErrNo, response.ErrText) } req = ctlsock.RequestStruct{DecryptPath: "v6puXntoQOk7Mhl8zJ4Idg==/gocryptfs.longname.ZQCAoi5li3xvDZRO8McBV0L_kzJc4IcAOEzuW-2S1Y4="} response = test_helpers.QueryCtlSock(t, sock, req) - if response.ErrNo != -1 { + if response.ErrNo != int32(syscall.ENOENT) { t.Errorf("File should not exist: ErrNo=%d ErrText=%s", response.ErrNo, response.ErrText) } } |