You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
3
+
SPDX-License-Identifier: BSD-3-Clause-Clear
4
+
5
+
## Overview
6
+
This test case validates the System Trace Macrocell (STM) functionality on the target device by configuring the STM source, enabling tracing, and capturing trace data. It ensures that the STM infrastructure is correctly initialized and capable of generating trace output.
7
+
8
+
## Test Performs :
9
+
1. Verifies presence of required kernel configurations
10
+
2. Mounts **configfs** and **debugfs**
11
+
3. Loads STM-related kernel modules
12
+
4. configures STM policy directories
13
+
5. Enables ETF sink and STM source
14
+
6. Captures and validates trace output
15
+
16
+
## Usage
17
+
Instructions:
18
+
1.**Copy repo to Target Device**: Use `scp` to transfer the scripts from the host to the target device. The scripts should be copied to any directory on the target device.
19
+
2.**Verify Transfer**: Ensure that the repo has been successfully copied to the target device.
20
+
3.**Run Scripts**: Navigate to the directory where these files are copied on the target device and execute the scripts as needed.
21
+
22
+
Run the etm_trace test using:
23
+
---
24
+
25
+
#### Quick Example
26
+
```sh
27
+
git clone <this-repo>
28
+
cd<this-repo>
29
+
scp -r common Runner user@target_device_ip:<Path in device>
30
+
ssh user@target_device_ip
31
+
cd<Path in device>/Runner && ./run-test.sh stm_cpu
32
+
```
33
+
---
34
+
35
+
## Prerequisites
36
+
1. Required kernel configs must be enabled:
37
+
CONFIG_STM_PROTO_BASIC
38
+
CONFIG_STM_PROTO_SYS_T
39
+
CONFIG_STM_DUMMY
40
+
CONFIG_STM_SOURCE_CONSOLE
41
+
CONFIG_STM_SOURCE_HEARTBEAT
42
+
2. Root access is required to mount filesystems and load kernel modules.
43
+
3. init_env and functestlib.sh must be present and correctly configured.
44
+
---
45
+
46
+
## Result Format
47
+
Test result will be saved in `stm_cpu.res` as:
48
+
49
+
## Output
50
+
A .res file is generated in the same directory:
51
+
`stm_cpu PASS` OR `stm_cpu FAIL` OR `stm_cpu SKIP`
52
+
53
+
## Skip Criteria
54
+
1. If the required kernel configuration is missing, the result will be:
0 commit comments