|
1 | | -Linux Feature Validation Scripts |
| 1 | +Linux Feature Validation Framework |
2 | 2 |
|
3 | 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. |
4 | 6 |
|
5 | | -This repository provides standalone test scripts aimed at functional validation of key Linux system features. |
6 | | -It focuses on sanity, smoke, and functional testing for environments using Qualcomm kernels, meta-qcom, and meta-qcom-distros Yocto layers. |
7 | | - |
8 | | -These scripts are lightweight, extensible, and designed to integrate easily with CI/CD pipelines or run manually for system validation. |
9 | | -The goal is to ensure critical Linux subsystems are operational and behave correctly. |
10 | | - |
| 7 | +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. |
11 | 12 |
|
12 | 13 | --- |
13 | 14 |
|
14 | | -Key Features |
15 | | - |
16 | | -Standalone scripts — No dependency on specific frameworks. |
17 | | - |
18 | | -Functional validation of Linux features like: |
19 | | - |
20 | | -CPU Frequency Scaling |
21 | | - |
22 | | -Reboot health check |
23 | | - |
24 | | -Audio, USB, Sensors, Bluetooth, Wi-Fi, Camera, GPS, Ethernet, Touchscreen, Display, Power management, and more. |
25 | | - |
26 | | - |
27 | | -Per-feature pass/fail reporting with detailed logs. |
28 | | - |
29 | | -Extensible — Scripts can be easily plugged into any CI/CD framework. |
30 | | - |
31 | | -Error Handling — Robust detection and logging of failures. |
32 | | - |
33 | | -Support for Yocto-based Systems — Especially with meta-qcom and meta-qcom-distros. |
34 | | - |
| 15 | +Intent |
35 | 16 |
|
| 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. |
36 | 22 |
|
37 | 23 | --- |
38 | | - |
39 | 24 | Usage |
40 | 25 |
|
41 | | -To run a specific test: |
42 | | - |
| 26 | +Run a specific test using: |
| 27 | +``` |
43 | 28 | ./run-test.sh <testname> |
44 | 29 |
|
45 | | -Where <testname> is the name of the test you want to run (example: cpufreq, reboot_health, etc). |
| 30 | +<testname> is the name of the script to be executed. |
46 | 31 |
|
47 | 32 | Example: |
48 | 33 |
|
49 | 34 | ./run-test.sh cpufreq |
50 | | - |
51 | | -The run-test.sh script will dynamically call the appropriate test script, handle basic setup, and consolidate test results. |
52 | | - |
53 | | - |
54 | | ---- |
55 | | - |
56 | | -Folder Structure |
57 | | - |
58 | | -├── run-test.sh # Launcher script |
59 | | -├── tests/ |
60 | | -│ ├── cpufreq_test.sh # CPU frequency scaling validation |
61 | | -│ ├── reboot_health.c # C program to validate reboot health |
62 | | -│ ├── audio_test.sh # Audio validation script |
63 | | -│ ├── usb_test.sh # USB validation script |
64 | | -│ └── ... # Other feature validation scripts |
65 | | -├── results/ |
66 | | -│ ├── logs/ # Log files |
67 | | -│ ├── summary.txt # Test summary (pass/fail per test) |
68 | | -├── README.md # This file |
69 | | -└── LICENSE |
70 | | - |
71 | | - |
| 35 | +./run-test.sh reboot_health |
| 36 | +``` |
72 | 37 | --- |
| 38 | +Features |
73 | 39 |
|
74 | | -Integrating with CI/CD |
75 | | - |
76 | | -Scripts are designed to be called independently. |
77 | | - |
78 | | -CI pipelines (like GitLab CI, Jenkins, GitHub Actions) can invoke run-test.sh with a specific test or loop through all available tests. |
79 | | - |
80 | | -Results can be collected from results/summary.txt and logs for reporting and visualization. |
81 | | - |
82 | | -Failures can automatically stop pipelines if configured. |
| 40 | +1. Standalone scripts: Shell scripts and C programs. |
83 | 41 |
|
| 42 | +2. Extensible: Easily pluggable into any existing CI framework. |
84 | 43 |
|
85 | | -Example CI/CD Pseudocode: |
| 44 | +3. Cross-Platform: Tested primarily on Yocto images, Qualcomm platforms. |
86 | 45 |
|
87 | | -for test in cpufreq reboot_health audio_test usb_test; do |
88 | | - ./run-test.sh $test || exit 1 |
89 | | -done |
| 46 | +4. Dynamic: Auto-detects hardware interfaces dynamically wherever possible. |
90 | 47 |
|
| 48 | +5. Strong Error Handling: Failure of any validation immediately flagged. |
91 | 49 |
|
92 | 50 | --- |
93 | 51 |
|
94 | | -Extending the Framework |
95 | | - |
96 | | -Adding a new test: |
97 | | - |
98 | | -Write a new script inside the tests/ folder. |
99 | | - |
100 | | -Follow the simple pattern: initialize, run checks, output PASS or FAIL. |
101 | | - |
102 | | -Update run-test.sh if needed to add the mapping. |
103 | | - |
104 | | - |
105 | | -Improving validations: |
106 | | - |
107 | | -Extend existing scripts with deeper corner case handling, stress tests, or coverage expansion. |
108 | | - |
| 52 | +Test Coverage (Examples) |
109 | 53 |
|
| 54 | +| Area | Test Type | Status | |
| 55 | +|---------------|----------------|---------------- |
| 56 | +| CPU Frequency (cpufreq) | Functional | Available | |
| 57 | +| Reboot Health Validation | Functional | Available | |
| 58 | +| Audo, USB, Sensors, WiFi, Bluetooth | Sanity | Planned | |
| 59 | +| Camera, GPS, Ethernet, Touchsceen, Display | Functional | Planned | |
110 | 60 |
|
| 61 | +> Note: Coverage is under active enhancement for broader validation. |
111 | 62 |
|
112 | 63 | --- |
113 | 64 |
|
114 | | -Requirements |
| 65 | +Extending for CI/CD |
115 | 66 |
|
116 | | -Basic Linux environment. |
| 67 | +These standalone tests can be wrapped inside any CI frameworks (like Jenkins, GitLab CI, GitHub Actions). |
| 68 | +Sample integration flow: |
117 | 69 |
|
118 | | -Root (sudo) permissions (for accessing system files like /sys, /dev, etc). |
| 70 | +1. Prepare the DUT (Device Under Test). |
119 | 71 |
|
120 | | -Compilers/tools installed on-device if needed for C programs (gcc). |
| 72 | +2. Copy and launch relevant test scripts. |
121 | 73 |
|
| 74 | +3. Parse results (stdout/logs). |
122 | 75 |
|
| 76 | +4. Decide pass/fail status based on outputs. |
123 | 77 |
|
124 | 78 | --- |
125 | 79 |
|
126 | | -Targeted Platforms |
127 | | - |
128 | | -Qualcomm-based devices (Snapdragon SoCs, automotive, robotics platforms, etc). |
129 | | - |
130 | | -Yocto builds using meta-qcom, meta-qcom-distros. |
131 | | - |
132 | | -Other Linux distributions after basic compatibility validation. |
133 | | - |
| 80 | +Contributions |
134 | 81 |
|
| 82 | +Contributions to add more validations, improve robustness, or extend for more platforms are welcome! |
135 | 83 |
|
| 84 | +Please make sure to sign your commits: |
| 85 | +``` |
| 86 | +git commit -s -m "your commit message" |
| 87 | +``` |
136 | 88 | --- |
| 89 | +Quick Example |
| 90 | +``` |
| 91 | +git clone <this-repo> |
| 92 | +cd <this-repo> |
| 93 | +chmod +x run-test.sh |
| 94 | +./run-test.sh cpufreq |
| 95 | +``` |
| 96 | +Output: |
| 97 | +``` |
| 98 | +[INFO] Starting CPU frequency validation... |
| 99 | +[PASS] Core 0 validated successfully |
| 100 | +[FAIL] Core 1 failed at frequency setting... |
| 101 | +``` |
| 102 | +--- |
| 103 | + |
| 104 | +Maintainers |
137 | 105 |
|
138 | | -Contribution |
| 106 | +Qualcomm - Initial framework |
139 | 107 |
|
140 | | -Feel free to open issues, suggest improvements, or submit pull requests if you wish to extend or improve the scripts for broader hardware coverage, kernel feature validation, or CI enhancements. |
| 108 | +Future contributors - Enhancements & new validations |
0 commit comments