<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gocryptfs/tests/cluster, branch LockSharedStorage</title>
<subtitle>Mirror of gocryptfs source code on Github</subtitle>
<id>http://nuetzlich.net/cgit/gocryptfs/atom?h=LockSharedStorage</id>
<link rel='self' href='http://nuetzlich.net/cgit/gocryptfs/atom?h=LockSharedStorage'/>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/'/>
<updated>2023-06-09T13:07:45+00:00</updated>
<entry>
<title>tests/cluster: enable TestClusterConcurrentRW per default</title>
<updated>2023-06-09T13:07:45+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-06-09T12:35:04+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=751acc4698aa299624a593745d0daf82f5a4fe10'/>
<id>urn:sha1:751acc4698aa299624a593745d0daf82f5a4fe10</id>
<content type='text'>
Add the -sharedstorage flag to the mounts and make it more
severe by adjusting the I/O and file sizes to arbitrary unaligned
values.

It passes *most of the time*.

If it fails, it's like this, and the reason is that there is no
fcntl locks in the READ path yet.

gocryptfs/tests/cluster$ go test -run TestClusterConcurrentRW -v
=== RUN   TestClusterConcurrentRW
doRead 2895433: corrupt block #0: cipher: message authentication failed
doRead 2895433: corrupt block #0: cipher: message authentication failed
doRead 2895433: corrupt block #0: cipher: message authentication failed
    cluster_test.go:98: readThread iteration 9165: ReadAt failed: read /var/tmp/gocryptfs-test-parent-1026/3021427391/TestClusterConcurrentRW.366469887.mnt1/foo: input/output error
 --- FAIL: TestClusterConcurrentRW (0.40s)
FAIL
exit status 1
FAIL	github.com/rfjakob/gocryptfs/v2/tests/cluster	0.406s
</content>
</entry>
<entry>
<title>tests/cluster: add TestPoCTornWriteLocked</title>
<updated>2023-06-09T12:33:07+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-06-09T12:33:07+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=5ae35e904ab7b536a8c8c8a05cd8c69953b3b093'/>
<id>urn:sha1:5ae35e904ab7b536a8c8c8a05cd8c69953b3b093</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tests/cluster: note that ext4 provides no atomicity</title>
<updated>2023-06-09T05:50:11+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-06-09T05:50:11+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=1b4dc795bd0060bd64992f1355cbf197e0a20172'/>
<id>urn:sha1:1b4dc795bd0060bd64992f1355cbf197e0a20172</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tests/cluster: simplify TestPoCTornWrite</title>
<updated>2023-06-09T05:30:04+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-06-08T19:35:45+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=5d78814da3786ed0786234ec5249723018274355'/>
<id>urn:sha1:5d78814da3786ed0786234ec5249723018274355</id>
<content type='text'>
Turns out we can get the same error with a simpler flow.
</content>
</entry>
<entry>
<title>tests/cluster: add TestPoCTornWrite</title>
<updated>2023-06-09T05:29:54+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-06-08T13:50:05+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=1418565a6b28a91f2f15d5b957d7fd31392a47a1'/>
<id>urn:sha1:1418565a6b28a91f2f15d5b957d7fd31392a47a1</id>
<content type='text'>
Scary. But explains why TestConcurrentCreate fails.

gocryptfs/tests/cluster$ go test -run TestPoCTornWrite
 --- FAIL: TestPoCTornWrite (0.00s)
    poc_test.go:210: iteration 214: inconsistent block: d6d6d6d6d6d6d6d6d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1
FAIL
</content>
</entry>
<entry>
<title>tests/cluster: TestConcurrentCreate: make sure buf2 is zero'ed</title>
<updated>2023-06-09T05:29:49+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-06-08T13:04:22+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=2b416942b0366c41672bf6bab69b2f1a1ceb5f5d'/>
<id>urn:sha1:2b416942b0366c41672bf6bab69b2f1a1ceb5f5d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tests/cluster: add TestOpenTruncate</title>
<updated>2023-06-06T14:24:06+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-06-05T11:43:23+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=5e4f8bde42c76a4463b260ce5308089f5fe7048d'/>
<id>urn:sha1:5e4f8bde42c76a4463b260ce5308089f5fe7048d</id>
<content type='text'>
This fails right now:

1 jakob@brikett:~/go/src/github.com/rfjakob/gocryptfs/tests/cluster$ go test -run TestOpenTruncate -v
=== RUN   TestOpenTruncate
    cluster_test.go:235: POSIX compliance issue: non-exlusive create failed with err=file exists
doWrite 2898550: corrupt header: ParseHeader: header is all-zero. Header hexdump: 000000000000000000000000000000000000
    cluster_test.go:240: iteration 1: WriteAt: write /var/tmp/gocryptfs-test-parent-1026/1896094179/TestOpenTruncate.4202105280.mnt2/foo: input/output error
 --- FAIL: TestOpenTruncate (0.10s)
FAIL
exit status 1
FAIL	github.com/rfjakob/gocryptfs/v2/tests/cluster	0.099s
1 jakob@brikett:~/go/src/github.com/rfjakob/gocryptfs/tests/cluster$ go test -run TestOpenTruncate -v
=== RUN   TestOpenTruncate
    cluster_test.go:235: POSIX compliance issue: non-exlusive create failed with err=file exists
doRead 2898565: corrupt block #0: cipher: message authentication failed
ino2898565 fh9: RMW read failed: errno=5
    cluster_test.go:240: iteration 8: WriteAt: write /var/tmp/gocryptfs-test-parent-1026/652691834/TestOpenTruncate.281532388.mnt1/foo: input/output error
 --- FAIL: TestOpenTruncate (0.09s)
FAIL
exit status 1
FAIL	github.com/rfjakob/gocryptfs/v2/tests/cluster	0.095s
</content>
</entry>
<entry>
<title>tests/cluster: add TestPoCHeaderCreation</title>
<updated>2023-06-06T14:24:06+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-06-05T11:28:11+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=452d51183b95c3eb1638efa40b0f2ae1c19de50d'/>
<id>urn:sha1:452d51183b95c3eb1638efa40b0f2ae1c19de50d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tests/cluster: move PoC tests to poc_test.go</title>
<updated>2023-06-06T14:24:06+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-06-05T10:46:22+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=f92a575f431132c429b9a35edc4ece9f2ff8a177'/>
<id>urn:sha1:f92a575f431132c429b9a35edc4ece9f2ff8a177</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tests/cluster: add TestConcurrentCreate</title>
<updated>2023-06-06T14:24:06+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-06-05T10:42:33+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=344917ca1be87421f4120187820adb2a41fb130b'/>
<id>urn:sha1:344917ca1be87421f4120187820adb2a41fb130b</id>
<content type='text'>
This exercises the byte-range locks we just added.
</content>
</entry>
</feed>
