aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2021-03-20tests: MountOrFatal creates mnt dir itselfJakob Unterwurzacher
Allows to drop a few Mkdir()s.
2021-03-12tests: add TestDiskFullJakob Unterwurzacher
Also fix incomplete uid restoration in TestSupplementaryGroups and replace syscall.Setregid and friends with unix.Setregid and friends. This test is added to check if have problems handling a full disk. The ticket https://github.com/rfjakob/gocryptfs/issues/550 states that the full disk was not where the backing gocryptfs filesystem was, but this has no effect on gocryptfs, so we test the harder case.
2021-03-07v2api: -sharestorage: disable hard link tracking & add testsJakob Unterwurzacher
Hard link tracking was not correctly disabled since the migration to the go-fuse v2 api. Add a test to ensure it stays off. Fixes https://github.com/rfjakob/gocryptfs/issues/525
2021-02-07fusefrontend: do not encrypt ACLsJakob Unterwurzacher
Pass through system.posix_acl_access and system.posix_acl_default unencrypted to fix "cp -a" problems. "cp -a" uses "setxattr" even to set normal permissions, see https://www.spinics.net/lists/linux-nfs/msg63986.html . Fixes https://github.com/rfjakob/gocryptfs/issues/543
2021-02-07tests/xattr: fix acl blobJakob Unterwurzacher
The blob was truncated to 31 bytes.
2021-01-10nametransform: make `gocryptfs.diriv` and `gocryptfs.xxx.name` files ↵Jakob Unterwurzacher
world-readable Make `gocryptfs.diriv` and `gocryptfs.xxx.name` files world-readable to make encrypted backups easier when mounting via fstab. Having the files follow chmod/chown of their parent does not seem to be worth the hassle. The content of the diriv files is not secret, and both diriv and name files are protected by the perms of the parent dir. Fixes https://github.com/rfjakob/gocryptfs/issues/539
2020-10-04tests: fsstress-gocryptfs.bash: log timestamp for each iterationJakob Unterwurzacher
2020-10-04tests: fsstress-gocryptfs.bash: add DEBUG optionJakob Unterwurzacher
Also add a wrapper script, fsstress.collect-crashes.sh, to collect the debug output. https://github.com/hanwen/go-fuse/issues/372
2020-10-03fsstress-gocryptfs.bash: don't hang if TMPDIR ends in /Jakob Unterwurzacher
We would hang like this ./fsstress-loopback.bash Recompile go-fuse loopback: v2.0.3-7-g0b6cbc5 Waiting for mount: xxxxxxxx^C if TMPDIR has a trailing /. The reason is that the paths in /proc/self/mounts are normalized, while TMPDIR may not be.
2020-09-18fsstress-gocryptfs.bash: print loopback version & mount pathJakob Unterwurzacher
To make the used go-fuse version clear in logs, print it on startup, similar to what we do with gocryptfs.
2020-09-13stress_tests/fsstress-gocryptfs.bash: use rm -Rf for cleanupJakob Unterwurzacher
Apparently, kernel 5.8 now allows unprivileged "mknod /tmp/x c 0 0": vfs: allow unprivileged whiteout creation https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.8.9&id=a3c751a50fe6bbe50eb7622a14b18b361804ee0c which is why rm throws a new prompt: rm: remove write-protected character special file '...'? Use rm -Rf to suppress that.
2020-09-12tests/plaintextnames: add TestInoReuseEvilJakob Unterwurzacher
2020-09-09tests: add TestInoReuseJakob Unterwurzacher
2020-09-09test_helpers: print warning when not running on ext4Jakob Unterwurzacher
ext4 reuses inode numbers, tmpfs does not.
2020-09-09test_helpers: mark MountOrFatal as a Helper()Jakob Unterwurzacher
2020-09-06gocryptfs -init: fix wrong exit code on non-empty dirJakob Unterwurzacher
Fixes https://github.com/rfjakob/gocryptfs/pull/503
2020-08-30tests/reverse: implement (skipped) xattr testJakob Unterwurzacher
v1api reverse mode did not have xattr support, the v2api version may have at some point. Prep the test already.
2020-08-16v2api/reverse: implement LseekJakob Unterwurzacher
2020-08-16v2api/reverse: implement StatfsJakob Unterwurzacher
2020-08-15v2api/reverse: finish -excludeJakob Unterwurzacher
Tests pass now.
2020-08-15test_helper: VerifyExistence: don't panicJakob Unterwurzacher
Instead bubble up the error to the testing object.
2020-07-26stress_tests: run pingpong.bash at nice level 19Jakob Unterwurzacher
Like extractloop.bash.
2020-07-26v2api: fix missing size translation in LookupJakob Unterwurzacher
2020-07-23v2api: implement LseekJakob Unterwurzacher
This also fixes the last remaining tests/fsck failure.
2020-07-19v2api: fsck: use a temporary mountJakob Unterwurzacher
Directly accessing the Nodes does not work properly, as there is no way to attach a newly LOOKUPped Node to the tree. This means Path() does not work. Use an actual mount instead and walk the tree.
2020-07-12tests: TestMagicNames: add warmup roundsJakob Unterwurzacher
Chasing a bug that seems to have nothing to do with magic names, as it already triggers during warmup: --- FAIL: TestMagicNames (0.00s) matrix_test.go:773: Testing n="warmup1" matrix_test.go:773: Testing n="warmup2" matrix_test.go:820: no such file or directory
2020-07-12v2api: Getattr: use file handle if passedJakob Unterwurzacher
2020-07-12tests: fix TestCpWarnings comment typoJakob Unterwurzacher
2020-07-12tests: don't crash on empty Flistxattr resultJakob Unterwurzacher
2020-07-12v2api: fix Mkdir crash when using plaintextnamesJakob Unterwurzacher
2020-06-06tests: TestBadname: simplify test by using empty filesJakob Unterwurzacher
Simplify the tests by using empty files. Empty files are valid, and we don't check the content anyway. Also adjust comment style a little and add a missing break statement.
2020-06-06Added auto decryption of invalid file namesDerDonut
Changed invalid file decoding and decryption. Function DecryptName now shortens the filename until the filename is decodable and decryptable. Will work with valid **and** invalid Base64URL delimiter (valid delimiter [0-9a-zA-z_\\-]. If the filename is not decryptable at all, it returns the original cipher name with flag suffix Changed cli tests to generate decryptable and undecryptable file names with correct encrypted content. Replacing #474, extends #393
2020-06-06sshfs-benchmark.bash: fix locale trouble and move to testsJakob Unterwurzacher
Locale trouble was sshfs-benchmark.bash: line 31: printf: 4.71: invalid number because printf expected "4,71" in the German locale. Force the C locale.
2020-05-17dircache: increase cache size & lifetimeJakob Unterwurzacher
Looking at the dircache debug output, we see that a "git status" workload has a very bad cache hit rate because the entries expire or get evicted before they can be reused. Increase both cache size and lifetime for a 4x speedup: Before: 75s After: 17s https://github.com/rfjakob/gocryptfs/issues/410
2020-05-17main: accept multiple -passfile optionsJakob Unterwurzacher
Each file will be read and then concatenated for the effictive password. This can be used as a kind of multi-factor authenticiton. Fixes https://github.com/rfjakob/gocryptfs/issues/288
2020-05-10Fix spelling mistakes found by misspellJakob Unterwurzacher
https://github.com/client9/misspell
2020-05-10gocryptfs-xray: add -0 flag, add testsJakob Unterwurzacher
The -0 flags works like xargs -0.
2020-05-09test_helpers: use new ctlsock.CtlSock APIJakob Unterwurzacher
2020-05-09test_helper: kill lsof after 1 secondJakob Unterwurzacher
lsof may get stuck when gocryptfs itself is stuck.
2020-05-09ctlsock: create exported ctlsock client libraryJakob Unterwurzacher
The former interal ctlsock server package is renamed to ctlsocksrv.
2020-05-09tests: add TestPasswdMasterkeyStdinJakob Unterwurzacher
Tests that `gocryptfs -passwd -masterkey=stdin` works. This was fixed by ff04b1d83ab1201. Fixes https://github.com/rfjakob/gocryptfs/issues/461
2020-05-09tests: use t.Name()Jakob Unterwurzacher
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.
2020-05-09tests: cli: rename TestBypass -> TestBadnameJakob Unterwurzacher
The command line option is now called `-badname`, so adjust the test name to match.
2020-05-03fusefrontend_reverse: use inomap for inode number translationJakob Unterwurzacher
Gets rid of static inode number value limitations. Fixes https://github.com/rfjakob/gocryptfs/issues/457
2020-05-03tests: reverse: add inode mapping test (TestVirtualFileIno)Jakob Unterwurzacher
Verify that virtual files get assigned inode numbers we expect.
2020-02-29tests: test xattr aclsJakob Unterwurzacher
Fixes https://github.com/rfjakob/gocryptfs/issues/453
2020-02-28Show undecryptable filenames if they match supplied globorcas
Resolves https://github.com/rfjakob/gocryptfs/issues/393
2020-02-15tests: randomize data in testWriteNJakob Unterwurzacher
Just writing zeros carries the risk of not detecting wrongly created file holes. Write random data instead.
2020-01-25tests: cli: add TestSymlinkedCipherdirJakob Unterwurzacher
https://github.com/rfjakob/gocryptfs/issues/450
2019-12-28remove Trezor supportPavol Rusnak