summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJakob Unterwurzacher2020-08-15 17:31:25 +0200
committerJakob Unterwurzacher2020-08-15 17:31:45 +0200
commit94e8fc12ea5756a130e7ac9ed67ddd519b5f3a22 (patch)
tree44186807f71db8c555af23f8969f8f1456c955f9 /tests
parent15b0b4a5fd268b421ddc347e4417b2538a540922 (diff)
v2api/reverse: finish -exclude
Tests pass now.
Diffstat (limited to 'tests')
-rw-r--r--tests/reverse/correctness_test.go2
-rw-r--r--tests/reverse/exclude_test.go2
-rw-r--r--tests/reverse/inomap_test.go4
3 files changed, 5 insertions, 3 deletions
diff --git a/tests/reverse/correctness_test.go b/tests/reverse/correctness_test.go
index 47b8b73..6b7ed5f 100644
--- a/tests/reverse/correctness_test.go
+++ b/tests/reverse/correctness_test.go
@@ -87,7 +87,7 @@ func TestSymlinkDentrySize(t *testing.T) {
fi, err := os.Lstat(mnt + "/" + symlinkResponse.Result)
if err != nil {
- t.Errorf("Lstat: %v", err)
+ t.Fatalf("Lstat: %v", err)
}
target, err := os.Readlink(mnt + "/" + symlinkResponse.Result)
diff --git a/tests/reverse/exclude_test.go b/tests/reverse/exclude_test.go
index b5d0f5b..c493d95 100644
--- a/tests/reverse/exclude_test.go
+++ b/tests/reverse/exclude_test.go
@@ -118,6 +118,7 @@ func testExclude(t *testing.T, flag string) {
cExclude := encryptExcludeTestPaths(t, sock, pExclude)
// Check that "excluded" paths are not there and "ok" paths are there
for _, v := range cExclude {
+ t.Logf("File %q should be invisible", v)
if test_helpers.VerifyExistence(t, mnt+"/"+v) {
t.Errorf("File %q is visible, but should be excluded", v)
}
@@ -126,6 +127,7 @@ func testExclude(t *testing.T, flag string) {
}
}
for _, v := range cOk {
+ t.Logf("File %q should be visible", v)
if !test_helpers.VerifyExistence(t, mnt+"/"+v) {
t.Errorf("File %q is hidden, but should be visible", v)
}
diff --git a/tests/reverse/inomap_test.go b/tests/reverse/inomap_test.go
index 5f7fb45..e6fc525 100644
--- a/tests/reverse/inomap_test.go
+++ b/tests/reverse/inomap_test.go
@@ -45,7 +45,7 @@ func findIno(dir string, ino uint64) string {
// ├── gocryptfs.longname.e31v1ax4h_F0l4jhlN8kCjaWWMq8rO9VVBZ15IYsV50 <---- child
// └── gocryptfs.longname.e31v1ax4h_F0l4jhlN8kCjaWWMq8rO9VVBZ15IYsV50.name <---- name
//
-// And verifies that the inode numbers match what we expect.
+// It verifies that the inode numbers match what we expect.
func TestVirtualFileIno(t *testing.T) {
if plaintextnames {
t.Skip("plaintextnames mode does not have virtual files")
@@ -111,7 +111,7 @@ func TestVirtualFileIno(t *testing.T) {
var st2 syscall.Stat_t
err = syscall.Lstat(encryptedParent+"/"+entry, &st2)
if err != nil {
- t.Logf("stat %q: %v", entry, err)
+ t.Errorf("stat %q: %v", entry, err)
continue
}
if entry == "gocryptfs.diriv" {