removablemedia

package
v0.0.0-...-683b059 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Overview

Package removablemedia implements the testing sceanrio of arc.RemovableMedia test and its utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachLoopDevice

func AttachLoopDevice(ctx context.Context, path string) (string, error)

AttachLoopDevice attaches to loop device.

func CreateZeroFile

func CreateZeroFile(size int64, name string) (string, error)

CreateZeroFile creates a file filled with size bytes of 0.

func DetachLoopDevice

func DetachLoopDevice(ctx context.Context, devLoop string) error

DetachLoopDevice detaches from loop device.

func FormatVFAT

func FormatVFAT(ctx context.Context, devLoop string) error

FormatVFAT formats the vfat file system.

func Mount

func Mount(ctx context.Context, cd *crosdisks.CrosDisks, devLoop, name string) (mountPath string, retErr error)

Mount adds device to allowlist and mounts it.

func RunTest

func RunTest(ctx context.Context, s *testing.State, a *arc.ARC, testFile string)

RunTest executes the testing scenario of arc.RemovableMedia.

func Unmount

func Unmount(ctx context.Context, cd *crosdisks.CrosDisks, devLoop string) error

Unmount unmounts the disk.

Types

This section is empty.

Jump to

Keyboard shortcuts

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