firmware

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: 42 Imported by: 0

Documentation

Overview

Package firmware contains local Tast tests that exercise the firmware portion of Chrome OS.

This includes the main EC as well as other ECs such as the fingerprint MCU and corresponds to the chromiumos/platform/ec repository.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ACVP

func ACVP(ctx context.Context, s *testing.State)

ACVP takes a JSON generated by the ACVP server and runs the test cases in it.

func Flashrom

func Flashrom(ctx context.Context, s *testing.State)

Flashrom runs the flashrom utility and confirms that flashrom was able to communicate with a SPI ROM.

func FlashromPerf

func FlashromPerf(ctx context.Context, s *testing.State)

FlashromPerf runs the flashrom utility to verify various expected behaviour is maintained. The function times Flashrom total execution time for a complete probe and read of a given region of the SPI flash.

func FlashromWriteProtect

func FlashromWriteProtect(ctx context.Context, s *testing.State)

func FpUpdaterSucceeded

func FpUpdaterSucceeded(ctx context.Context, s *testing.State)

func FpmcuUnittest

func FpmcuUnittest(ctx context.Context, s *testing.State)

func FwupdDetectPS175

func FwupdDetectPS175(ctx context.Context, s *testing.State)

FwupdDetectPS175 runs the fwupdmgr utility and verifies that the PS175 device is recognized.

func FwupdDetectRTD2142

func FwupdDetectRTD2142(ctx context.Context, s *testing.State)

FwupdDetectRTD2142 runs fwupdmgr and verifies that a RTD2142 is recognized.

func FwupdGetDevices

func FwupdGetDevices(ctx context.Context, s *testing.State)

FwupdGetDevices runs the fwupdmgr utility and verifies that it detects devices in the system.

func FwupdInhibitSuspend

func FwupdInhibitSuspend(ctx context.Context, s *testing.State)

FwupdInhibitSuspend runs the fwupdtool utility and makes sure that the system can suspend before and after, but not during an update.

func FwupdInstallRemote

func FwupdInstallRemote(ctx context.Context, s *testing.State)

FwupdInstallRemote runs the fwupdtool utility and verifies that it can update a device in the system using a remote repository.

func FwupdPluginStartup

func FwupdPluginStartup(ctx context.Context, s *testing.State)

FwupdPluginStartup runs fwupdmgr get-plugins, retrieves the output, and checks that the expected plugins are enabled

func FwupdPowerdUpdateCheck

func FwupdPowerdUpdateCheck(ctx context.Context, s *testing.State)

FwupdPowerdUpdateCheck sets the battery case, runs sequential update commands, and checks that they return with or without errors as appropriate.

func GSCtool

func GSCtool(ctx context.Context, s *testing.State)

GSCtool runs the gsctool utility and confirms that gsctool was able to communicate with the GSC (Google Security Chip) by querying its version.

func SHANI

func SHANI(ctx context.Context, s *testing.State)

Types

type BiosService

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

BiosService implements tast.cros.firmware.BiosService.

func (*BiosService) BackupImageSection

func (*BiosService) BackupImageSection(ctx context.Context, req *pb.FWBackUpSection) (*pb.FWBackUpInfo, error)

BackupImageSection dumps the image region into temporary file locally and returns its path.

func (*BiosService) ClearAndSetGBBFlags

func (bs *BiosService) ClearAndSetGBBFlags(ctx context.Context, req *pb.GBBFlagsState) (*empty.Empty, error)

ClearAndSetGBBFlags clears and sets specified GBB flags, leaving the rest unchanged.

func (*BiosService) CorruptECSection

func (bs *BiosService) CorruptECSection(ctx context.Context, req *pb.CorruptSection) (*empty.Empty, error)

CorruptECSection writes garbage over part of the specified firmware section.

func (*BiosService) EnableAPSoftwareWriteProtect

func (bs *BiosService) EnableAPSoftwareWriteProtect(ctx context.Context, req *empty.Empty) (*empty.Empty, error)

EnableAPSoftwareWriteProtect enables the AP software write protect.

