All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luis Chamberlain <mcgrof@kernel.org>
To: Chuck Lever <cel@kernel.org>, Daniel Gomez <da.gomez@kruces.com>,
	kdevops@lists.linux.dev
Cc: Luis Chamberlain <mcgrof@kernel.org>
Subject: [PATCH 08/23] reboot-limit: convert CONFIG_KERNEL_CI to internal loop feature
Date: Mon, 11 Aug 2025 15:24:35 -0700	[thread overview]
Message-ID: <20250811222452.2213071-9-mcgrof@kernel.org> (raw)
In-Reply-To: <20250811222452.2213071-1-mcgrof@kernel.org>

Convert reboot-limit workflow to use internal loop configuration instead
of the global CONFIG_KERNEL_CI feature:

- Remove CONFIG_KERNEL_CI selects from reboot-limit Kconfig
- Add internal REBOOT_LIMIT_ENABLE_LOOP configuration
- Add REBOOT_LIMIT_LOOP_STEADY_STATE_GOAL for loop count control
- Add REBOOT_LIMIT_LOOP_STEADY_STATE_INCREMENTAL for resumable loops
- Update Makefile to use internal variables instead of kernel-ci
- Update run_loop.sh to use reboot-limit specific configs
- Rename targets from -kernelci to -kotd (kernel-of-the-day)
- Remove kernel-ci script symlinks and add loop scripts
- Update help menu to reflect new target names

This makes reboot-limit self-contained with its own loop testing
configuration rather than relying on the global kernel-ci feature
that's being removed.

Generated-by: Claude AI
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
 .../demos/reboot-limit/run_kernel_ci.sh       |  1 -
 .../demos/reboot-limit/run_kernel_ci_kotd.sh  |  1 -
 .../workflows/demos/reboot-limit/run_loop.sh  | 23 +++++++-----
 .../demos/reboot-limit/run_loop_kotd.sh       | 25 +++++++++++++
 workflows/demos/reboot-limit/Kconfig          | 29 +++++++++++++--
 workflows/demos/reboot-limit/Makefile         | 35 ++++++++++---------
 6 files changed, 85 insertions(+), 29 deletions(-)
 delete mode 120000 scripts/workflows/demos/reboot-limit/run_kernel_ci.sh
 delete mode 120000 scripts/workflows/demos/reboot-limit/run_kernel_ci_kotd.sh
 create mode 100755 scripts/workflows/demos/reboot-limit/run_loop_kotd.sh

diff --git a/scripts/workflows/demos/reboot-limit/run_kernel_ci.sh b/scripts/workflows/demos/reboot-limit/run_kernel_ci.sh
deleted file mode 120000
index 5dc2bbb9..00000000
--- a/scripts/workflows/demos/reboot-limit/run_kernel_ci.sh
+++ /dev/null
@@ -1 +0,0 @@
-../../generic/run_kernel_ci.sh
\ No newline at end of file
diff --git a/scripts/workflows/demos/reboot-limit/run_kernel_ci_kotd.sh b/scripts/workflows/demos/reboot-limit/run_kernel_ci_kotd.sh
deleted file mode 120000
index f7089c93..00000000
--- a/scripts/workflows/demos/reboot-limit/run_kernel_ci_kotd.sh
+++ /dev/null
@@ -1 +0,0 @@
-../../kotd/run_kernel_ci_kotd.sh
\ No newline at end of file
diff --git a/scripts/workflows/demos/reboot-limit/run_loop.sh b/scripts/workflows/demos/reboot-limit/run_loop.sh
index 4661a4ce..651d8a44 100755
--- a/scripts/workflows/demos/reboot-limit/run_loop.sh
+++ b/scripts/workflows/demos/reboot-limit/run_loop.sh
@@ -1,18 +1,25 @@
 #!/bin/bash
 # SPDX-License-Identifier: copyleft-next-0.3.1
 
-# Part of kdevops kernel-ci, this is the script which will run the test workflow
-# as many times as indicated up to CONFIG_KERNEL_CI_STEADY_STATE_GOAL
+# Part of kdevops reboot-limit loop testing, this script will run the test workflow
+# as many times as indicated up to CONFIG_REBOOT_LIMIT_LOOP_STEADY_STATE_GOAL
 
 source ${TOPDIR}/.config
 source ${TOPDIR}/scripts/lib.sh
 
