From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0924A2E2F03 for ; Mon, 11 Aug 2025 22:24:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754951096; cv=none; b=dyVD/AdpbUPXwkm+h8L0T3lmWadEkEHLDVBjIbstdSKGKYhwL5q/qpOOwMpPVBFBNWVQc7KnZj5Daa80HAd+FCbL5DnAYAp3lWThmcCpDndyHOtc5JRKfUTxfmnH7vZ9BZYBZ+O4XPnBfk0dKENzXLeHh5sJZJxY1ImnK42LzhM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754951096; c=relaxed/simple; bh=/5AJyjh0QFTHZOMGXAmtHlzijgnTmurhpQdS1G1YrW4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YWyv+/x64hq6dPObARufZ9kXPiI6h6R42Xy6UqlB0I2o+MTE/E2OOpJmnoeTA1eR1TC+vAkwfggE7At8ObDmgU9h6t5Bm1Ddc2fej2HoWiiGFN+Pm0oMsgkEZR4LE9tDxrhemGO1dKZ2blZfX/3njqxkns3kd+RMs5GiQrvC4sM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=g/kBNhKO; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="g/kBNhKO" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=Da5VNTMZ9RlAyHpYe5C2y+oiitIujyeua/F+RLeD7jc=; b=g/kBNhKOX8xTYCYk31I7JokUPp JGvxxcEF7uexWeMF/R4NWR1lOsvfo28PXCMz9mHGlWhUlI53067rnLoJqtyeQOGRqiJCe/CAA1xKN jofZ9GWJOhkbJdC5vkPkiikd8UycJS4Y2ijrc7EjDCWekUGxCsg1GAR/+uBoB6N7SCKreFfOSt7k+ tITXt3pO63uV2cd8WZnPrccY8FQIVjdplEv2mCJpiMjt2e24+HSiSDcFVZjgQNeqIP5Teq1dw7IWJ WCCObbTBElf9VZR6BZlL+pLFxRFuXtUoFvOslHmoHN1iWPoRYtK0HBaD0oHCX6Jm2w+Ru34/WaEmT OQ4Y/ICw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1ulawn-00000009HjT-1PRA; Mon, 11 Aug 2025 22:24:53 +0000 From: Luis Chamberlain To: Chuck Lever , Daniel Gomez , kdevops@lists.linux.dev Cc: Luis Chamberlain Subject: [PATCH 08/23] reboot-limit: convert CONFIG_KERNEL_CI to internal loop feature Date: Mon, 11 Aug 2025 15:24:35 -0700 Message-ID: <20250811222452.2213071-9-mcgrof@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250811222452.2213071-1-mcgrof@kernel.org> References: <20250811222452.2213071-1-mcgrof@kernel.org> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Luis Chamberlain 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 --- .../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