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 ¶
- func CheckDiskSpace(ctx context.Context, s *testing.State)
- func CheckProcesses(ctx context.Context, s *testing.State)
- func CheckTracefsInstances(ctx context.Context, s *testing.State)
- func ChromeMlocked(ctx context.Context, s *testing.State)
- func CrosDisks(ctx context.Context, s *testing.State)
- func CrosDisksArchive(ctx context.Context, s *testing.State)
- func CrosDisksFilesystem(ctx context.Context, s *testing.State)
- func CrosDisksFormat(ctx context.Context, s *testing.State)
- func CrosDisksRename(ctx context.Context, s *testing.State)
- func CrosDisksSSHFS(ctx context.Context, s *testing.State)
- func CrosID(ctx context.Context, s *testing.State)
- func CrosRuntimeProbeBattery(ctx context.Context, s *testing.State)
- func CrosRuntimeProbeCamera(ctx context.Context, s *testing.State)
- func CrosRuntimeProbeEdid(ctx context.Context, s *testing.State)
- func CrosRuntimeProbeInputDevice(ctx context.Context, s *testing.State)
- func CrosRuntimeProbeMemory(ctx context.Context, s *testing.State)
- func CrosRuntimeProbeNetwork(ctx context.Context, s *testing.State)
- func CrosRuntimeProbeStorage(ctx context.Context, s *testing.State)
- func Crossystem(ctx context.Context, s *testing.State)
- func DLCService(ctx context.Context, s *testing.State)
- func DLCServiceCrosDeploy(ctx context.Context, s *testing.State)
- func DLCServicePreloading(ctx context.Context, s *testing.State)
- func DMVerity(ctx context.Context, s *testing.State)
- func Drivefs(ctx context.Context, s *testing.State)
- func DumpVPDLog(ctx context.Context, s *testing.State)
- func Firewall(ctx context.Context, s *testing.State)
- func HeavyMemoryUser(ctx context.Context, s *testing.State)
- func Histograms(ctx context.Context, s *testing.State)
- func LocalPerfettoTBMTracedProbes(ctx context.Context, s *testing.State)
- func MLServiceBootstrap(ctx context.Context, s *testing.State)
- func Memd(ctx context.Context, s *testing.State)
- func MemoryPressure(ctx context.Context, s *testing.State)
- func MemoryPressureModerate(ctx context.Context, s *testing.State)
- func MemoryPressureRecorder(ctx context.Context, s *testing.State)
- func MemoryStressBasic(ctx context.Context, s *testing.State)
- func MempressureUser(ctx context.Context, s *testing.State)
- func Mosys(ctx context.Context, s *testing.State)
- func Mtpd(ctx context.Context, s *testing.State)
- func NNAPI(ctx context.Context, s *testing.State)
- func NNAPIDriver(ctx context.Context, s *testing.State)
- func P2PClient(fullCtx context.Context, s *testing.State)
- func P2PServer(fullCtx context.Context, s *testing.State)
- func PartitionSizes(ctx context.Context, s *testing.State)
- func PerfETM(ctx context.Context, s *testing.State)
- func PerfettoBatteryDataSource(ctx context.Context, s *testing.State)
- func PerfettoChromeConsumer(ctx context.Context, s *testing.State)
- func PerfettoChromeProducer(ctx context.Context, s *testing.State)
- func PerfettoSystemTracing(ctx context.Context, s *testing.State)
- func PerfettoTrackEventsPidNS(ctx context.Context, s *testing.State)
- func ReportDiskUsage(ctx context.Context, s *testing.State)
- func Resourced(ctx context.Context, s *testing.State)
- func RootPartitionsNotMounted(ctx context.Context, s *testing.State)
- func ScreenLatency(ctx context.Context, s *testing.State)
- func Spaced(ctx context.Context, s *testing.State)
- func StorageWearoutDetect(ctx context.Context, s *testing.State)
- func TPMResponsive(ctx context.Context, s *testing.State)
- type BootPerfService
- func (*BootPerfService) DisableBootchart(ctx context.Context, _ *empty.Empty) (*empty.Empty, error)
- func (*BootPerfService) EnableBootchart(ctx context.Context, _ *empty.Empty) (*empty.Empty, error)
- func (*BootPerfService) GetBootPerfMetrics(ctx context.Context, _ *empty.Empty) (*platform.GetBootPerfMetricsResponse, error)
- func (*BootPerfService) GetBootPerfRawData(ctx context.Context, _ *empty.Empty) (*platform.GetBootPerfRawDataResponse, error)
- type PerfettoTraceBasedMetricsService
- type UpstartService
- func (*UpstartService) CheckJob(ctx context.Context, request *platform.CheckJobRequest) (*empty.Empty, error)
- func (*UpstartService) DisableJob(ctx context.Context, request *platform.DisableJobRequest) (*empty.Empty, error)
- func (*UpstartService) EnableJob(ctx context.Context, request *platform.EnableJobRequest) (*empty.Empty, error)
- func (*UpstartService) IsJobEnabled(ctx context.Context, request *platform.IsJobEnabledRequest) (*platform.IsJobEnabledResponse, error)
- func (*UpstartService) JobStatus(ctx context.Context, request *platform.JobStatusRequest) (*platform.JobStatusResponse, error)
- func (*UpstartService) StartJob(ctx context.Context, request *platform.StartJobRequest) (*empty.Empty, error)
- func (*UpstartService) StopJob(ctx context.Context, request *platform.StopJobRequest) (*empty.Empty, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckTracefsInstances ¶
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 CrosRuntimeProbeBattery ¶
CrosRuntimeProbeBattery checks if the battery names in cros-label are consistent with probed names from runtime_probe
func CrosRuntimeProbeCamera ¶
CrosRuntimeProbeCamera checks if the camera component names in cros-label are consistent with probed names from runtime_probe.
func CrosRuntimeProbeEdid ¶
CrosRuntimeProbeEdid checks if the edid names in cros-label are consistent with probed names from runtime_probe.
func CrosRuntimeProbeInputDevice ¶
CrosRuntimeProbeInputDevice checks if the input_device names in cros-label are consistent with probed names from runtime_probe.
func CrosRuntimeProbeMemory ¶
CrosRuntimeProbeMemory checks if the memory names in cros-label are consistent with probed names from runtime_probe.
func CrosRuntimeProbeNetwork ¶
CrosRuntimeProbeNetwork checks if the network names in cros-label are consistent with probed names from runtime_probe.
func CrosRuntimeProbeStorage ¶
CrosRuntimeProbeStorage checks if the storage names in cros-label are consistent with probed names from runtime_probe
func Crossystem ¶
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 LocalPerfettoTBMTracedProbes ¶
LocalPerfettoTBMTracedProbes tests perfetto trace collection on traced_probes and process the trace result with trace_processor_shell.
func MemoryPressure ¶
MemoryPressure is the main test function.
func MemoryPressureRecorder ¶
MemoryPressureRecorder runs WPR in recording mode.
func PerfETM ¶
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 ¶
PerfettoBatteryDataSource checks that the "linux.sysfs_power" data source collects battery counters on the device.
func PerfettoChromeConsumer ¶
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 ¶
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 ¶
PerfettoSystemTracing tests perfetto system-wide trace collection.
func PerfettoTrackEventsPidNS ¶
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 ScreenLatency ¶
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.
Types ¶
type BootPerfService ¶
type BootPerfService struct {
// contains filtered or unexported fields
}
BootPerfService implements tast.cros.platform.BootPerfService
func (*BootPerfService) DisableBootchart ¶
DisableBootchart Disables bootchart by removing "cros_bootchart" from kernel arguments.
func (*BootPerfService) EnableBootchart ¶
EnableBootchart enables bootchart by adding "cros_bootchart" to kernel arguments.
func (*BootPerfService) GetBootPerfMetrics ¶
func (*BootPerfService) GetBootPerfMetrics(ctx context.Context, _ *empty.Empty) (*platform.GetBootPerfMetricsResponse, error)
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 ¶
func (*BootPerfService) GetBootPerfRawData(ctx context.Context, _ *empty.Empty) (*platform.GetBootPerfRawDataResponse, error)
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 ¶
func (*PerfettoTraceBasedMetricsService) GeneratePerfettoTrace(req *platform.GeneratePerfettoTraceRequest, sender platform.PerfettoTraceBasedMetricsService_GeneratePerfettoTraceServer) error
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 ¶
func (*UpstartService) IsJobEnabled(ctx context.Context, request *platform.IsJobEnabledRequest) (*platform.IsJobEnabledResponse, error)
IsJobEnabled checks if the given upstart job is enabled.
func (*UpstartService) JobStatus ¶
func (*UpstartService) JobStatus(ctx context.Context, request *platform.JobStatusRequest) (*platform.JobStatusResponse, error)
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.
Source Files ¶
- boot_perf_service.go
- check_disk_space.go
- check_processes.go
- check_tracefs_instances.go
- chrome_mlocked.go
- cros_disks.go
- cros_disks_archive.go
- cros_disks_filesystem.go
- cros_disks_format.go
- cros_disks_rename.go
- cros_disks_sshfs.go
- cros_runtime_probe_battery.go
- cros_runtime_probe_camera.go
- cros_runtime_probe_edid.go
- cros_runtime_probe_input_device.go
- cros_runtime_probe_memory.go
- cros_runtime_probe_network.go
- cros_runtime_probe_storage.go
- crosid.go
- crossystem.go
- dlcservice.go
- dlcservice_cros_deploy.go
- dlcservice_preloading.go
- dm_verity.go
- doc.go
- drivefs.go
- dump_vpd_log.go
- firewall.go
- heavy_memory_user.go
- histograms.go
- local_perfetto_tbm_traced_probes.go
- memd.go
- memory_pressure.go
- memory_pressure_moderate.go
- memory_pressure_recorder.go
- memory_stress_basic.go
- mempressure_user.go
- ml_service_bootstrap.go
- mosys.go
- mtpd.go
- nnapi.go
- nnapi_driver.go
- p2p_client.go
- p2p_server.go
- partition_sizes.go
- perf_etm.go
- perfetto_battery_data_source.go
- perfetto_chrome_consumer.go
- perfetto_chrome_producer.go
- perfetto_system_tracing.go
- perfetto_trace_based_metrics_service.go
- perfetto_track_events_pid_ns.go
- report_disk_usage.go
- resourced.go
- root_partitions_not_mounted.go
- screen_latency.go
- spaced.go
- storage_wearout_detect.go
- tpm_responsive.go
- upstart_service.go
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. |