Skip to content

Commit 3c2f0c9

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. Signed-off-by: Luis Chamberlain <[email protected]>
1 parent 58a0a19 commit 3c2f0c9

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)