summaryrefslogtreecommitdiff
path: root/tests/test_helpers/mount_unmount.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2022-08-28 20:31:27 +0200
committerJakob Unterwurzacher2022-08-28 20:31:27 +0200
commita55b3cc15a6d9bce116a90f33df4bc99d9dd6a10 (patch)
tree5172278bece45cf031ee942267aaa06f131f2904 /tests/test_helpers/mount_unmount.go
parent59165f0f53193f596741b1bc15ade64cb43910ef (diff)
tests/matrix: fix data race in TestConcurrentReadWrite
Fixes https://github.com/golang/go/issues/54715 Output was: $ go test ./tests/matrix -run TestConcurrentReadWrite -race test_helpers: warning: testParentDir "/tmp/gocryptfs-test-parent-1026" does not reside on ext4, we will miss failures caused by ino reuse PASS PASS ================== WARNING: DATA RACE Write at 0x00c00038a0e0 by goroutine 63: runtime.racewriterange() <autogenerated>:1 +0x29 internal/poll.(*FD).Pread() /usr/local/go/src/internal/poll/fd_unix.go:193 +0x169 os.(*File).pread() /usr/local/go/src/os/file_posix.go:40 +0x335 os.(*File).ReadAt() /usr/local/go/src/os/file.go:136 +0x2de github.com/rfjakob/gocryptfs/v2/tests/matrix.TestConcurrentReadWrite.func1() /home/jakob/go/src/github.com/rfjakob/gocryptfs/tests/matrix/concurrency_test.go:40 +0x14b Previous write at 0x00c00038a0e0 by goroutine 61: runtime.racewriterange() <autogenerated>:1 +0x29 internal/poll.(*FD).Pread() /usr/local/go/src/internal/poll/fd_unix.go:193 +0x169 os.(*File).pread() /usr/local/go/src/os/file_posix.go:40 +0x335 os.(*File).ReadAt() /usr/local/go/src/os/file.go:136 +0x2de github.com/rfjakob/gocryptfs/v2/tests/matrix.TestConcurrentReadWrite.func1() /home/jakob/go/src/github.com/rfjakob/gocryptfs/tests/matrix/concurrency_test.go:40 +0x14b Goroutine 63 (running) created at: github.com/rfjakob/gocryptfs/v2/tests/matrix.TestConcurrentReadWrite() /home/jakob/go/src/github.com/rfjakob/gocryptfs/tests/matrix/concurrency_test.go:34 +0x31d testing.tRunner() /usr/local/go/src/testing/testing.go:1446 +0x216 testing.(*T).Run.func1() /usr/local/go/src/testing/testing.go:1493 +0x47 Goroutine 61 (running) created at: github.com/rfjakob/gocryptfs/v2/tests/matrix.TestConcurrentReadWrite() /home/jakob/go/src/github.com/rfjakob/gocryptfs/tests/matrix/concurrency_test.go:34 +0x31d testing.tRunner() /usr/local/go/src/testing/testing.go:1446 +0x216 testing.(*T).Run.func1() /usr/local/go/src/testing/testing.go:1493 +0x47 ================== --- FAIL: TestConcurrentReadWrite (0.03s) testing.go:1319: race detected during execution of test FAIL TestMain: matrix[2] = matrix.testcaseMatrix{plaintextnames:false, openssl:"false", aessiv:false, raw64:false, extraArgs:[]string(nil)} failed FAIL github.com/rfjakob/gocryptfs/v2/tests/matrix 0.170s FAIL
Diffstat (limited to 'tests/test_helpers/mount_unmount.go')
0 files changed, 0 insertions, 0 deletions