Documentation ¶
Index ¶
- func CreateContext(t *testing.T) context.Context
- func TestClose(t *testing.T, dev usbdlib.Device)
- func TestDevSize(t *testing.T, dev usbdlib.Device, expectedSize uint)
- func TestNBD(t *testing.T, dev usbdlib.Device, expectedSize uint)
- func TestReadEmpty(t *testing.T, dev usbdlib.Device, boundaryBytes uint)
- func TestReadHash(t *testing.T, dev usbdlib.Device, expectedHash []byte)
- func TestUserspace(t *testing.T, dev usbdlib.Device, expectedSize uint)
- func TestWriteReadPattern(t *testing.T, dev usbdlib.Device) (writtenHash []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateContext ¶
CreateContext creates a context aware of the provided a testing.T's deadline
func TestClose ¶
TestClose confirms the device close without error and subsequent operations fail as expected
func TestDevSize ¶
TestDevSize verfies the provided device reports the correct size
func TestNBD ¶
TestNBD runs a similar test suite as TestUserspace but puts kernel-space NBD in the middle for an end-to-end test. This requires privilege execution!
func TestReadEmpty ¶
TestReadEmpty verifies the provided device reads as empty
func TestReadHash ¶
TestReadHash confirms the SHA of the provided device matches the expected SHA
func TestUserspace ¶
TestUserspace runs a suite of basic sanity tests on the provided device directly without using Linux kernel facilities such as NBD
Types ¶
This section is empty.