aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2025-08-03loadgithub_macosJakob Unterwurzacher
2025-08-03test_helpers: send SIGQUIT on mount timeoutJakob Unterwurzacher
2025-08-03tests: matrix: add TestDirSizeJakob Unterwurzacher
Fails at the moment, as expected: === RUN TestDirSize matrix_test.go:938: stat size is different from fstat size: pStat=80 pFstat=30 matrix_test.go:941: fstat size is different: pSt=30 cSt=80 matrix_test.go:938: stat size is different from fstat size: pStat=100 pFstat=50 matrix_test.go:941: fstat size is different: pSt=50 cSt=100 matrix_test.go:938: stat size is different from fstat size: pStat=120 pFstat=70 matrix_test.go:941: fstat size is different: pSt=70 cSt=120 matrix_test.go:938: stat size is different from fstat size: pStat=140 pFstat=90 matrix_test.go:941: fstat size is different: pSt=90 cSt=140 matrix_test.go:938: stat size is different from fstat size: pStat=160 pFstat=110 matrix_test.go:941: fstat size is different: pSt=110 cSt=160 https://github.com/rfjakob/gocryptfs/issues/951
2025-08-03tests: matrix: enable ctlsockJakob Unterwurzacher
2025-08-03tests: matrix: make "matrix" localJakob Unterwurzacher
2025-08-03tests: matrix: factor out MainTestJakob Unterwurzacher
2025-08-03tests: overlayfs_test: fix typo in commentJakob Unterwurzacher
2025-08-03tests: root_test: move btrfs test to new fileJakob Unterwurzacher
2025-07-14tests: TestBtrfsQuirks: skip if mkfs.btrfs is not installedJakob Unterwurzacher
Fixes https://github.com/rfjakob/gocryptfs/issues/930
2025-07-08Fix all staticcheck errors in gocryptfs codebasecopilot-swe-agent[bot]
Co-authored-by: rfjakob <286847+rfjakob@users.noreply.github.com> Add staticcheck to test.bash for continuous static analysis Co-authored-by: rfjakob <286847+rfjakob@users.noreply.github.com> Fix nil pointer dereference in timesToTimespec function The previous fix for deprecated fuse.UtimeToTimespec caused a panic because unix.TimeToTimespec doesn't handle nil pointers. This fix properly handles nil pointers by using unix.UTIME_OMIT while still using the non-deprecated unix.TimeToTimespec function. Co-authored-by: rfjakob <286847+rfjakob@users.noreply.github.com> Undo SA6002 changes and add staticcheck ignore directive instead Co-authored-by: rfjakob <286847+rfjakob@users.noreply.github.com>
2025-07-07Fix a bunch of staticcheck errorsJakob Unterwurzacher
Tool-assisted.
2025-06-20tests: reverse: delete static directory treeJakob Unterwurzacher
2025-06-20tests: reverse: generate directory tree for exlucude tests dynamicallyJakob Unterwurzacher
2025-06-20testing: reverse: add some verbose loggingJakob Unterwurzacher
2025-06-19testing: reverse: factor out newReverseFSJakob Unterwurzacher
Will be used soon in a new gitignore test. Relates-to: https://github.com/rfjakob/gocryptfs/issues/927
2025-06-05tests: add TestRootForceOwnerJakob Unterwurzacher
$ make root_test [...] === RUN TestRootForceOwner root_test.go:398: mkdir /var/tmp/gocryptfs-test-parent-0/3816769547/TestRootForceOwner.2366169656.mnt/dir1: permission denied root_test.go:408: open /var/tmp/gocryptfs-test-parent-0/3816769547/TestRootForceOwner.2366169656.mnt/file1: permission denied root_test.go:415: mknod: permission denied --- FAIL: TestRootForceOwner (0.04s) https://github.com/rfjakob/gocryptfs/issues/783
2025-05-10tests: fsstress-gocryptfs.bash: inform user that they should wait for cleanupJakob Unterwurzacher
Without this message, fsstress-gocryptfs.bash seems to just hang after Ctrl-C.
2025-04-26darwin: tests/defaults: fix unix.Getdents build failureJakob Unterwurzacher
Error was: + go test -c -tags without_openssl -o /dev/null github.com/rfjakob/gocryptfs/v2/tests/defaults Error: tests/defaults/main_test.go:532:17: undefined: unix.Getdents Error: tests/defaults/main_test.go:538:16: undefined: unix.Getdents Error: tests/defaults/main_test.go:549:16: undefined: unix.Getdents
2025-04-19tests: add TestSeekDirJakob Unterwurzacher
Acc. to the commit message, https://github.com/hanwen/go-fuse/commit/0d1228a39dd49c83c8b7c30dec7928f5d7d84cc0 break seeking in directories. This commit appears in go-fuse v2.6.0.
2025-04-13stress_tests/pingpong.bash: better commentJakob Unterwurzacher
2025-04-07stress_tests: fsstress-gocryptfs.bash: don't try to recompileJakob Unterwurzacher
The days of GOPATH are over. Also, use the fsstress path that "sudo make install" in xfstests uses per default.
2025-04-07stress_tests/parallel_cp.sh: note that problem is fixedJakob Unterwurzacher
2025-04-05tests: fsck: generate evil files with "\r" and "\n" on the flyJakob Unterwurzacher
Because if we have them in git, we get this: $ go install github.com/rfjakob/gocryptfs/v2@latest go: downloading github.com/rfjakob/gocryptfs/v2 v2.5.2 go: github.com/rfjakob/gocryptfs/v2@latest: create zip: tests/fsck/malleable_base64/27AG8t-XZH7G9ou2OSD_z g: malformed file path "tests/fsck/malleable_base64/27AG8t-XZH7G9ou2OSD_z\ng": invalid char '\n' g: malformed file path "tests/fsck/malleable_base64/27AG8t-XZH7G9ou2OSD_z\rg": invalid char '\r' Fixes: https://github.com/rfjakob/gocryptfs/issues/904 Relates-to: https://github.com/golang/go/issues/28001
2025-02-26tests/root_test: use our own Setgroups/Setregid/Setreuid wrappersJakob Unterwurzacher
2025-02-23tests/root_test: add TestConcurrentUserOps and TestAsUserSleepJakob Unterwurzacher
Both work with golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a but break with golang.org/x/sys v0.30.0 https://github.com/rfjakob/gocryptfs/issues/893 https://github.com/rfjakob/gocryptfs/issues/892
2025-02-17tests: root_test: add TestMainJakob Unterwurzacher
I will add more tests for https://github.com/rfjakob/gocryptfs/issues/893 soon, these will also use DefaultPlainDir.
2025-01-23tests: add issue893.sh, a reproducer for #893 "mariadb crashing since 2.5.0"Jakob Unterwurzacher
https://github.com/rfjakob/gocryptfs/issues/893
2025-01-18tests: reverse: TestMtimePlus10: fix darwin buildJakob Unterwurzacher
Darwin does not have Stat_t.mtim: + go test -c -tags without_openssl -o /dev/null github.com/rfjakob/gocryptfs/v2/tests/reverse Error: tests/reverse/correctness_test.go:407:15: name_stat.Mtim undefined (type syscall.Stat_t has no field or method Mtim) Error: tests/reverse/correctness_test.go:407:37: long_stat.Mtim undefined (type syscall.Stat_t has no field or method Mtim) Error: tests/reverse/correctness_test.go:410:15: name_stat.Ctim undefined (type syscall.Stat_t has no field or method Ctim) Error: tests/reverse/correctness_test.go:410:37: long_stat.Ctim undefined (type syscall.Stat_t has no field or method Ctim) Error: tests/reverse/correctness_test.go:424:16: diriv_stat.Mtim undefined (type syscall.Stat_t has no field or method Mtim) Error: tests/reverse/correctness_test.go:424:42: workdirA_stat.Mtim undefined (type syscall.Stat_t has no field or method Mtim) Error: tests/reverse/correctness_test.go:427:16: diriv_stat.Ctim undefined (type syscall.Stat_t has no field or method Ctim) Error: tests/reverse/correctness_test.go:427:42: workdirA_stat.Ctim undefined (type syscall.Stat_t has no field or method Ctim) Switch to os.Stat.
2025-01-18tests: skip TestFileHoleCopy for nowJakob Unterwurzacher
This problem potentially causes extra disk usage for sparse files but is otherwise harmless. Skip the test for now.
2025-01-18reverse: advance mtime & ctime for virtual files by 10 secondsJakob Unterwurzacher
With inode number reuse and hard links, we could have returned wrong data for gocryptfs.diriv and gocryptfs.xyz.longname files, respectively (https://github.com/rfjakob/gocryptfs/issues/802). Now that this is fixed, ensure that rsync and similar tools pick up the new correct files by advancing mtime and ctime by 10 seconds, which should be more than any filesytems' timestamp granularity (FAT32 has 2 seconds).
2025-01-18tests: reverse: factor out newWorkdirJakob Unterwurzacher
Will be used in a new test in the next commit.
2024-12-04tests: ignore pidfd in fd leak testJakob Unterwurzacher
This is not a real leak: fd leak in test process? before, after: [0r=/dev/null 3r=/proc/940141/fd 5rw=anon_inode:[eventfd] (filtered: pipe:[2454797], pipe:[2454797], anon_inode:[eventpoll])] [0r=/dev/null 3r=/proc/940141/fd 5rw=anon_inode:[eventfd] 12rw=anon_inode:[pidfd] (filtered: pipe:[2454797], pipe:[2454797], anon_inode:[eventpoll], pipe:[2460158])] Ignore pidfd.
2024-12-04gocryptfs -passwd: fix the tests I just brokeJakob Unterwurzacher
Turns out at least the tests depended on the old behavoir. Fixes d5bd98eb3f4cbfb8dd9d0b2eb64dbff69c3c88b1
2024-11-11Report inode number for the root nodeJakob Unterwurzacher
Now that https://github.com/hanwen/go-fuse/issues/399 has landed we can report an inode number for the root node. Fixes https://github.com/rfjakob/gocryptfs/issues/580
2024-09-19dl-linux-tarball.bash: drop wget's "--no-progress" flagJakob Unterwurzacher
Looks like wget does not support it anymore $ wget --version GNU Wget2 2.1.0 - multithreaded metalink/file/website downloader $ ./benchmark.bash Testing gocryptfs at /tmp/benchmark.bash.bmt: gocryptfs v2.4.0-38-g40abf96-dirty; go-fuse v2.5.0; 2024-09-03 go1.21.4 linux/amd64 /tmp/benchmark.bash.bmt.mnt is a mountpoint Downloading linux-3.0.tar.gz Unknown option 'show-progress'
2024-09-03ctlsock: delete colliding orphaned socket fileJakob Unterwurzacher
Detect and delete an orphaned socket file that collides with the ctlsock we want to create. Fixes https://github.com/rfjakob/gocryptfs/issues/776
2024-08-23tests: reverse: add TestForceOwnerJakob Unterwurzacher
https://github.com/rfjakob/gocryptfs/issues/809
2024-05-05reverse: use incrementing inode number for gocryptfs.longname.*.name filesJakob Unterwurzacher
ed0a12b7337c2d88c027329f64e73070da17d5b3 already fixed the kernel side, now we also want the .name files to NOT appear hardlinked when just looking at the inode number. Relates-to: https://github.com/rfjakob/gocryptfs/issues/802
2024-05-05tests: reverse: deduplicate findInum / findInoJakob Unterwurzacher
2024-05-01tetss: reverse: add TestHardlinkedLongnameJakob Unterwurzacher
Regression test for https://github.com/rfjakob/gocryptfs/issues/802 . Fails at the moment.
2024-03-13init_dir: use masterkey argPablo Mazzini
2023-12-11tests: TestMountPasswordIncorrect: better error on wrong exit codeJakob Unterwurzacher
Report that exit code is wrong when the exit code is wrong.
2023-09-15tests/fsck: add malleable_base64 test filesystemJakob Unterwurzacher
This filesystem contains filenames with non-canonical base64 encodings of the same name "foo", leading to this mess: $ ls mnt/ foo foo foo foo
2023-05-30tests: add cluster testJakob Unterwurzacher
finds out what happens if multiple gocryptfs mounts write to one file concurrently (usually, nothing good). This use case is relevant for HPC clusters.
2023-05-19fsstress-gocryptfs.bash: improve header commentJakob Unterwurzacher
I maybe should have noted that this is xfstests generic/013.
2023-05-18tests: TestDirectMount: check for default_permissionsJakob Unterwurzacher
2023-05-17tests: TestDirectMount: also check dev, suidJakob Unterwurzacher
2023-05-17tests: add TestDirectMountJakob Unterwurzacher
This is in preparation of adding directmount capability. It also check that FsName is set correctly, which is in preparation for the next patch.
2023-05-17tests: root_test: use TMPDIR=/var/tmpJakob Unterwurzacher
Otherwise we fail like this on my Fedora 38 box: === RUN TestOverlay DetectQuirks: tmpfs detected, no extended attributes except acls will work. root_test.go:379: No user xattrs! overlay mount will likely fail. 15:15:57.957960 Unimplemented opcode OPCODE-51 root_test.go:398: mount: /tmp/gocryptfs-test-parent-0/3652394902/TestOverlay.2374697046.mnt/merged: wrong fs type, bad option, bad superblock on overlay, missing codepage or helper program, or other error. dmesg(1) may have more information after failed mount system call. root_test.go:399: exit status 32 --- FAIL: TestOverlay (0.04s) FAIL Also fix the messed-up DetectQuirks bit test.
2023-05-12canonical-benchmarks.bash: drop page cache of "zero" fileJakob Unterwurzacher
For the streaming read benchmark, we don't want to benchmark the page cache.