-COUNT=1
+# Check if we're resuming from a previous run
+if [[ "$CONFIG_REBOOT_LIMIT_LOOP_STEADY_STATE_INCREMENTAL" == "y" && -f $KERNEL_CI_OK_FILE ]]; then
+	COUNT=$(cat $KERNEL_CI_OK_FILE)
+	let COUNT=$COUNT+1
+else
+	COUNT=1
+	rm -f $KERNEL_CI_OK_FILE
+fi
 
 run_loop()
 {
 	while true; do
-		echo "== kernel-ci reboot-limit test loop $COUNT start: $(date)" > $KERNEL_CI_FAIL_LOG
+		echo "== reboot-limit test loop $COUNT start: $(date)" > $KERNEL_CI_FAIL_LOG
 		echo "/usr/bin/time -f %E make reboot-limit-baseline" >> $KERNEL_CI_FAIL_LOG
 		/usr/bin/time -p -o $KERNEL_CI_LOGTIME make reboot-limit-baseline >> $KERNEL_CI_FAIL_LOG
 		ANSIBLE_CALL_RET=$?
@@ -43,14 +50,14 @@ run_loop()
 		echo $COUNT > $KERNEL_CI_OK_FILE
 
 		let COUNT=$COUNT+1
-		if [[ "$CONFIG_KERNEL_CI_ENABLE_STEADY_STATE" == "y" &&
-		      "$COUNT" -gt "$CONFIG_KERNEL_CI_STEADY_STATE_GOAL" ]]; then
+		if [[ "$CONFIG_REBOOT_LIMIT_ENABLE_LOOP" == "y" &&
+		      "$COUNT" -gt "$CONFIG_REBOOT_LIMIT_LOOP_STEADY_STATE_GOAL" ]]; then
 			exit 0
 		fi
 		sleep 1
 	done
 }
 
-rm -f $KERNEL_CI_FAIL_FILE $KERNEL_CI_OK_FILE
-echo "= kernel-ci full log" > $KERNEL_CI_FULL_LOG
+rm -f $KERNEL_CI_FAIL_FILE
+echo "= reboot-limit loop full log" > $KERNEL_CI_FULL_LOG
 run_loop
diff --git a/scripts/workflows/demos/reboot-limit/run_loop_kotd.sh b/scripts/workflows/demos/reboot-limit/run_loop_kotd.sh
new file mode 100755
index 00000000..dc66b9e1
--- /dev/null
+++ b/scripts/workflows/demos/reboot-limit/run_loop_kotd.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+# SPDX-License-Identifier: copyleft-next-0.3.1
+
+# Part of kdevops reboot-limit loop testing with kernel-of-the-day
+# This script would normally update to the latest kernel before running the loop,
+# but since CONFIG_KERNEL_CI is being removed, this is now just a placeholder
+# that runs the regular loop.
+
+if [[ "$TOPDIR" == "" ]]; then
+	TOPDIR=$PWD
+fi
+
+source ${TOPDIR}/.config
+source ${TOPDIR}/scripts/lib.sh
+
+TARGET_HOSTS="baseline"
+if [[ "$1" != "" ]]; then
+	TARGET_HOSTS=$1
+fi
+
+echo "Note: kernel-of-the-day updates are not yet implemented for reboot-limit"
+echo "Running regular reboot-limit loop instead..."
+
+# For now, just run the regular loop
+${TOPDIR}/scripts/workflows/demos/reboot-limit/run_loop.sh
diff --git a/workflows/demos/reboot-limit/Kconfig b/workflows/demos/reboot-limit/Kconfig
index 008c0bf3..ad6c2607 100644
--- a/workflows/demos/reboot-limit/Kconfig
+++ b/workflows/demos/reboot-limit/Kconfig
@@ -4,8 +4,6 @@ config WORKFLOWS_REBOOT_LIMIT
 	select KDEVOPS_TRY_INSTALL_KDEV_TOOLS
 	select KDEVOPS_DEVCONFIG_ENABLE_CONSOLE
 	select KDEVOPS_DEVCONFIG_ENABLE_SYSTEMD_WATCHDOG
-	select KERNEL_CI
-	select KERNEL_CI_ENABLE_STEADY_STATE
 	help
 	  If you are doing kernel tests which includes a reboot, along the way,
 	  or if you do a reboot after a series of tests, you may want to first
@@ -71,6 +69,33 @@ config REBOOT_LIMIT_WATCHDOG_CHECK_TIME
 
 endif
 