func (*BiosService) GetGBBFlags

func (*BiosService) GetGBBFlags(ctx context.Context, req *empty.Empty) (*pb.GBBFlagsState, error)

GetGBBFlags gets the flags that are cleared and set.

func (*BiosService) RestoreImageSection

func (bs *BiosService) RestoreImageSection(ctx context.Context, req *pb.FWBackUpInfo) (*empty.Empty, error)

RestoreImageSection restores image region from temporary file locally and restores fw with it.

type FpUpdaterService

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

FpUpdaterService implements tast.cros.firmware.FpUpdaterService.

func (*FpUpdaterService) ReadUpdaterLogs

ReadUpdaterLogs reads the latest and previous logs from the fingerprint firmware updater.

type SerialPortService

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

SerialPortService implements tast.cros.firmware.SerialPortService

func (*SerialPortService) Close

func (s *SerialPortService) Close(ctx context.Context, in *pb.PortId) (*empty.Empty, error)

Close handles the Close rpc call.

func (*SerialPortService) Flush

func (s *SerialPortService) Flush(ctx context.Context, in *pb.PortId) (*empty.Empty, error)

Flush handles the Flush rpc call.

func (*SerialPortService) Open

Open handles the Open rpc call.

func (*SerialPortService) Read

Read handles the Read rpc call.

func (*SerialPortService) Write

Write handles the Write rpc call.

type UtilsService

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

UtilsService implements tast.cros.firmware.UtilsService.

func (*UtilsService) BlockingSync

func (*UtilsService) BlockingSync(ctx context.Context, req *empty.Empty) (*empty.Empty, error)

BlockingSync syncs the root device and internal device.

func (*UtilsService) CloseChrome

func (us *UtilsService) CloseChrome(ctx context.Context, req *empty.Empty) (*empty.Empty, error)

CloseChrome closes a Chrome session and cleans up the resources obtained by NewChrome.

func (*UtilsService) EvalTabletMode

func (us *UtilsService) EvalTabletMode(ctx context.Context, req *empty.Empty) (*fwpb.EvalTabletModeResponse, error)

EvalTabletMode evaluates tablet mode status.

func (*UtilsService) FindPhysicalKeyboard

func (us *UtilsService) FindPhysicalKeyboard(ctx context.Context, req *empty.Empty) (*fwpb.FindPhysicalKeyboardResponse, error)

func (*UtilsService) FindSingleNode

func (us *UtilsService) FindSingleNode(ctx context.Context, req *fwpb.NodeElement) (*empty.Empty, error)

FindSingleNode finds the specific UI node based on the passed in element.

func (*UtilsService) GetDetachableBaseValue

func (us *UtilsService) GetDetachableBaseValue(ctx context.Context, req *empty.Empty) (*fwpb.CrosConfigResponse, error)

GetDetachableBaseValue retrieves the values of a few detachable-base attributes, such as product-id, usb-path, and vendor-id. The values are saved and returned in a list.

func (*UtilsService) NewChrome

func (us *UtilsService) NewChrome(ctx context.Context, req *empty.Empty) (*empty.Empty, error)

NewChrome starts a new Chrome session and logs in as a test user.

func (*UtilsService) PerformSpeedometerTest

func (us *UtilsService) PerformSpeedometerTest(ctx context.Context, req *empty.Empty) (*fwpb.SpeedometerResponse, error)

PerformSpeedometerTest runs the speedometer test on one external website, and returns the result value.

func (*UtilsService) ReadServoKeyboard

ReadServoKeyboard reads from the servo's keyboard emulator.

func (*UtilsService) ReuseChrome

func (us *UtilsService) ReuseChrome(ctx context.Context, req *empty.Empty) (*empty.Empty, error)

ReuseChrome reuses the existing Chrome session if there's already one.

Directories

Path Synopsis
Package fwupd contains utils to exercise the fwupd portion of Chrome OS.
Package fwupd contains utils to exercise the fwupd portion of Chrome OS.

Jump to

Keyboard shortcuts

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