platform

package
v0.0.0-...-9474aff Latest Latest
Warning

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

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

Documentation

Overview

Package platform contains local Tast tests that exercise assorted non-Chrome userspace portions of Chrome OS.

If a more-specific test package already exists, please use it instead of this one.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDiskSpace

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

func CheckProcesses

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

func CheckTracefsInstances

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

CheckTracefsInstances checks that we don't have more tracefs instances than the number of processors as a warning of potential boot performance issues with SELinux labeling.

func ChromeMlocked

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

func CrosDisks

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

func CrosDisksArchive

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

func CrosDisksFilesystem

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

func CrosDisksFormat

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

func CrosDisksRename

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

func CrosDisksSSHFS

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

func CrosID

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

func CrosRuntimeProbeBattery

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

CrosRuntimeProbeBattery checks if the battery names in cros-label are consistent with probed names from runtime_probe

func CrosRuntimeProbeCamera

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

CrosRuntimeProbeCamera checks if the camera component names in cros-label are consistent with probed names from runtime_probe.

func CrosRuntimeProbeEdid

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

CrosRuntimeProbeEdid checks if the edid names in cros-label are consistent with probed names from runtime_probe.

func CrosRuntimeProbeInputDevice

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

CrosRuntimeProbeInputDevice checks if the input_device names in cros-label are consistent with probed names from runtime_probe.

func CrosRuntimeProbeMemory

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

CrosRuntimeProbeMemory checks if the memory names in cros-label are consistent with probed names from runtime_probe.

func CrosRuntimeProbeNetwork

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

CrosRuntimeProbeNetwork checks if the network names in cros-label are consistent with probed names from runtime_probe.

func CrosRuntimeProbeStorage

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

CrosRuntimeProbeStorage checks if the storage names in cros-label are consistent with probed names from runtime_probe

func Crossystem

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

Crossystem checks that the "crossystem" command's basic functionality. This includes commands that rely on the presence and correct initialization of the chromeos driver (drivers/platform/chromeos.c) in the kernel

func DLCService

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

func DLCServiceCrosDeploy

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

func DLCServicePreloading

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

func DMVerity

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

func Drivefs

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

func DumpVPDLog

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

func Firewall

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

func HeavyMemoryUser

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

func Histograms

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

func LocalPerfettoTBMTracedProbes

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

LocalPerfettoTBMTracedProbes tests perfetto trace collection on traced_probes and process the trace result with trace_processor_shell.

func MLServiceBootstrap

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

func Memd

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

func MemoryPressure

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

MemoryPressure is the main test function.

func MemoryPressureModerate

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

func MemoryPressureRecorder

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

MemoryPressureRecorder runs WPR in recording mode.

func MemoryStressBasic

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

func MempressureUser

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

func Mosys

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

func Mtpd

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

func NNAPI

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

func NNAPIDriver

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

func P2PClient

func P2PClient(fullCtx context.Context, s *testing.State)

func P2PServer

func P2PServer(fullCtx context.Context, s *testing.State)

func PartitionSizes

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

func PerfETM

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

PerfETM verifies that cs_etm PMU event is supported and we can collect ETM data and convert it into the last branch samples. The test verifies ETM strobing and ETM tracing in per-thread and system-wide perf modes.

func PerfettoBatteryDataSource

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

PerfettoBatteryDataSource checks that the "linux.sysfs_power" data source collects battery counters on the device.

func PerfettoChromeConsumer

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

PerfettoChromeConsumer tests Chrome as a perfetto trace consumer. The test enables the "EnablePerfettoSystemTracing" feature flag for Chrome and then collects a system-wide trace using the system backend connected to traced, the system tracing service daemon.

func PerfettoChromeProducer

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

PerfettoChromeProducer tests Chrome as a perfetto trace producer. The test enables the "EnablePerfettoSystemTracing" feature flag for Chrome and then checks if traced sees multiple Chrome producers connected.

func PerfettoSystemTracing

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

PerfettoSystemTracing tests perfetto system-wide trace collection.

func PerfettoTrackEventsPidNS

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

PerfettoTrackEventsPidNS tests tracing PID-namespaced processes. The test runs the perfetto_simple_producer binary within a PID namespace (starting with minijail -p) and checks whether the track events are associated with the root-level PID.

func ReportDiskUsage

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

func Resourced

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

func RootPartitionsNotMounted

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

func ScreenLatency

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

ScreenLatency uses a companion Android app to measure latency between a key press being simulated and a character appearing on the screen.

TODO(mblsha): See the http://go/project-slate-handover for future direction info.

func Spaced

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

func StorageWearoutDetect

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

func TPMResponsive

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

Types

type BootPerfService

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

BootPerfService implements tast.cros.platform.BootPerfService

func (*BootPerfService) DisableBootchart

func (*BootPerfService) DisableBootchart(ctx context.Context, _ *empty.Empty) (*empty.Empty, error)