+config REBOOT_LIMIT_ENABLE_LOOP
+	bool "Enable loop testing for reboot-limit"
+	default y
+	help
+	  Enable this to run reboot-limit tests in a loop until a failure
+	  is found or steady state is reached.
+
+if REBOOT_LIMIT_ENABLE_LOOP
+
+config REBOOT_LIMIT_LOOP_STEADY_STATE_GOAL
+	int "Steady-state goal for reboot-limit loop testing"
+	default 100
+	help
+	  The maximum number of successful test loops to run before
+	  declaring steady state achieved. Each loop runs REBOOT_LIMIT_BOOT_MAX
+	  reboots, so the total number of reboots is this value multiplied
+	  by REBOOT_LIMIT_BOOT_MAX.
+
+config REBOOT_LIMIT_LOOP_STEADY_STATE_INCREMENTAL
+	bool "Use incremental steady-state counting"
+	default y
+	help
+	  Enable this so that the loop will resume from the last success
+	  counter after failures rather than resetting to zero.
+
+endif # REBOOT_LIMIT_ENABLE_LOOP
+
 config REBOOT_LIMIT_BOOT_COUNT_CRASH_ENABLE
 	bool "Force a crash after certain period of reboots"
 	help
diff --git a/workflows/demos/reboot-limit/Makefile b/workflows/demos/reboot-limit/Makefile
index bf41025a..f739d8ce 100644
--- a/workflows/demos/reboot-limit/Makefile
+++ b/workflows/demos/reboot-limit/Makefile
@@ -70,15 +70,15 @@ endif
 # the extra_vars.yaml file.
 WORKFLOW_ARGS += $(REBOOT_LIMIT_ARGS)
 
-# The default is our workflow does not have kernel-ci enabled
-REBOOT_LIMIT_KERNEL_CI_LOOP := false
-REBOOT_LIMIT_KERNEL_CI_LOOP_KOTD := false
+# The default is our workflow does not have loop testing enabled
+REBOOT_LIMIT_LOOP := false
+REBOOT_LIMIT_LOOP_KOTD := false
 
-# If kdevops was configured to enable kernel-ci we define our scripts
-ifeq (y,$(CONFIG_KERNEL_CI))
-REBOOT_LIMIT_KERNEL_CI_LOOP      := scripts/workflows/demos/reboot-limit/run_kernel_ci.sh
-REBOOT_LIMIT_KERNEL_CI_LOOP_KOTD := scripts/workflows/demos/reboot-limit/run_kernel_ci_kotd.sh
-endif # CONFIG_KERNEL_CI
+# If reboot-limit was configured to enable loop testing we define our scripts
+ifeq (y,$(CONFIG_REBOOT_LIMIT_ENABLE_LOOP))
+REBOOT_LIMIT_LOOP      := scripts/workflows/demos/reboot-limit/run_loop.sh
+REBOOT_LIMIT_LOOP_KOTD := scripts/workflows/demos/reboot-limit/run_loop_kotd.sh
+endif # CONFIG_REBOOT_LIMIT_ENABLE_LOOP
 
 # By default KDEVOPS_HOSTS_TEMPLATE is defined to be hosts.in, if you want an
 # alternative you can define one, or even have a dynamic one. For an example
@@ -146,14 +146,14 @@ reboot-limit-baseline:
 
 # Once you know the baseline works, you may want to run the baseline in a loop
 # up to the number of times you define. We define this goal in kdevops as
-# the CONFIG_KERNEL_CI_STEADY_STATE_GOAL.
+# the CONFIG_REBOOT_LIMIT_LOOP_STEADY_STATE_GOAL.
 reboot-limit-baseline-loop:
-	$(Q)$(REBOOT_LIMIT_KERNEL_CI_LOOP) baseline
+	$(Q)$(REBOOT_LIMIT_LOOP) baseline
 
-# The kdevops kernel-ci target will try to upgrade your kernel to the latest
+# The kdevops kotd (kernel-of-the-day) target will try to upgrade your kernel to the latest
 # and then run the baseline-loop.
-reboot-limit-baseline-kernelci:
-	$(Q)$(REBOOT_LIMIT_KERNEL_CI_LOOP_KOTD) baseline
+reboot-limit-baseline-kotd:
+	$(Q)$(REBOOT_LIMIT_LOOP_KOTD) baseline
 
 # Resets the boot counters so we start from scratch
 reboot-limit-baseline-reset:
@@ -177,10 +177,10 @@ reboot-limit-dev-baseline:
 		--extra-vars=@./extra_vars.yaml
 
 reboot-limit-dev-loop:
-	$(Q)$(REBOOT_LIMIT_KERNEL_CI_LOOP) dev
+	$(Q)$(REBOOT_LIMIT_LOOP) dev
 
