| Age | Commit message (Collapse) | Author |
|
$ staticcheck --version
staticcheck 2025.1.1 (0.6.1)
$ staticcheck ./...
contrib/findholes/holes/holes.go:179:2: rand.Seed has been deprecated since Go 1.20 and an alternative has been available since Go 1.0: As of Go 1.20 there is no reason to call Seed with a random value. Programs that call Seed with a known value to get a specific sequence of results should use New(NewSource(seed)) to obtain a local random generator. (SA1019)
tests/defaults/acl_test.go:24:2: rand.Seed has been deprecated since Go 1.20 and an alternative has been available since Go 1.0: As of Go 1.20 there is no reason to call Seed with a random value. Programs that call Seed with a known value to get a specific sequence of results should use New(NewSource(seed)) to obtain a local random generator. (SA1019)
tests/plaintextnames/file_holes_test.go:143:2: rand.Seed has been deprecated since Go 1.20 and an alternative has been available since Go 1.0: As of Go 1.20 there is no reason to call Seed with a random value. Programs that call Seed with a known value to get a specific sequence of results should use New(NewSource(seed)) to obtain a local random generator. (SA1019)
|
|
tmpfs supports user xattrs since Linux 6.6 (anno 2023):
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2daf18a7884dc03d5164ab9c7dc3f2ea70638469
|
|
On my Fedora I used to get this failure:
--- FAIL: TestXattrList (0.00s)
xattr_test.go:52: wrong number of names, want=20 have=21
xattr_test.go:58: mismatch on attr "security.selinux": valA = "", valC = "xxxxxxxxyyyyyyyyyyyyyyyzzzzzzzzzzzzz"
First step is to print the actual value using xattr.LGet.
This improves the error message to this:
--- FAIL: TestXattrList (0.00s)
xattr_test.go:53: wrong number of names, want=20 have=21
xattr_test.go:59: mismatch on attr "security.selinux": valA = "", valC = "system_u:object_r:fusefs_t:s0\x00"
2nd step is to ignore "security." attribs as we have no control
over them.
|
|
Fixes https://github.com/rfjakob/gocryptfs/issues/827
|
|
--- FAIL: Test555Dir (0.00s)
dir_test.go:90: wrong mode. want 0555 have 0755
FAIL
TestMain: matrix[0] = matrix.testcaseMatrix{plaintextnames:false, openssl:"auto", aessiv:false, raw64:false, extraArgs:[]string(nil)} failed
FAIL github.com/rfjakob/gocryptfs/v2/tests/matrix 2.109s
https://github.com/rfjakob/gocryptfs/issues/964
|
|
Because the deletion happens asynchronously, a
previous iteration can delete the socket of the
next one.
|
|
Added testing for RENAME_EXCHANGE
https://github.com/rfjakob/gocryptfs/issues/914
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
Fixes https://github.com/rfjakob/gocryptfs/issues/930
|
|
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>
|
|
Tool-assisted.
|
|
|
|
|
|
|
|
Will be used soon in a new gitignore test.
Relates-to: https://github.com/rfjakob/gocryptfs/issues/927
|
|
$ 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
|
|
Without this message, fsstress-gocryptfs.bash seems to just hang after Ctrl-C.
|
|
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
|
|
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.
|
|
|
|
The days of GOPATH are over. Also, use the fsstress path
that "sudo make install" in xfstests uses per default.
|
|
|
|
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
|
|
|
|
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
|
|
I will add more tests for https://github.com/rfjakob/gocryptfs/issues/893
soon, these will also use DefaultPlainDir.
|
|
https://github.com/rfjakob/gocryptfs/issues/893
|
|
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.
|
|
This problem potentially causes extra disk usage for sparse files
but is otherwise harmless.
Skip the test for now.
|
|
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).
|
|
Will be used in a new test in the next commit.
|
|
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.
|
|
Turns out at least the tests depended on the old
behavoir.
Fixes d5bd98eb3f4cbfb8dd9d0b2eb64dbff69c3c88b1
|
|
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
|
|
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'
|
|
Detect and delete an orphaned socket file that collides with
the ctlsock we want to create.
Fixes https://github.com/rfjakob/gocryptfs/issues/776
|
|
https://github.com/rfjakob/gocryptfs/issues/809
|
|
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
|
|
|
|
Regression test for https://github.com/rfjakob/gocryptfs/issues/802 .
Fails at the moment.
|
|
|
|
Report that exit code is wrong when the
exit code is wrong.
|
|
This filesystem contains filenames with non-canonical base64
encodings of the same name "foo", leading to this mess:
$ ls mnt/
foo foo foo foo
|
|
finds out what happens if multiple
gocryptfs mounts write to one file concurrently
(usually, nothing good).
This use case is relevant for HPC clusters.
|
|
I maybe should have noted that this is xfstests generic/013.
|