DisableBootchart Disables bootchart by removing "cros_bootchart" from kernel arguments.

func (*BootPerfService) EnableBootchart

func (*BootPerfService) EnableBootchart(ctx context.Context, _ *empty.Empty) (*empty.Empty, error)

EnableBootchart enables bootchart by adding "cros_bootchart" to kernel arguments.

func (*BootPerfService) GetBootPerfMetrics

GetBootPerfMetrics gathers recorded timing and disk usage statistics during boot time. The test calculates some or all of the following metrics:

  • seconds_kernel_to_startup
  • seconds_kernel_to_startup_done
  • seconds_kernel_to_chrome_exec
  • seconds_kernel_to_chrome_main
  • seconds_kernel_to_signin_start
  • seconds_kernel_to_signin_wait
  • seconds_kernel_to_signin_users
  • seconds_kernel_to_login
  • seconds_kernel_to_network
  • seconds_startup_to_chrome_exec
  • seconds_chrome_exec_to_login
  • rdbytes_kernel_to_startup
  • rdbytes_kernel_to_startup_done
  • rdbytes_kernel_to_chrome_exec
  • rdbytes_kernel_to_chrome_main
  • rdbytes_kernel_to_login
  • rdbytes_startup_to_chrome_exec
  • rdbytes_chrome_exec_to_login
  • seconds_power_on_to_kernel
  • seconds_power_on_to_login
  • seconds_shutdown_time
  • seconds_reboot_time
  • seconds_reboot_error

func (*BootPerfService) GetBootPerfRawData

GetBootPerfRawData gathers raw data used in calculating boot perf metrics for debugging.

type PerfettoTraceBasedMetricsService

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

PerfettoTraceBasedMetricsService implements tast.cros.platform.PerfettoTraceBasedMetricsService

func (*PerfettoTraceBasedMetricsService) GeneratePerfettoTrace

GeneratePerfettoTrace uses perfetto to generate trace and send back to the host.

type UpstartService

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

UpstartService implements tast.cros.platform.UpstartService.

func (*UpstartService) CheckJob

func (*UpstartService) CheckJob(ctx context.Context, request *platform.CheckJobRequest) (*empty.Empty, error)

CheckJob validates that the given upstart job is running.

func (*UpstartService) DisableJob

func (*UpstartService) DisableJob(ctx context.Context, request *platform.DisableJobRequest) (*empty.Empty, error)

DisableJob disables an upstart job, which takes effect on the next reboot.

func (*UpstartService) EnableJob

func (*UpstartService) EnableJob(ctx context.Context, request *platform.EnableJobRequest) (*empty.Empty, error)

EnableJob enables an upstart job that was previously disabled.

func (*UpstartService) IsJobEnabled

IsJobEnabled checks if the given upstart job is enabled.

func (*UpstartService) JobStatus

JobStatus returns the current status of job. If the PID is unavailable (i.e. the process is not running), 0 will be returned. An error will be returned if the job is unknown (i.e. it has no config in /etc/init).

func (*UpstartService) StartJob

func (*UpstartService) StartJob(ctx context.Context, request *platform.StartJobRequest) (*empty.Empty, error)

StartJob starts job. If it is already running, this returns an error.

func (*UpstartService) StopJob

func (*UpstartService) StopJob(ctx context.Context, request *platform.StopJobRequest) (*empty.Empty, error)

StopJob stops job. If it is not currently running, this is a no-op.

Directories

Path Synopsis
Package bootperf provides constants and common utilities for test platform.BootPerf.
Package bootperf provides constants and common utilities for test platform.BootPerf.
Package crosdisks provides a series of tests to verify CrosDisks' D-Bus API behavior.
Package crosdisks provides a series of tests to verify CrosDisks' D-Bus API behavior.
Package dlc provides functionality used by several DLC tests but not necessary for tests that simply use DLC.
Package dlc provides functionality used by several DLC tests but not necessary for tests that simply use DLC.
Package fsinfo reports information about filesystems on behalf of tests.
Package fsinfo reports information about filesystems on behalf of tests.
Package memorystress opens synthetic pages to create memory pressure.
Package memorystress opens synthetic pages to create memory pressure.
Package nebraska provides start/stop functions for nebraska.
Package nebraska provides start/stop functions for nebraska.
Package p2p contains the common code for P2P tests.
Package p2p contains the common code for P2P tests.
Package runtimeprobe provides utilities for runtime_probe tests.
Package runtimeprobe provides utilities for runtime_probe tests.
Package screenlatency contains functionality to communicate with a companion Android app to measure the latency between a simulated key press and when it's actually drawn on screen.
Package screenlatency contains functionality to communicate with a companion Android app to measure the latency between a simulated key press and when it's actually drawn on screen.
Package verity provides variation of dm-verity tests and its utilities.
Package verity provides variation of dm-verity tests and its utilities.

Jump to

Keyboard shortcuts

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