aboutsummaryrefslogtreecommitdiff
path: root/tests/test_helpers
AgeCommit message (Collapse)Author
2018-04-08Fix the easy golint warningsJakob Unterwurzacher
Reported by https://goreportcard.com/report/github.com/rfjakob/gocryptfs
2018-04-08tests: retry umountJakob Unterwurzacher
Gnome may still have files open causing spurious test failures.
2018-04-07tests: matrix: check for fd leaksJakob Unterwurzacher
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.
2018-04-02fsck: add initial implementationJakob Unterwurzacher
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.
2018-03-24test_helpers: add SwitchTestParentDirJakob Unterwurzacher
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.
2018-03-06tests: drop "-z" from fusermount to catch forgotten fdsJakob Unterwurzacher
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.
2018-03-05test_helpers: add missing newlineJakob Unterwurzacher
2018-02-28test_helpers: use an intermediate pipe for subprocess stdoutJakob Unterwurzacher
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
2017-12-06tets_helpers: handle t=nil in InitFSJakob Unterwurzacher
The reverse tests call InitFS with t=nil. By calling panic we get a better error message instead of a generic nil pointer dereference.
2017-11-29fusefrontend: allow_other: close race between mkdir and chownSebastian Lackner
Fixes the same problem as described in 72b975867a3b9bdf53fc2da62e2ba4a328d7e4ab, except for directories instead of device nodes.
2017-05-07fusefrontend: implement path decryption via ctlsockJakob Unterwurzacher
Closes https://github.com/rfjakob/gocryptfs/issues/84 .
2017-05-07Fix typos found by MisspellJakob Unterwurzacher
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)
2017-02-16tests: get rid of syscall.PathMaxJakob Unterwurzacher
Does not exist on OSX Reported in https://github.com/rfjakob/gocryptfs/issues/15
2017-02-15tests: use fuse-unmount.bashJakob Unterwurzacher
...instead of having separate compatability logic.
2016-11-26tests: don't call t.Fatal in checkExampleFSJakob Unterwurzacher
Calling t.Fatal means that the parent test has no chance to clean up.
2016-11-10tests: allow overriding hardcoded arguments in Mount helperJakob Unterwurzacher
2016-11-10ctlsock: implement EncryptPath for reverse mode, add testsJakob Unterwurzacher
2016-10-08tests: pass "-nosyslog"Jakob Unterwurzacher
We want to see panics and warnings on the console
2016-10-08tests: invert ResetTmpDir argumentJakob Unterwurzacher
As reverse also does not want a diriv file, the "plaintextNames" argument became a misnomer.
2016-10-04lint fixesValient Gough
2016-10-04tests: fallocate: skip some disk usage checks on btrfsJakob Unterwurzacher
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.
2016-09-25tests: smarter error handling in ResetTmpDirJakob Unterwurzacher
Look at the error code from os.Remove and decide about the right thing to do. Gets rid of spurious fusermount error messages.
2016-09-25reverse: add longname benchmarkJakob Unterwurzacher
2016-07-11tests: add verbose output when unmountingJakob Unterwurzacher
2016-07-11tests: use unmount wrapper in ResetTmpDirJakob Unterwurzacher
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
2016-07-04tests: OSX: cast st.Blksize to int64Jakob Unterwurzacher
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
2016-07-02tests: call umount instead of fusermount on OSXJakob Unterwurzacher
Reported at https://github.com/rfjakob/gocryptfs/issues/15
2016-07-02fusefrontend: add fallocate supportJakob Unterwurzacher
Mode=0 (default) and mode=1 (keep size) are supported. The patch includes test cases and the whole thing passed xfstests. Fixes https://github.com/rfjakob/gocryptfs/issues/1 .
2016-06-30test: split up integration_testsJakob Unterwurzacher
...into "matrix" and "normal". Also: * Make running multiple packages in parallel safe, see http://stackoverflow.com/questions/23715302/go-how-to-run-tests-for-multiple-packages * Don't depent on test_helper.TmpDir and friends to have a terminating slash
2016-06-27tests: give "-plaintextnames" its own test packageJakob Unterwurzacher
...and add tests for checking that gocryptfs.diriv does not get created. The main "integration_tests" package has become quite big and convoluted over time. This small separate package should make writing tests for "-plaintextnames" easier. As seen in "fusefrontend: fix PlaintextNames versions of Mkdir, Rmdir", we need more of them.
2016-06-23Drop deprecated "-diriv" optionJakob Unterwurzacher
The DirIV feature flag is already mandatory, dropping the command line option is the final step.
2016-06-19tests: expect mount failure for v0.6 and older example filesystemsJakob Unterwurzacher
2016-06-16tests: exit with correct error code from TestMainJakob Unterwurzacher
extpass_test and example_filesystems_test did it wrong, always returning 0.
2016-06-16tests: add InitFS helperJakob Unterwurzacher
2016-06-07tests: split example_filesystems into its own packageJakob Unterwurzacher
Running these tests from integration_tests' TestMain() was awkward because they were run twice with unchanged settings. integration_tests tests everything with OpenSSL and with native Go crypto, but this does not take affect for the example filesystems. To make this work, test_helpers is also split into its own package.