<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gocryptfs/tests, branch master</title>
<subtitle>Mirror of gocryptfs source code on Github</subtitle>
<id>http://nuetzlich.net/cgit/gocryptfs/atom?h=master</id>
<link rel='self' href='http://nuetzlich.net/cgit/gocryptfs/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/'/>
<updated>2026-11-20T21:53:36+00:00</updated>
<entry>
<title>test.bash: collect coverage from unit and integration tests</title>
<updated>2026-11-20T21:53:36+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2026-11-20T21:44:17+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=7190404b14597fa0afffff1313b192c2b83e04cb'/>
<id>urn:sha1:7190404b14597fa0afffff1313b192c2b83e04cb</id>
<content type='text'>
Most of the test suite runs the gocryptfs binary, so "go test -cover"
alone misses most of the coverage. test.bash now builds a separate
coverage-instrumented binary into ./coverage (./gocryptfs stays a normal
build, so "make install" does not pick it up) and points the tests at it
via $GOCRYPTFS_TEST_BINARY.

"go test -cover" overwrites $GOCOVERDIR with a temporary directory and
ignores the data of other executables in it, so the directory is passed
as $GOCRYPTFS_COVERAGE_DATA and test_helpers sets $GOCOVERDIR from it.

Only our packages that go into the gocryptfs binary are instrumented, so
the reported percentage is relative to that code.

The merged result is written to coverage/coverage.out and
coverage/coverage.html.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>tests/fsck: check the number of corrupt files</title>
<updated>2026-11-19T20:16:19+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2026-11-18T20:47:59+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=43e17fc6488ac088b51758a81dbc039f7c158f6a'/>
<id>urn:sha1:43e17fc6488ac088b51758a81dbc039f7c158f6a</id>
<content type='text'>
Only checking the exit code does not catch fsck missing some of the
corruptions. TestBrokenFsV14 now expects 15 corrupt files (the old
FUSE-based fsck found only 12, missing incomplete_file_1..3), and
TestMalleableBase64 expects 3.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>fusefrontend: -sharedstorage: always check for file holes on write</title>
<updated>2026-11-11T20:22:00+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2026-11-11T20:22:00+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=851188164274de96cd581c3da1b5e847a42e2948'/>
<id>urn:sha1:851188164274de96cd581c3da1b5e847a42e2948</id>
<content type='text'>
Write() skips writePadHole() when a write directly follows the previous
one (isConsecutiveWrite), because such a write cannot create a hole.
That decision is based on process-local state. With -sharedstorage,
another mount may have shrunk the file in between, so the old partial
last block was never padded and ended up as a short block in the middle
of the file, making it unreadable (EIO).

Disable the optimization with -sharedstorage.

Add TestConsecutiveWriteAfterRemoteTruncate as a regression test.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>fusefrontend: -sharedstorage: don't replace the header when growing a truncated file</title>
<updated>2026-11-11T20:21:13+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2026-11-11T20:21:13+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=0363a138f8125604d75d9ca84be4092482b622df'/>
<id>urn:sha1:0363a138f8125604d75d9ca84be4092482b622df</id>
<content type='text'>
With -sharedstorage, truncate to zero keeps the file header, because
other mounts may have the file ID cached. But a following truncate that
grows the file to a block-aligned size went through truncateGrowFile,
which saw plaintext size 0 and unconditionally called createHeader().
This replaced the file ID (without taking the header lock), and
everything the other mount wrote afterwards with its cached ID was
unreadable.

Factor the "read header or create it if the file is empty" logic out of
doWrite into loadOrCreateFileID() and use it in truncateGrowFile with
-sharedstorage.

Add TestGrowAfterTruncateKeepsHeader as a regression test.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>reverse: don't follow symlinks when serving gocryptfs.conf</title>
<updated>2026-11-11T20:11:43+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2026-11-11T20:11:43+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=dfdf47d790fa758a9f443764ad296e86c9007ece'/>
<id>urn:sha1:dfdf47d790fa758a9f443764ad296e86c9007ece</id>
<content type='text'>
.gocryptfs.reverse.conf is passed through to gocryptfs.conf in the
reverse view unencrypted. lookupConf, VirtualConfNode.Getattr and
VirtualConfNode.Open accessed it via syscall.Stat/Open on the full path,
following symlinks. Anybody with write access to the backing directory
could replace it with a symlink to, for example, /etc/shadow and read the
target in plaintext through the mount when gocryptfs runs as root.

Add RootNode.openConf(), which opens the file relative to the backing
dir with O_NOFOLLOW|O_NONBLOCK (O_NONBLOCK so a FIFO cannot hang us) and
rejects anything that is not a regular file. Use it for all three.

Add TestConfigSymlink as a regression test.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>syscallcompat: drop Faccessat helper, use unix.Faccessat with AT_SYMLINK_NOFOLLOW</title>
<updated>2026-11-11T20:02:25+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2026-11-11T20:02:25+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=d61448ec88f064eba898b566f68324859df5f7ac'/>
<id>urn:sha1:d61448ec88f064eba898b566f68324859df5f7ac</id>
<content type='text'>
Our helper did Fstatat(AT_SYMLINK_NOFOLLOW) followed by a symlink-following
unix.Faccessat(..., 0). If the file is swapped for a symlink in between, we
check access on the symlink target.

x/sys now handles AT_SYMLINK_NOFOLLOW on all our platforms: faccessat2 with
fallback emulation on Linux, libc faccessat on Darwin, and the native
syscall on FreeBSD. The Darwin breakage that caused the revert in
3d6b2685 should no longer apply.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>tests: allow one fd for go-fuse splicing</title>
<updated>2026-10-22T18:51:10+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2026-10-22T18:50:44+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=c30f9889e6e6bdef5ae4e6b36cace286867c603a'/>
<id>urn:sha1:c30f9889e6e6bdef5ae4e6b36cace286867c603a</id>
<content type='text'>
Latest go-fuse (see next commit) uses one fd internally for splicing.
</content>
</entry>
<entry>
<title>tests: UnmountErr: count the fds if we detect a leak</title>
<updated>2026-10-22T18:50:08+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2026-10-22T18:50:08+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=09d34d16ab35f559e3dd80b6cbfffd3a2d5534be'/>
<id>urn:sha1:09d34d16ab35f559e3dd80b6cbfffd3a2d5534be</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tests: add TestUnlinkedO_SYNC</title>
<updated>2026-10-01T18:32:54+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2026-09-24T18:44:52+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=22c187b49b033982950248a66ec4134946d62900'/>
<id>urn:sha1:22c187b49b033982950248a66ec4134946d62900</id>
<content type='text'>
Relates-to: #1023
https://github.com/rfjakob/gocryptfs/issues/1023
</content>
</entry>
<entry>
<title>cli: use READDIR by default</title>
<updated>2026-09-01T18:51:36+00:00</updated>
<author>
<name>Marios Titas</name>
</author>
<published>2026-08-15T20:03:54+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=5b2881e7cbc347eb379d35c3ae1f491bef8f227f'/>
<id>urn:sha1:5b2881e7cbc347eb379d35c3ae1f491bef8f227f</id>
<content type='text'>
Avoid eager per-entry metadata work for names-only listings, and
add -readdirplus for workloads that benefit from eager attributes.

Co-authored-by: Cursor &lt;cursoragent@cursor.com&gt;
</content>
</entry>
</feed>
