forked from TrueCloudLab/rclone
mount: run tests in a subprocess to fix deadlock - fixes #3259
Before this change we ran the tests and the mount in the same process. This could cause deadlocks and often did, and made the mount tests very unreliable. This fixes the problem by running the mount in a seperate process and commanding it via a pipe over stdin/stdout.
This commit is contained in:
parent
626a416ff8
commit
4a382c09ec
5 changed files with 327 additions and 153 deletions
|
@ -46,7 +46,7 @@ func TestWriteFileDoubleClose(t *testing.T) {
|
|||
|
||||
// write to the other dup
|
||||
_, err = unix.Write(fd2, buf)
|
||||
if run.vfs.Opt.CacheMode < vfscommon.CacheModeWrites {
|
||||
if run.vfsOpt.CacheMode < vfscommon.CacheModeWrites {
|
||||
// produces an error if cache mode < writes
|
||||
assert.Error(t, err, "input/output error")
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue