diff --git a/oci/utils_unix_test.go b/oci/utils_unix_test.go index 9f2c8d05e..49a5071db 100644 --- a/oci/utils_unix_test.go +++ b/oci/utils_unix_test.go @@ -23,6 +23,7 @@ import ( "errors" "fmt" "os" + "runtime" "testing" "github.com/stretchr/testify/assert" @@ -149,9 +150,11 @@ func TestHostDevicesAllValid(t *testing.T) { } for _, device := range devices { - // Devices can't have major number 0. - if device.Major == 0 { - t.Errorf("device entry %+v has zero major number", device) + if runtime.GOOS != "freebsd" { + // On Linux, devices can't have major number 0. + if device.Major == 0 { + t.Errorf("device entry %+v has zero major number", device) + } } switch device.Type { case blockDevice, charDevice: