dut

package
v0.0.0-...-1270d08 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: BSD-3-Clause Imports: 25 Imported by: 0

Documentation

Overview

Package dut contains code that are run on the DUT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActivePartitions

func ActivePartitions(ctx context.Context) (partitions.State, error)

func CheckArtifact

func CheckArtifact(ctx context.Context, client *storage.Client, artifact *artifact.Artifact) error

CheckArtifact checks that all image artifacts are accessible.

func ClearTpmOwner

func ClearTpmOwner(ctx context.Context) error

func DisableRootfsVerification

func DisableRootfsVerification(ctx context.Context, kernelNum int) error

func Main

func Main() error

func RunPostinst

func RunPostinst(ctx context.Context, partition string) error

RunPostinst runs "postinst" from the partition.

Types

type FlashOptions

type FlashOptions struct {
	DisableRootfsVerification bool // whether to disable rootfs verification
	ClobberStateful           bool // whether to clobber the stateful partition
	ClearTpmOwner             bool // whether to clean tpm owner on reboot
}

FlashOptions for Request. Unlike Request.Bucket, Request.Directory, these are determined solely by parsing the command line without further processing.

type Request

type Request struct {
	// Base time when the flash started, for logging.
	ElapsedTimeWhenSent time.Duration

	Token    *oauth2.Token
	Artifact *artifact.Artifact

	FlashOptions
}

Request contains everything needed to perform a flash.

func (*Request) Client

func (req *Request) Client(ctx context.Context) (*storage.Client, error)

Client creates a storage.Client from req.

func (*Request) Flash

func (req *Request) Flash(ctx context.Context, client *storage.Client, rw *progress.ReportingWriter, image string, partition string) error

Flash a partition with imageGz to partition.

func (*Request) FlashStateful

func (req *Request) FlashStateful(ctx context.Context, client *storage.Client, rw *progress.ReportingWriter, clobber bool) error

FlashStateful flashes the stateful partition.

type Result

type Result struct {
	RetryDisableRootfsVerification bool
	RetryClearTpmOwner             bool
}

Jump to

Keyboard shortcuts

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