Age | Commit message (Collapse) | Author |
|
ext4 reuses inode numbers, tmpfs does not.
|
|
Instead bubble up the error to the testing object.
|
|
|
|
The -0 flags works like xargs -0.
|
|
|
|
The former interal ctlsock server package is renamed
to ctlsocksrv.
|
|
We did not use t.Name() as it was not available
before Go 1.8. Now the oldest Go version we support is
Go 1.11, so we can use it.
|
|
Check Stat() vs Fstat() result. Not very useful
at the moment as the kernel never seems to call Fstat().
|
|
On Fedora, /tmp is tmpfs, which behaves differently than ext4
(inode numbers are never reused, for example).
Use /var/tmp, which is ext4 on Fedora, to get a more realistic
test environment.
This also allows us to drop the xattr workaround.
|
|
The parent directories need execute all permissions.
|
|
When we run tests as root, they will leave root-owned files
in testParentDir, which causes trouble when we run tests as
a normal user later on. Split by UID.
|
|
It's confusing that you must pass "-extpass" for Mount but not
for InitFS. Note that in the comment.
|
|
Regression test for https://github.com/rfjakob/gocryptfs/issues/354
|
|
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.
|
|
Un-spaghettify the function and let the callers open
the directory.
|
|
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
|