testutil

package
v0.0.0-...-bbc9ce3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2021 License: BSD-2-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package testutil provides utilities which help test the FAT filesystem.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeRandomBuffer

func MakeRandomBuffer(size int) []byte

MakeRandomBuffer creates a random buffer of a specified size

Types

type FileFAT

type FileFAT struct {
	// contains filtered or unexported fields
}

FileFAT describes a file-backed FAT image which can be treated like a FAT filesystem.

func MkfsFAT

func MkfsFAT(t *testing.T, size string, numFATs, numHiddenSectors, sectorsPerCluster, sectorSize int) *FileFAT

MkfsFAT creates a new FAT filesystem image. The name of the FAT image is returned.

func (*FileFAT) GetDevice

func (fs *FileFAT) GetDevice() *thinio.Conductor

GetDevice opens and returns a file-backed device which corresponds to the image.

func (*FileFAT) GetRawDevice

func (fs *FileFAT) GetRawDevice() block.Device

GetRawDevice opens and returns a file-backed device without a cache.

func (*FileFAT) RmfsFAT

func (fs *FileFAT) RmfsFAT()

RmfsFAT removes the FAT filesystem image created by MkfsFAT.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL