aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2017-05-28tests: add v1.3-reverse example filesystemJakob Unterwurzacher
We check the md5 sum of the encrypted version of a file to make sure we don't accidentially change the ciphertext generation.
2017-05-14main: password change: exit with code 12 on wrong passwordJakob Unterwurzacher
We used to return code 8, now we return code 12 as documented in the man page. Also adds a test.
2017-05-07exitcodes: pull all exit code definitions into the packageJakob Unterwurzacher
This commit defines all exit codes in one place in the exitcodes package. Also, it adds a test to verify the exit code on incorrect password, which is what SiriKali cares about the most. Fixes https://github.com/rfjakob/gocryptfs/issues/77 .
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-05-01tests: support encfs in the fsstress scriptJakob Unterwurzacher
May be helpful for https://github.com/vgough/encfs/issues/214 .
2017-05-01tests: add TestXfs124Jakob Unterwurzacher
This test reproduces the problem xfstests generic/124 uncovered. The warning itself is harmless, but we should either (1) add locking so that this cannot happen anymore or (2) drop the warning. Currently fails: $ go test -v === RUN Test1980Tar --- PASS: Test1980Tar (0.00s) === RUN TestCtlSock --- PASS: TestCtlSock (0.10s) === RUN TestOpenTruncateRead --- PASS: TestOpenTruncateRead (0.00s) === RUN TestWORead --- PASS: TestWORead (0.00s) === RUN TestXfs124 cipherSize 18 == header size: interrupted write? -wpanic turns this warning into a panic: cipherSize 18 == header size: interrupted write?
2017-05-01fusefrontend: drop writeOnly flagJakob Unterwurzacher
We do not have to track the writeOnly status because the kernel will not forward read requests on a write-only FD to us anyway. I have verified this behavoir manually on a 4.10.8 kernel and also added a testcase.
2017-03-18tests: add hkdf_sanity tests with broken example filesystemv1.3-beta1Jakob Unterwurzacher
These are deliberately corrupt.
2017-03-18benchmark: add md5sum read performance benchmarkJakob Unterwurzacher
2017-03-07cli: enable "-raw64" by defaultJakob Unterwurzacher
This brings the CLI options back in sync with the default feature flags.
2017-03-07tests: recreate v1.3 example filesystemJakob Unterwurzacher
The filesystem was created with a gocryptfs version that ignored the HKDF flag (hence everything was actually encrypted WITHOUT hkdf). Fix it by recreating it.
2017-03-07cli: add "-hkdf" optionJakob Unterwurzacher
This commit also enables actually passing the HKDF setting to fusefrontend, this was missing till now.
2017-03-07tests: reverse: don't run tests that ignore "-plaintextnames" twiceJakob Unterwurzacher
TestMain() runs all tests twice, once with plaintextnames=true and once with false. Several tests mount their own filesystem and ignore the plaintextnames variable. It makes no sense to run them twice, so skip execution when plaintextnames is set.
2017-03-07Report correct symbolic link dentry sizesM. Vefa Bicakci
Prior to this commit, gocryptfs's reverse mode did not report correct directory entry sizes for symbolic links, where the dentry size needs to be the same as the length of a string containing the target path. This commit corrects this issue and adds a test case to verify the correctness of the implementation. This issue was discovered during the use of a strict file copying program on a reverse-mounted gocryptfs file system.
2017-03-05tests: add v1.3 example filesystemJakob Unterwurzacher
This filesystem has both HKDF and Raw64 enabled.
2017-03-05Drop Go 1.4 compatability code everywhereJakob Unterwurzacher
Yields a nice reduction in code size.
2017-03-05tests: stop calling t.Fatal from example_test_helpersJakob Unterwurzacher
Calling t.Fatal immeadiately aborts the test, which means the filesystem will not get unmounted, which means test.bash will hang.
2017-02-26tests: somewhat support testing without opensslJakob Unterwurzacher
You will still get lots of test error, but at least the tests will run.
2017-02-20tests: adapt dir overwrite test for Go 1.8Jakob Unterwurzacher
In Go 1.8, os.Rename refuses to overwrite an empty directory. Switch to syscall.Rename, which still does the right thing.
2017-02-20Get rid of remaining $GOPATH dependenciesJakob Unterwurzacher
2017-02-16tests: reverse: check Access() callJakob Unterwurzacher
2017-02-16tests: OSX compat: wrap Stat_t atime extractJakob Unterwurzacher
Linux has st.Atim, st.Mtim, OSX hat st.Atimespec, st.Mtimespec. Reported at https://github.com/rfjakob/gocryptfs/issues/15#issuecomment-279130217
2017-02-16tests: OSX compat: use OSX-style "stat -f"Jakob Unterwurzacher
Reported at https://github.com/rfjakob/gocryptfs/issues/15#issuecomment-279130217
2017-02-16benchmarks: OSX compat: replace /usr/bin/time with bash builtinJakob Unterwurzacher
On OSX, /usr/bin/time does not support "-f". Reported in https://github.com/rfjakob/gocryptfs/issues/15#issuecomment-279130217 .
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.
2017-02-15OSX compat: replace fusermount calls with fuse-unmount.bashJakob Unterwurzacher
Mac OS X does not have fusermount and uses umount instead. The fuse-unmount.bash calls the appropriate command.
2017-02-12Check for trailing garbage after the passwordJakob Unterwurzacher
From the comment: // CheckTrailingGarbage tries to read one byte from stdin and exits with a // fatal error if the read returns any data. // This is meant to be called after reading the password, when there is no more // data expected. This helps to catch problems with third-party tools that // interface with gocryptfs.
2017-02-12tests: ctlsock: check warning for non-canonical pathsJakob Unterwurzacher
2017-01-26tests: add TestLongLink (currently broken)Jakob Unterwurzacher
2017-01-03tests: only check the size in dl-linux-tarball.bashJakob Unterwurzacher
Getting rid of the MD5 calculation makes calling the script virtually free, where it took 0.2 seconds before.
2017-01-03tests: factor out dl-linux-tarball.bashJakob Unterwurzacher
This will be also used by the reverse benchmarks.
2016-12-13benchmark.bash: OSX dd does not support "K" postfixJakob Unterwurzacher
2016-12-10ctlsock: sanitize paths before passing them to the backendJakob Unterwurzacher
You used to be able to crash gocryptfs by passing "/foo" of "foo/" to the ctlsock. Fixes https://github.com/rfjakob/gocryptfs/issues/66
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-26benchmark.bash: double write lengthJakob Unterwurzacher
Writing 1000 128KB blocks takes only 1 second and yielded inconsistent results. With 2000, things look saner.
2016-11-17tests: rename fsstress-loopback.bash to fsstress-gocryptfs.bashJakob Unterwurzacher
The primary use is testing gocryptfs, after all.
2016-11-17tests: add OpenTruncateRead testJakob Unterwurzacher
This is a regression test for the issue that was fixed by the last commit.
2016-11-10ctlsock: prevent panic on invalid decrypt requestJakob Unterwurzacher
2016-11-10tests: allow overriding hardcoded arguments in Mount helperJakob Unterwurzacher
2016-11-10ctlsock: implement EncryptPath for reverse mode, add testsJakob Unterwurzacher
2016-11-10ctlsock: add initial limited implementationJakob Unterwurzacher
At the moment, in forward mode you can only encrypt paths and in reverse mode you can only decrypt paths.
2016-11-01Add Go 1.4 compatibility layer for raw64Jakob Unterwurzacher
Using raw64 will not work, but at least it will compile.
2016-11-01tests: add raw64 testsJakob Unterwurzacher
Also, use "%#v" instead of JSON for debug output. This means we can unexport all fields.
2016-10-30fusefrontend: drop atime workaroundsJakob Unterwurzacher
The fix at https://github.com/hanwen/go-fuse/pull/131 has been merged. Drop the workarounds and re-enable the tests.
2016-10-25tests: fetch the example tarball from cdn.kernel.orgJakob Unterwurzacher
www.kernel.org is painfully slow at times.
2016-10-24Fix misspellingsJakob Unterwurzacher
Close https://github.com/rfjakob/gocryptfs/issues/54
2016-10-19tests: add example tarJakob Unterwurzacher
2016-10-19tests: fix forgotten variable renameJakob Unterwurzacher