Skip to content

Commit feca958

Browse files
committed
bootlinux: add support for custom refs on dev kernels on the CLI
We already have support to easily test arbitrary kernels and refs by just using the LINUX_TREE and LINUX_REF environment variables. We leverage this for our CIs: * LINUX_TREE: the target tree for baseline group (A) * LINUX_REF: the target tree ref the baseline group (A) Now that we have AB-testing support we want to first add support so that a simple TEST_AB=y will enable KDEVOPS_BASELINE_AND_DEV and then we want to be able to customize the target dev tree and ref. We do this with two other environment variables: * LINUX_DEV_TREE: the target tree for dev group (B) * LINUX_DEV_REF: the target tree ref the dev group (B) You just need to make sure to also pass TEST_AB=y. By leveraging this we can easily use AB testing in the future on CIs to compare and contrast different kernel releases against any target workload we have. For example, here's the power of how to use this, suppose we want to test the branch "20250723-migrate-folio-stats" on my kernel.org git tree, and compare it with the baseline on v6.16-rc7. All I have to do to spin up some guests and also leverage a large soak duration is: make defconfig-xfs_reflink_lbs \ TEST_AB=y KDEVOPS_HOSTS_PREFIX="pw2" \ LINUX_TREE=/mirror/mcgrof-linus.git/ \ LINUX_TREE_REF=v6.16-rc7 \ LINUX_DEV_TREE=/mirror/mcgrof-linus.git/ LINUX_DEV_TREE_REF="20250723-migrate-folio-stats" \ SOAK_DURATION=432000 -j128 After make, I see: egrep "bootlinux_dev_tree|target_linux_git|target_linux_dev_ref|target_linux_ref" extra_vars.yaml bootlinux_dev_tree_set_by_cli: True bootlinux_dev_tree_ref_set_by_cli: True bootlinux_dev_tree: "/mirror/mcgrof-linus.git/" target_linux_dev_ref: "20250723-migrate-folio-stats" target_linux_git: /mirror/mcgrof-linus.git/ target_linux_ref: v6.16-rc7 Now I can run *any* workflow in parallel against my two target kernels, after make linux, fstests is just one example workflow. Signed-off-by: Luis Chamberlain <[email protected]>
1 parent 58a0a19 commit feca958

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

kconfigs/Kconfig.kdevops

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ config KDEVOPS_HOSTS_PREFIX_SET_BY_CLI
5151
bool
5252
default $(shell, scripts/check-cli-set-var.sh KDEVOPS_HOSTS_PREFIX)
5353

54+
config KDEVOPS_BASELINE_AND_DEV_SET_BY_CLI
55+
bool
56+
output yaml
57+
default $(shell, scripts/check-cli-set-var.sh TEST_AB)
58+
5459
config KDEVOPS_HOSTS_PREFIX
5560
string "The hostname prefix to use for nodes"
5661
output yaml
@@ -78,7 +83,8 @@ config KDEVOPS_CUSTOM_SSH_KEXALGORITHMS
7883

7984
config KDEVOPS_BASELINE_AND_DEV
8085
bool "Enable both a baseline and development system per target test"
81-
default n
86+
default n if !KDEVOPS_BASELINE_AND_DEV_SET_BY_CLI
87+
default y if KDEVOPS_BASELINE_AND_DEV_SET_BY_CLI
8288
help
8389
By default kdevops will only spawn a baseline target node (local
8490
virtualization or cloud node) for your Linux kernel testing and

workflows/linux/Kconfig

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ config BOOTLINUX_TREE_REF_SET_BY_CLI
1010
output yaml
1111
default $(shell, scripts/check-cli-set-var.sh LINUX_TREE_REF)
1212

13+
config BOOTLINUX_DEV_TREE_SET_BY_CLI
14+
bool
15+
output yaml
16+
default $(shell, scripts/check-cli-set-var.sh LINUX_DEV_TREE)
17+
18+
config BOOTLINUX_DEV_TREE_REF_SET_BY_CLI
19+
bool
20+
output yaml
21+
default $(shell, scripts/check-cli-set-var.sh LINUX_DEV_TREE_REF)
22+
1323
config BOOTLINUX_HAS_PURE_IOMAP_CONFIG
1424
bool
1525

@@ -415,7 +425,8 @@ if BOOTLINUX_AB_DIFFERENT_REF
415425
config BOOTLINUX_DEV_TREE
416426
string "Development kernel tree URL"
417427
output yaml
418-
default BOOTLINUX_TREE
428+
default BOOTLINUX_TREE if !BOOTLINUX_DEV_TREE_SET_BY_CLI
429+
default $(shell, ./scripts/append-makefile-vars.sh $(LINUX_DEV_TREE)) if BOOTLINUX_DEV_TREE_SET_BY_CLI
419430
help
420431
Git tree URL for the development kernel. If left empty or same
421432
as the baseline tree, the same tree will be used with a different
@@ -424,7 +435,8 @@ config BOOTLINUX_DEV_TREE
424435
config TARGET_LINUX_DEV_REF
425436
string "Development kernel reference"
426437
output yaml
427-
default $(shell, scripts/infer_last_stable_kernel.sh)
438+
default $(shell, scripts/infer_last_stable_kernel.sh) if !BOOTLINUX_DEV_TREE_REF_SET_BY_CLI
439+
default $(shell, ./scripts/append-makefile-vars.sh $(LINUX_DEV_TREE_REF)) if BOOTLINUX_DEV_TREE_REF_SET_BY_CLI
428440
help
429441
Git reference (branch, tag, or commit) for the development kernel.
430442
This should be different from the baseline reference to enable

0 commit comments

Comments
 (0)