Age | Commit message (Collapse) | Author |
|
Regression test for https://github.com/rfjakob/gocryptfs/issues/354
|
|
This avoids sporadic test failures on macOS.
|
|
This should get rid of
Openat: O_NOFOLLOW missing: flags = 0x0
Fchmodat: adding missing AT_SYMLINK_NOFOLLOW flag
sys_common_test.go:203: chmod on symlink should have failed, but did not. New mode=0333
UnmountErr: "[...]/057376762.mnt" was not found in MountInfo, cannot check for FD leak
and add some context to
--- FAIL: TestUtimesNano (0.00s)
matrix_test.go:628: no such file or directory
See https://github.com/rfjakob/gocryptfs/pull/343#issuecomment-453888006
for full test output
|
|
|
|
As the dirCache now has 3 entries, the tests should accept
up to 3 extra fds without declaring an fd leak.
|
|
VerifyExistence missed unstat()able files in the directory listing
because ioutil.ReadDir() filtered them out.
https://github.com/rfjakob/gocryptfs/issues/285
|
|
When O_PATH is specified in flags, flag bits other than O_CLOEXEC, O_DIRECTORY,
and O_NOFOLLOW are ignored.
|
|
The gocryptfs process may keep one fd open for up to one second
in the dirCache.
|
|
Un-spaghettify the function and let the callers open
the directory.
|
|
Hopefully gets rid of the false positives on travis.
|
|
Give the gocryptfs process one extra millisecond to close
files. Allows us to drop several other sleeps.
UnmountErr now really returns an error when it detects an fd leak
instead of just printing a message.
|
|
These are created on demand by the Go runtime and are usually
not interesting.
|
|
Tests outside the test_helpers package may want to look
at this.
|
|
Also, drop entries that disappear while we stat them.
|
|
With the FD leak logic, the mount/unmount functions have
become complex enough to give them their own file.
|
|
For now, this only prints a message but does not fail the tests.
|
|
|
|
This will allow to tests to monitor fd usage and maybe other things.
|
|
Setting TMPDIR now allows to run the tests against
a directory of your choice, making it easier to test
different filesystems.
|
|
Directly use int file descriptors for the dirfd
and get rid of one level of indirection.
|
|
In the past we did not check whether all methods of checking
the file return the same result. We should.
|
|
When mounted via /etc/fstab like this,
/a /b fuse.gocryptfs default 0 0
we always get extra options passed. As reported by @mahkoh
at https://github.com/rfjakob/gocryptfs/pull/233 :
mount passes `-o noexec` if `-o user` is set and `-o exec` is not set.
If both `-o user` and `-o exec` are set, it passes `-o exec`.
Make these options work, and in addtion, also make -suid and -rw
work the same way.
Reported-by: @mahkoh
|
|
These were using stale err values.
|
|
Reported by https://goreportcard.com/report/github.com/rfjakob/gocryptfs
|
|
Gnome may still have files open causing spurious test
failures.
|
|
And fix two in test_helpers.Mount().
Leftover fds can cause an unmount failure like this later:
fusermount: failed to unmount /tmp/gocryptfs-test-parent/873632270/default-plain: Device or resource busy
so try to catch them early.
|
|
Most corruption cases except xattr should be covered.
With test filesystem.
The output is still pretty ugly. xattr support will
be added in the next commits.
|
|
SwitchTestParentDir changes testParentDir. This is used when you want
to perform tests on a special filesystem. For example, the xattr tests
cannot run on tmpfs and use /var/tmp instead of /tmp.
|
|
macos does not have lazy unmount, so let's not use it
on linux either.
If the unmount fails, run "lsof" to find the open file.
Also fix the first bug we found this way.
|
|
|
|
To Go test logic waits for stderr and stdout to close, so
when we share it with a subprocess, it will wait for it to
exit as well.
We don't want the tests to hang when the unmount fails.
Seen on MacOS as reported at
https://github.com/rfjakob/gocryptfs/issues/213
|
|
The reverse tests call InitFS with t=nil. By
calling panic we get a better error message instead
of a generic nil pointer dereference.
|
|
Fixes the same problem as described in 72b975867a3b9bdf53fc2da62e2ba4a328d7e4ab,
except for directories instead of device nodes.
|
|
Closes https://github.com/rfjakob/gocryptfs/issues/84 .
|
|
Misspell Finds commonly misspelled English words
gocryptfs/internal/configfile/scrypt.go
Line 41: warning: "paramter" is a misspelling of "parameter" (misspell)
gocryptfs/internal/ctlsock/ctlsock_serve.go
Line 1: warning: "implementes" is a misspelling of "implements" (misspell)
gocryptfs/tests/test_helpers/helpers.go
Line 27: warning: "compatability" is a misspelling of "compatibility" (misspell)
|
|
Does not exist on OSX
Reported in https://github.com/rfjakob/gocryptfs/issues/15
|
|
...instead of having separate compatability logic.
|
|
Calling t.Fatal means that the parent test has no chance
to clean up.
|
|
|
|
|
|
We want to see panics and warnings on the console
|
|
As reverse also does not want a diriv file, the "plaintextNames"
argument became a misnomer.
|
|
|
|
The expected allocated sizes are verified for tmpfs and ext4.
btrfs gives different results, but that's not an error.
Also, simplify test_helpers.Du and several code paths.
Fixes #43.
|
|
Look at the error code from os.Remove and decide about the
right thing to do.
Gets rid of spurious fusermount error messages.
|
|
|
|
|
|
This should make it work on OSX.
Also, split unmount into two functions. Depending on what you
want,
* UnmountErr returns the resulting error
* UnmountPanic panics if the error was not nil
|
|
On Linux, Blksize is already int64. But on OSX
it is int32 and that caused a compile failure.
https://github.com/rfjakob/gocryptfs/issues/15
|
|
Reported at https://github.com/rfjakob/gocryptfs/issues/15
|