Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
metadata:
name: DeviceTree_HW_Capability_Validation
format: "Lava-Test Test Definition 1.0"
description: "Validate runtime device-tree identity, enabled hardware controllers, driver binding, and kernel health"
description: "Validate runtime device-tree identity, controller binding, PMIC GLINK/UCSI, thermal, power, and kernel health"
os:
- linux
scope:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ attached peripherals.
| `boot` | Optional `/chosen` `stdout-path` and `bootargs`, including stdout target resolution through `/aliases` |
| `cpu-memory` | Enabled DT CPU nodes cover kernel-exposed CPUs; memory nodes expose `reg`; reserved-memory children expose `reg` or `size`; declared NUMA node identifiers are inventoried |
| `interrupts` | Readable `/proc/interrupts`, interrupt-controller providers, and GIC, PDC, and GPIO structural or runtime evidence as appropriate |
| `fabric` | Clock, reset, regulator, mailbox, interconnect, RPMh, LLCC, and SMMU provider structure with platform-driver evidence where applicable |
| `fabric` | Clock, reset, regulator, power-domain, mailbox, interconnect, RPMh, LLCC, and SMMU provider structure with platform-driver evidence where applicable; optional regulator and generic power-domain debugfs summaries are retained when exposed |
| `storage` | Enabled UFS, SDHCI, and SPI controller bindings; SPI-NOR DT inventory; optional NVMe and MTD runtime evidence |
| `usb` | Enabled USB controller binding plus optional host and gadget-controller runtime evidence, including role-state reporting when host mode is inactive |
| `usb` | Enabled USB controller binding plus optional host and gadget-controller runtime evidence, including role-state reporting when host mode is inactive; enabled Qualcomm PMIC GLINK declarations require a bound parent, UCSI auxiliary device, and Type-C port exposure |
| `pcie` | Enabled PCIe controller binding plus optional endpoint enumeration evidence |
| `network` | Enabled Ethernet controller binding, non-virtual network-runtime evidence, and separate Wi-Fi/Bluetooth DT inventory without requiring an external module or link |
| `multimedia` | Display and GPU binding, audio and camera DT inventory, and optional DRM and ALSA runtime evidence |
| `remoteproc` | Enabled Qualcomm remoteproc inventory, memory-region and firmware-name evidence, firmware provisioning status, and runtime instance correlation |
| `security` | OP-TEE, SCM, TPM, and KVM EL2 DT inventory with optional TEE, TPM, and KVM runtime evidence, distinguishing a likely Qualcomm TEE flow from declared OP-TEE |
| `health` | Captured relevant DT and controller probe failures before and after validation |
| `health` | Captured relevant DT and controller probe failures plus capability-gated thermal-zone readings and cooling-device exposure. Optional or aggregate zones without a current temperature are reported separately when other readable zones establish runtime health |

Existing focused suites remain responsible for active functional testing. For
example, PCIe endpoint enumeration, Ethernet traffic, audio capture,
Expand All @@ -38,12 +38,15 @@ interconnect voting, and EDAC counter behavior are not duplicated here.
- **PASS**: Required DT structure is present and a discovered controller is bound.
- **SKIP**: The runtime tree does not expose an optional capability, remoteproc
firmware is not provisioned, an external fixture or USB role is inactive, a
framework provider has no direct runtime binding, or a required base utility
is absent.
framework provider has no direct runtime binding, optional debugfs evidence
is unavailable, an optional or aggregate thermal zone has no current
temperature, or a required base utility is absent.
- **FAIL**: Required DT identity, CPU, or memory data is invalid; a hardware
controller that requires an MMIO register range lacks `reg`; or the captured
kernel log reports relevant failures. Framework children and firmware nodes
without direct platform-device representation are reported as **SKIP**.
kernel log reports relevant failures. Enabled PMIC GLINK/UCSI or thermal
capabilities that do not produce their required runtime objects also fail.
Framework children and firmware nodes without direct platform-device
representation are reported as **SKIP**.

