@@ -13,3 +13,161 @@ To verify the kernel on it:
1313``` bash
1414make uname
1515```
16+
17+ ## A/B Kernel Testing
18+
19+ kdevops supports A/B testing with different kernel versions when
20+ ` KDEVOPS_BASELINE_AND_DEV ` is enabled. This allows you to compare performance
21+ or behavior between different kernel versions across baseline and development nodes.
22+
23+ ### Configuration Options
24+
25+ When A/B testing is enabled, you can choose between two approaches:
26+
27+ #### Same Kernel Reference (Default)
28+ Use the same kernel tree and reference for both baseline and dev nodes:
29+ ```
30+ A/B kernel testing configuration (BOOTLINUX_AB_SAME_REF) [Y/n/?]
31+ ```
32+
33+ This is useful for testing configuration changes or different test parameters
34+ with identical kernels.
35+
36+ #### Different Kernel References
37+ Use different kernel references for baseline and dev nodes:
38+ ```
39+ A/B kernel testing configuration
40+ 1. Use same kernel reference for baseline and dev (BOOTLINUX_AB_SAME_REF)
41+ > 2. Use different kernel references for baseline and dev (BOOTLINUX_AB_DIFFERENT_REF)
42+ ```
43+
44+ This enables testing between different kernel versions, commits, or branches.
45+
46+ When using different references, configure:
47+ - ** Development kernel tree URL** : Git repository (defaults to baseline tree)
48+ - ** Development kernel reference** : Branch, tag, or commit (e.g., "v6.8", "linux-next")
49+ - ** Development kernel release/local version** : Custom version strings for identification
50+
51+ ### Make Targets
52+
53+ #### Standard Linux Building
54+ ``` bash
55+ make linux # Build and install kernels for all nodes
56+ ```
57+
58+ When A/B testing with different references is enabled, this automatically:
59+ 1 . Builds and installs baseline kernel on baseline nodes
60+ 2 . Builds and installs development kernel on dev nodes
61+ 3 . Leaves the working directory with the dev kernel checked out
62+
63+ #### Individual Node Targeting
64+ ``` bash
65+ make linux-baseline # Build and install kernel for baseline nodes only
66+ make linux-dev # Build and install kernel for dev nodes only
67+ ```
68+
69+ These targets are available when ` KDEVOPS_BASELINE_AND_DEV=y ` and allow
70+ selective building and installation.
71+
72+ ### Usage Examples
73+
74+ #### Testing Kernel Versions
75+ Compare v6.7 (baseline) vs v6.8 (development):
76+
77+ ``` bash
78+ # Configure baseline kernel
79+ menuconfig → Workflows → Linux kernel → Git tree to clone: linus
80+ Reference to use: v6.7
81+
82+ # Configure A/B testing
83+ menuconfig → Workflows → Linux kernel → A/B kernel testing
84+ → Use different kernel references
85+ → Development kernel reference: v6.8
86+
87+ make bringup # Provision baseline and dev nodes
88+ make linux # Install v6.7 on baseline, v6.8 on dev
89+ make fstests # Run tests on both kernel versions
90+ make fstests-compare # Compare results between versions
91+ ```
92+
93+ #### Testing Development Branches
94+ Compare stable vs linux-next:
95+
96+ ``` bash
97+ # Baseline: stable kernel
98+ menuconfig → Reference to use: v6.8
99+
100+ # Development: linux-next
101+ menuconfig → A/B kernel testing → Development kernel reference: linux-next
102+
103+ make linux-baseline # Install stable kernel on baseline nodes
104+ make linux-dev # Install linux-next on dev nodes
105+ ```
106+
107+ #### Bisection Support
108+ Test specific commits during bisection:
109+
110+ ``` bash
111+ # Update development reference for bisection
112+ menuconfig → Development kernel reference: abc123def
113+
114+ make linux-dev # Install bisection commit on dev nodes
115+ # Run tests and analyze results
116+ ```
117+
118+ ### Working Directory State
119+
120+ After running ` make linux ` with different references:
121+ - The Linux source directory contains the ** development kernel** checkout
122+ - Both baseline and dev nodes have their respective kernels installed
123+ - Use ` git log --oneline -5 ` to verify the current checkout
124+
125+ To switch the working directory to baseline:
126+ ``` bash
127+ git checkout v6.7 # Switch to baseline reference
128+ ```
129+
130+ ### Integration with Testing Workflows
131+
132+ A/B kernel testing integrates seamlessly with all kdevops testing workflows:
133+
134+ ``` bash
135+ # Run fstests with kernel comparison
136+ make linux # Install different kernels
137+ make fstests # Test both kernel versions
138+ make fstests-compare # Generate comparison analysis
139+
140+ # Run fio-tests with kernel comparison
141+ make linux # Install different kernels
142+ make fio-tests # Performance test both kernels
143+ make fio-tests-compare # Compare performance metrics
144+
145+ # Run sysbench with kernel comparison
146+ make linux # Install different kernels
147+ make sysbench # Database tests on both kernels
148+ ```
149+
150+ ### Best Practices
151+
152+ 1 . ** Version Identification** : Use descriptive kernel release versions to distinguish builds
153+ 2 . ** Sequential Testing** : Install kernels before running test workflows
154+ 3 . ** Result Organization** : Use baseline/dev labels in test result analysis
155+ 4 . ** Git Management** : Keep track of which reference is currently checked out
156+ 5 . ** Systematic Comparison** : Use ` *-compare ` targets for meaningful analysis
157+
158+ ### Troubleshooting
159+
160+ #### Build Failures
161+ - Ensure both kernel references are valid and accessible
162+ - Check that build dependencies are installed on all nodes
163+ - Verify git repository permissions and network connectivity
164+
165+ #### Version Conflicts
166+ - Use different ` kernelrelease ` and ` localversion ` settings for clear identification
167+ - Check ` /boot ` directory for kernel installation conflicts
168+ - Verify GRUB configuration after kernel installation
169+
170+ #### Node Targeting Issues
171+ - Confirm ` KDEVOPS_BASELINE_AND_DEV=y ` is enabled
172+ - Verify baseline and dev node groups exist in inventory
173+ - Check ansible host patterns with ` make linux-baseline HOSTS=baseline `
0 commit comments