vfs: make mount tests run on OpenBSD

This commit is contained in:
Nick Craig-Wood
2020-09-01 13:49:09 +01:00
parent 233fef5c4d
commit 5ef9551b02
3 changed files with 6 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ import (
"runtime" "runtime"
"testing" "testing"
"github.com/rclone/rclone/vfs"
"github.com/rclone/rclone/vfs/vfscommon" "github.com/rclone/rclone/vfs/vfscommon"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
@@ -110,6 +111,9 @@ func TestWriteFileDup(t *testing.T) {
var dupFd uintptr var dupFd uintptr
dupFd, err = writeTestDup(fh.Fd()) dupFd, err = writeTestDup(fh.Fd())
if err == vfs.ENOSYS {
t.Skip("dup not supported on this platform")
}
require.NoError(t, err) require.NoError(t, err)
dupFile := os.NewFile(dupFd, fh.Name()) dupFile := os.NewFile(dupFd, fh.Name())

View File

@@ -1,4 +1,4 @@
//go:build !linux && !darwin && !freebsd && !windows //go:build !linux && !darwin && !freebsd && !openbsd && !windows
package vfstest package vfstest

View File

@@ -1,4 +1,4 @@
//go:build linux || darwin || freebsd //go:build linux || darwin || freebsd || openbsd
package vfstest package vfstest