An attached USB device, PCIe endpoint, Ethernet cable, display, camera, or
wireless module is not required. Those are fixture-level validations.
Expand Down Expand Up @@ -71,6 +74,13 @@ comma-separated set. The accepted area names correspond to the table above:
./run.sh --list-areas
```

Run only the newly extended validation areas:

```sh
./run.sh --area usb
./run.sh --area fabric,health
```

The suite builds compatible, provider-property, and platform-device indexes
once at startup, then reuses them for each selected area. This avoids repeated
full device-tree and platform-bus scans. It deliberately does not run checks in
Expand All @@ -88,7 +98,32 @@ results/DeviceTree_HW_Capability_Validation/

This directory also contains `dt_compatible_index.log`,
`dt_property_index.log`, `platform_device_index.log`, and
`dt_area_summary.tsv`.
`dt_area_summary.tsv`. Capability-dependent runs additionally retain
`pmic_glink_nodes.log`, `typec_ports.log`, `thermal_zones.log`,
`cooling_devices.log`, `regulator_summary.log`, and
`power_domain_summary.log` when the corresponding runtime interfaces exist.

Check the final result, area summary, and capability evidence:

```sh
cat DeviceTree_HW_Capability_Validation.res
cat results/DeviceTree_HW_Capability_Validation/dt_area_summary.tsv
cat results/DeviceTree_HW_Capability_Validation/pmic_glink_nodes.log
cat results/DeviceTree_HW_Capability_Validation/typec_ports.log
cat results/DeviceTree_HW_Capability_Validation/thermal_zones.log
cat results/DeviceTree_HW_Capability_Validation/cooling_devices.log
cat results/DeviceTree_HW_Capability_Validation/dmesg_errors.log
```

The optional regulator and power-domain summaries can be checked when debugfs
exposes them:

```sh
test -r results/DeviceTree_HW_Capability_Validation/regulator_summary.log && \
cat results/DeviceTree_HW_Capability_Validation/regulator_summary.log
test -r results/DeviceTree_HW_Capability_Validation/power_domain_summary.log && \
cat results/DeviceTree_HW_Capability_Validation/power_domain_summary.log
```

## LAVA

Expand Down
34 changes: 24 additions & 10 deletions Runner/suites/Kernel/Baseport/USB/usb_msd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,18 @@ SPDX-License-Identifier: BSD-3-Clause

## Overview

This shell script executes on the DUT (Device-Under-Test) and verifies USB Mass Storage Devices (MSD).
This shell script executes on the DUT and validates USB mass-storage devices.
The test validation scope includes:
- Successful enumeration of MSD devices
- For each device:
- Determine and report bound transport driver (`uas` or `usb-storage`) from the MSD interface for debug visibility
- Determine and report the bound transport driver
- Discover associated block devices via sysfs
- If block device is missing, print device information to facilitate debug
- Print a table of enumerated devices:
- Wait a bounded time for asynchronous block-device creation
- Read 512 bytes from each block device by default without modifying media

```
DEVICE VID:PID DRIVER PRODUCT
-------------------------------------------------------------------------------
<dev> <vid:pid> <uas|usb-storage> <product>
```
The test PASS requires all detected MSD devices to have associated block device nodes.
The test passes only when every detected MSD interface is driver-bound, exposes
its block device, and completes the enabled read validation. A missing external
MSD fixture is reported as `SKIP`.
---

## Setup
Expand All @@ -45,3 +42,20 @@ The test PASS requires all detected MSD devices to have associated block device
cd Runner
./run-test.sh usb_msd
```

Run directly with defaults:

```sh
cd Runner/suites/Kernel/Baseport/USB/usb_msd
./run.sh
```

Disable the read-only media check or adjust enumeration wait time:

```sh
./run.sh --read-verify 0 --wait-seconds 20
```

Equivalent environment variables are `USB_MSD_READ_VERIFY` and
`USB_MSD_WAIT_SECONDS`. Runtime evidence is retained under
`results/usb_msd/`.
Loading
Loading