|
1 |
| -Linux Feature Validation Framework |
| 1 | +# Linux Feature Validation Framework |
2 | 2 |
|
3 |
| -Overview |
4 |
| -This repository provides standalone validation scripts designed to test and verify various Linux features, particularly for Qualcomm RB3Gen2 and platforms based on meta-qcom and meta-qcom-distros. |
5 |
| -The tests aim to cover functional, sanity, and smoke validations, and can be easily integrated into CI/CD pipelines. |
| 3 | +## Overview |
| 4 | + |
| 5 | +This repository provides standalone validation scripts designed to test and verify various Linux features, particularly for **Qualcomm RB3Gen2** and platforms based on `meta-qcom` and `meta-qcom-distros`. |
| 6 | +The tests aim to cover functional, sanity, and smoke validations and can be easily integrated into CI/CD pipelines. |
6 | 7 |
|
7 | 8 | These scripts focus on:
|
8 |
| -Core Linux kernel functionality validation. |
9 |
| -Robust error handling and dynamic environment detection. |
10 |
| -Easy extension for continuous integration (CI) frameworks. |
11 |
| -Designed to be run directly on target hardware. |
| 9 | + |
| 10 | +- Core Linux kernel functionality validation |
| 11 | +- Robust error handling and dynamic environment detection |
| 12 | +- Easy extension for continuous integration (CI) frameworks |
| 13 | +- Designed to be run directly on target hardware |
12 | 14 |
|
13 | 15 | ---
|
14 | 16 |
|
15 |
| -Intent |
| 17 | +## Intent |
16 | 18 |
|
17 |
| -Validate Linux kernel and userspace features systematically. |
18 |
| -Offer flexibility to run standalone or plug into any CI/CD system. |
19 |
| -Cover positive and negative scenarios for strong functional validation. |
20 |
| -Support sanity checks, smoke tests, and full system tests. |
21 |
| -Minimal dependencies — usable even on minimal Yocto-based images. |
| 19 | +- Validate Linux kernel and userspace features systematically |
| 20 | +- Offer flexibility to run standalone or plug into any CI/CD system |
| 21 | +- Cover positive and negative scenarios for strong functional validation |
| 22 | +- Support sanity checks, smoke tests, and full system tests |
| 23 | +- Minimal dependencies — usable even on minimal Yocto-based images |
22 | 24 |
|
23 | 25 | ---
|
24 |
| -Usage |
25 | 26 |
|
26 |
| -Instructions |
| 27 | +## Usage |
| 28 | + |
| 29 | +### Instructions |
27 | 30 |
|
28 |
| -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 the /var directory on the target device. |
| 31 | +1. **Copy repo to Target Device** |
| 32 | + Use `scp` to transfer the scripts from the host to the target device. The scripts should be copied to the `/var` directory on the target device. |
29 | 33 |
|
30 |
| -2. Verify Transfer: Ensure that the repo have been successfully copied to the /var directory on the target device. |
| 34 | +2. **Verify Transfer** |
| 35 | + Ensure that the repo has been successfully copied to `/var` on the target. |
31 | 36 |
|
32 |
| -3. Run Scripts: Navigate to the /var directory on the target device and execute the scripts as needed. |
| 37 | +3. **Run Scripts** |
| 38 | + Navigate to `/var` on the target and execute scripts as needed. |
33 | 39 |
|
34 |
| -Run a specific test using: |
35 | 40 | ---
|
36 |
| -Quick Example |
37 |
| -``` |
| 41 | + |
| 42 | +### Quick Example |
| 43 | + |
| 44 | +```sh |
38 | 45 | git clone <this-repo>
|
39 | 46 | cd <this-repo>
|
40 |
| -scp -r common Runner user@target_device_ip:/var |
41 |
| -ssh user@target_device_ip |
| 47 | +scp -r common Runner user@<target_device_ip>:/var |
| 48 | +ssh user@<target_device_ip> |
42 | 49 | cd /var/Runner && ./run-test.sh cpufreq
|
43 | 50 | ```
|
44 |
| -Output: |
45 |
| -``` |
| 51 | + |
| 52 | +#### Output: |
| 53 | + |
| 54 | +```text |
46 | 55 | [INFO] Starting CPU frequency validation...
|
47 | 56 | [PASS] Core 0 validated successfully
|
48 | 57 | [FAIL] Core 1 failed at frequency setting...
|
49 | 58 | ```
|
50 |
| -> Note: Refer https://docs.qualcomm.com/bundle/publicresource/topics/80-70017-254/how_to.html#use-ssh |
51 |
| ---- |
52 |
| -Features |
53 |
| - |
54 |
| -1. Standalone scripts: Shell scripts and C programs. |
55 | 59 |
|
56 |
| -2. Extensible: Easily pluggable into any existing CI framework. |
| 60 | +> **Note**: Refer to [Qualcomm SSH Setup Guide](https://docs.qualcomm.com/bundle/publicresource/topics/80-70017-254/how_to.html#use-ssh) |
57 | 61 |
|
58 |
| -3. Cross-Platform: Tested primarily on Yocto images, Qualcomm platforms. |
| 62 | +--- |
59 | 63 |
|
60 |
| -4. Dynamic: Auto-detects hardware interfaces dynamically wherever possible. |
| 64 | +## Features |
61 | 65 |
|
62 |
| -5. Strong Error Handling: Failure of any validation immediately flagged. |
| 66 | +- **Standalone Scripts**: Shell and C-based validation |
| 67 | +- **Extensible**: Easily pluggable into CI frameworks |
| 68 | +- **Cross-Platform**: Tested on Yocto and Qualcomm platforms |
| 69 | +- **Dynamic Detection**: Hardware interfaces detected dynamically |
| 70 | +- **Robust Error Handling**: Failures flagged immediately |
63 | 71 |
|
64 | 72 | ---
|
65 | 73 |
|
66 |
| -Test Coverage (Examples) |
| 74 | +## Test Coverage (Examples) |
67 | 75 |
|
68 |
| -| Area | Test Type | Status | |
69 |
| -|---------------|----------------|---------------- |
70 |
| -| CPU Frequency (cpufreq) | Functional | Available | |
71 |
| -| Reboot Health Validation | Functional | Available | |
72 |
| -| Audo, USB, Sensors, WiFi, Bluetooth | Sanity | Planned | |
73 |
| -| Camera, GPS, Ethernet, Touchsceen, Display | Functional | Planned | |
| 76 | +| Area | Test Type | Status | |
| 77 | +|------------------------------|------------|------------| |
| 78 | +| CPU Frequency (cpufreq) | Functional | Available | |
| 79 | +| Reboot Health Validation | Functional | Available | |
| 80 | +| Audio, USB, Sensors, WiFi, Bluetooth | Sanity | Planned | |
| 81 | +| Camera, GPS, Ethernet, Touchscreen, Display | Functional | Planned | |
74 | 82 |
|
75 |
| -> Note: Coverage is under active enhancement for broader validation. |
| 83 | +> Coverage is under active enhancement for broader validation. |
76 | 84 |
|
77 | 85 | ---
|
78 | 86 |
|
79 |
| -Extending for CI/CD |
| 87 | +## Extending for CI/CD |
| 88 | + |
| 89 | +These tests can be used as CI jobs in: |
80 | 90 |
|
81 |
| -These standalone tests can be wrapped inside any CI frameworks (like Jenkins, GitLab CI, GitHub Actions). |
82 |
| -Sample integration flow: |
| 91 | +- Jenkins |
| 92 | +- GitLab CI |
| 93 | +- GitHub Actions |
83 | 94 |
|
84 |
| -1. Prepare the DUT (Device Under Test). |
| 95 | +**Flow:** |
| 96 | +1. Prepare the DUT (Device Under Test) |
| 97 | +2. Copy and launch test scripts |
| 98 | +3. Parse results from `stdout` or logs |
| 99 | +4. Mark pass/fail status |
85 | 100 |
|
86 |
| -2. Copy and launch relevant test scripts. |
| 101 | +--- |
87 | 102 |
|
88 |
| -3. Parse results (stdout/logs). |
| 103 | +## Maintainers |
89 | 104 |
|
90 |
| -4. Decide pass/fail status based on outputs. |
| 105 | +- **Qualcomm** – Initial framework |
| 106 | +- **Future contributors** – Enhancements and new validations |
91 | 107 |
|
92 | 108 | ---
|
93 | 109 |
|
94 |
| -Maintainers |
95 |
| - |
96 |
| -Qualcomm - Initial framework |
| 110 | +## License |
97 | 111 |
|
98 |
| -Future contributors - Enhancements & new validations |
| 112 | +``` |
| 113 | +Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. |
| 114 | +SPDX-License-Identifier: BSD-3-Clause-Clear |
| 115 | +``` |
0 commit comments