-reboot-limit-dev-kernelci:
-	$(Q)$(REBOOT_LIMIT_KERNEL_CI_LOOP_KOTD) dev
+reboot-limit-dev-kotd:
+	$(Q)$(REBOOT_LIMIT_LOOP_KOTD) dev
 
 reboot-limit-dev-reset:
 	$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
@@ -195,7 +195,8 @@ reboot-limit-help-menu:
 	@echo "reboot-limit-baseline                    - Run the reboot-linit test on baseline hosts and collect results"
 	@echo "reboot-limit-baseline-reset              - Reset the test boot counter for baseline"
 	@echo "reboot-limit-dev                         - Run the reboot-limti test on dev hosts and collect results"
-	@echo "reboot-limit-baseline-kernelci           - Run the reboot-limit kernel-ci loop"
+	@echo "reboot-limit-baseline-loop               - Run the reboot-limit test in a loop until failure or steady state"
+	@echo "reboot-limit-baseline-kotd               - Run the reboot-limit kotd (kernel-of-the-day) loop"
 	@echo ""
 
 HELP_TARGETS += reboot-limit-help-menu
-- 
2.47.2


  parent reply	other threads:[~2025-08-11 22:24 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-11 22:24 [PATCH 00/23] remove old kernel-ci and enhance reboot-limit Luis Chamberlain
2025-08-11 22:24 ` [PATCH 01/23] fstests: remove CONFIG_KERNEL_CI support Luis Chamberlain
2025-08-11 22:24 ` [PATCH 02/23] fstests: remove kernel-ci script symlinks Luis Chamberlain
2025-08-11 22:24 ` [PATCH 03/23] blktests: remove CONFIG_KERNEL_CI support Luis Chamberlain
2025-08-11 22:24 ` [PATCH 04/23] gitr: " Luis Chamberlain
2025-08-11 22:24 ` [PATCH 05/23] ltp: " Luis Chamberlain
2025-08-11 22:24 ` [PATCH 06/23] nfstest: " Luis Chamberlain
2025-08-11 22:24 ` [PATCH 07/23] pynfs: " Luis Chamberlain
2025-08-11 22:24 ` Luis Chamberlain [this message]
2025-08-11 22:24 ` [PATCH 09/23] kconfig: remove CONFIG_KERNEL_CI infrastructure Luis Chamberlain
2025-08-11 22:24 ` [PATCH 10/23] scripts: remove kernel-ci loop infrastructure Luis Chamberlain
2025-08-11 22:24 ` [PATCH 11/23] reboot-limit: simplify what gets selected Luis Chamberlain
2025-08-11 22:24 ` [PATCH 12/23] reboot-limit: add graph visualization support for results Luis Chamberlain
2025-08-11 22:24 ` [PATCH 13/23] reboot-limit: save graphs in organized results/graphs directory Luis Chamberlain
2025-08-11 22:24 ` [PATCH 14/23] docs: add comprehensive reboot-limit workflow documentation Luis Chamberlain
2025-08-11 22:24 ` [PATCH 15/23] reboot-limit: add kexec-tools dependency installation Luis Chamberlain
2025-08-11 22:24 ` [PATCH 16/23] reboot-limit: add A/B testing support targets Luis Chamberlain
2025-08-11 22:24 ` [PATCH 17/23] reboot-limit: fix kexec and reboot connection handling Luis Chamberlain
2025-08-11 22:24 ` [PATCH 18/23] reboot-limit: add COUNT parameter to override reboot count Luis Chamberlain
2025-08-11 22:24 ` [PATCH 19/23] reboot-limit: fix wait_for tasks using wrong host reference Luis Chamberlain
2025-08-11 22:24 ` [PATCH 20/23] reboot-limit: use ansible reboot module for all reboot types Luis Chamberlain
2025-08-11 22:24 ` [PATCH 21/23] reboot-limit: fix COUNT parameter to properly override reboot count Luis Chamberlain
2025-08-11 22:24 ` [PATCH 22/23] reboot-limit: handle empty dev group gracefully Luis Chamberlain
2025-08-11 22:24 ` [PATCH 23/23] reboot-limit: add kexec comparison feature Luis Chamberlain
2025-08-12 15:06 ` [PATCH 00/23] remove old kernel-ci and enhance reboot-limit Chuck Lever
2025-08-13  1:28   ` Luis Chamberlain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250811222452.2213071-9-mcgrof@kernel.org \
    --to=mcgrof@kernel.org \
    --cc=cel@kernel.org \
    --cc=da.gomez@kruces.com \
    --cc=kdevops@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.