typec

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

Documentation

Overview

Package typec contains tests which exercise USB Type-C connector related functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Basic

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

Basic does the following: - Simulate a servo disconnect. - Reconfigure the servo as DP device supporting pin assignment C. - Reconnect the servo. - Verify that the kernel recognizes the servo partner and can parse its DP VDO data.

It then repeats the process with the servo configured as a pin assignment D DP device.

Since it's not possible to verify that the DUT detected a disconnect (since the DUT loses its network connection during servo disconnect), we check the DUT uptime before and after the test. If the end time is greater than the start time, we can infer that the partner detected was due to a hotplug and not at reboot (since the partner PD data gets parsed only once on each connect).

func HpdWake

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

HpdWake does the following: - Simulate a servo disconnect. - Reconfigure the servo as a DP device with HPD "low". - Reconnect the servo. - Verify that the kernel recognizes the servo partner and DP alt mode. - Measure the EC device wake event count. - Suspend the DUT. - Make the servo's HPD state to "high". - Check that the DUT woke, count the EC wake events and confirm that the wake count increased.

func ModeReboot

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

ModeReboot does the following: - Log in on a DUT. - Validate TBT alt mode is working correctly. - Reboot the system. - Validate that we are *not* in TBT alt mode and that USB+DP mode is working correctly.

This test requires the following H/W topology to run.

  DUT ------> Thunderbolt3 (>= Titan Ridge) dock -----> DP monitor.
(USB4)

func TBTPassiveActiveCable

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

TBTPassiveActiveCable checks connected thunderbolt cable is active cable or passive cable. Here, "TBT" means Thunderbolt.

Types

This section is empty.

Directories

Path Synopsis
Package typecutils contains constants & helper functions used by the tests in the typec directory.
Package typecutils contains constants & helper functions used by the tests in the typec directory.

Jump to

Keyboard shortcuts

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