Skip to content

Commit 0e14ae0

Browse files
committed
ci: add fio-tests workflow integration
Integrate fio-tests into the modular GitHub Actions CI infrastructure. The kdevops CI system uses a reusable action-based architecture that makes adding new workflows straightforward through a simple three-step process. The modular CI architecture separates concerns into discrete actions located in the .github/actions directory. The configure action handles defconfig selection and kdevops setup. The bringup action provisions VMs using the configured parameters. The build-test action installs workflow-specific test infrastructure. The test action executes tests and collects results. The archive action stores results for analysis. Finally the cleanup action destroys VMs and cleans up resources. Workflow-specific behavior is controlled through simple mapping files in the .ci directory. Each workflow needs two files. The build-test file specifies the make target for installing test infrastructure. The test file specifies the make target for establishing baselines or running tests. These mapping files are looked up by workflow name at runtime. For fio-tests the build-test mapping executes make fio-tests to install fio and generate test job files. The test mapping executes make fio-tests-baseline to run tests and establish performance baselines. The test action automatically selects appropriate quick tests for kdevops-ci validation mode based on workflow type. For fio-tests it runs a single randread test providing rapid validation in under one minute. For fstests workflows it runs generic/003. For blktests it runs block/003. For selftests it runs kmod/test_001. In linux-ci mode the TESTS variable remains unset allowing full test suite execution. Result collection is workflow-specific with dedicated logic in the test action. The fio-tests implementation parses JSON output files to extract IOPS and bandwidth metrics. This enables performance regression detection across kernel versions. The system reports sample results including job names and read/write performance statistics. Four fio-tests configurations are now available in the CI workflow selection menu. The fio-tests-quick option provides minimal validation for rapid iteration. The fio-tests-fs-xfs option tests XFS with 16K block sizes and modern features. The fio-tests-fs-ext4-bigalloc option tests ext4 with bigalloc and 32K clusters. The fio-tests-fs-btrfs-zstd option tests btrfs with zstd compression. Adding additional fio-tests configurations requires only adding a defconfig file in the defconfigs directory and adding the workflow name to the ci_workflow choice list in kdevops.yml. The existing CI infrastructure automatically handles the rest through the modular action architecture. This demonstrates the power of the modular CI design where workflows share common infrastructure for provisioning, build, test, and cleanup while maintaining workflow-specific customization through simple mapping files and conditional logic in the test action. Generated-by: Claude AI Signed-off-by: Luis Chamberlain <[email protected]>
1 parent 603cdaa commit 0e14ae0

File tree

4 files changed

+43
-0
lines changed

4 files changed

+43
-0
lines changed

.ci/build-test/fio-tests

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
make fio-tests

.ci/test/fio-tests

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
make fio-tests-baseline

.github/actions/test/action.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ runs:
4747
selftests*|*modules*|*kmod*|*firmware*|*mm*)
4848
TESTS="kmod/test_001"
4949
;;
50+
*fio-tests*)
51+
TESTS="randread"
52+
;;
5053
*)
5154
TESTS="generic/003"
5255
;;
@@ -74,6 +77,7 @@ runs:
7477
*ext4*) wpath="workflows/fstests" ;;
7578
tmpfs*) wpath="workflows/fstests" ;;
7679
*xfs*) wpath="workflows/fstests" ;;
80+
*fio-tests*) wpath="workflows/fio-tests" ;;
7781
*) wpath="workflows/selftests" ;;
7882
esac
7983
@@ -88,6 +92,39 @@ runs:
8892
8993
# Workflow-specific result collection
9094
case "${{ inputs.ci_workflow }}" in
95+
*fio-tests*)
96+
# fio-tests workflows: Collect JSON results
97+
echo "Collecting fio-tests results..." > ci.commit_extra
98+
99+
if [ -d "$wpath/results/last-run" ]; then
100+
echo -e "\nfio-tests summary:" >> ci.commit_extra
101+
102+
# Count JSON result files
103+
json_count=$(find "$wpath/results/last-run" -name "*.json" -type f | wc -l)
104+
echo "Found $json_count fio result files" >> ci.commit_extra
105+
106+
# Extract basic metrics from first JSON file as sample
107+
sample_json=$(find "$wpath/results/last-run" -name "*.json" -type f | head -1)
108+
if [ -n "$sample_json" ] && [ -f "$sample_json" ]; then
109+
echo -e "\nSample result:" >> ci.commit_extra
110+
# Extract job name and basic IOPS/BW stats
111+
python3 -c "import json; import sys; data=json.load(open('$sample_json')); print(f\"Job: {data['jobs'][0]['jobname']}\"); print(f\"IOPS: {data['jobs'][0]['read']['iops']:.2f} read, {data['jobs'][0]['write']['iops']:.2f} write\"); print(f\"BW: {data['jobs'][0]['read']['bw']:.2f} KB/s read, {data['jobs'][0]['write']['bw']:.2f} KB/s write\")" >> ci.commit_extra 2>/dev/null || echo "Could not parse JSON" >> ci.commit_extra
112+
fi
113+
114+
# Success if we have at least one JSON result file
115+
if [ $json_count -gt 0 ]; then
116+
echo "ok" > ci.result
117+
else
118+
echo "no results found" > ci.result
119+
echo "::warning::No fio-tests JSON results found"
120+
exit 1
121+
fi
122+
else
123+
echo "no results found" > ci.result
124+
echo "::warning::No fio-tests results directory found"
125+
exit 1
126+
fi
127+
;;
91128
*xfs*|*btrfs*|*ext4*|tmpfs*|*fstests*)
92129
# fstests workflows: Use xunit_results.txt for rich summary
93130
echo "Collecting fstests results..."

.github/workflows/kdevops.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ on:
3030
- blktests_scsi
3131
- blktests_srp
3232
- blktests_zbd
33+
- fio-tests-quick
34+
- fio-tests-fs-xfs
35+
- fio-tests-fs-ext4-bigalloc
36+
- fio-tests-fs-btrfs-zstd
3337
- lbs-xfs
3438
- lbs-xfs-bdev-large-nvme
3539
- lbs-xfs-bdev-nvme

0 commit comments

Comments
 (0)