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 059392E11DE 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=1754951097; cv=none; b=Zgm4fTqskplOdjxeB3wutoE4oH/G7GiyZVmUNeXtth4ehGKRVU2NLpkBPdAXEYVhPuxlPs8bdfR8pTpVATM4HYoiqOEi9ZnlGKevUdZFLmAU0K/SzOLyXRxYc8Iw5rwm/MmKSb8UIdqt7Oz7l3SAh45Lz6/Ja3UmL3Q60VeHpZo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754951097; c=relaxed/simple; bh=8lAdzRQ9+MHQv4fUuT8Cmu2iGZjdtcrjR6Z8pkrq7V4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NwdcbsieGikyAptm/V7SS3VpGOqf55A9kPhjE6xBNtBZmX3aSetkHRoSKGSnJkcaDFnE+KxAo9hwImER917GzUfj3VUZ2ND8/CNADkYzzLCVRDNWobeo4ejgTP5JtRz6LwB10gLdKha1FDBB4R5PzG83UaeVDP3qxkScQFLB8RI= 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=xkzL7VSP; 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="xkzL7VSP" 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=jTCQt99aUI2/rXULOUa5t8VVE3QG2hexw/GQa6P+k5E=; b=xkzL7VSP2VRq9d+J3lMy+8n8LZ 3pZCxGTqeT6znH8sbDCHtJr1kTahjHIn4WpISx3LATXx44m24dkcGkPNmy9rOEtE9ck+lKrrmxC+7 hiJIlEVm1smvLbB7qzQXdAlUgzl4GRB7m18okwu5sykk9M9D49Es6RM2ytT9L5NAzgjFJDK7hf7Ng ufQXB5QnQvIrC4t1IF0m2g+3RJK9IsFlPrmTvgJ3528MVDThhMcvIxkErfI5u/IApm/f2Z5doMzEL EFvaElTOHScL9TR9FKPUzuO9hE+29cT8yH/w0pGGW+UhHPgfYLg+EZhU71H+NFmq58TL6V8LudQB5 uqJ+QWUw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1ulawn-00000009Hjd-1rRo; 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 10/23] scripts: remove kernel-ci loop infrastructure Date: Mon, 11 Aug 2025 15:24:37 -0700 Message-ID: <20250811222452.2213071-11-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 Remove the now-unused kernel-ci loop testing scripts: - Remove run_loop.sh from all workflows except reboot-limit - Remove generic run_kernel_ci.sh script - Remove kotd/run_kernel_ci_kotd.sh script and empty kotd directory These scripts were part of the CONFIG_KERNEL_CI infrastructure that has been replaced with workflow-specific implementations or better testing approaches like SOAK_DURATION. The reboot-limit workflow keeps its run_loop.sh as it now uses internal loop configuration. Generated-by: Claude AI Signed-off-by: Luis Chamberlain --- scripts/workflows/blktests/run_loop.sh | 66 ----- scripts/workflows/fstests/run_loop.sh | 98 ------ scripts/workflows/generic/run_kernel_ci.sh | 295 ------------------- scripts/workflows/gitr/run_loop.sh | 58 ---- scripts/workflows/kotd/run_kernel_ci_kotd.sh | 107 ------- scripts/workflows/ltp/run_loop.sh | 58 ---- scripts/workflows/nfstest/run_loop.sh | 58 ---- scripts/workflows/pynfs/run_loop.sh | 79 ----- 8 files changed, 819 deletions(-) delete mode 100755 scripts/workflows/blktests/run_loop.sh delete mode 100755 scripts/workflows/fstests/run_loop.sh delete mode 100755 scripts/workflows/generic/run_kernel_ci.sh delete mode 100755 scripts/workflows/gitr/run_loop.sh delete mode 100755 scripts/workflows/kotd/run_kernel_ci_kotd.sh delete mode 100755 scripts/workflows/ltp/run_loop.sh delete mode 100755 scripts/workflows/nfstest/run_loop.sh delete mode 100755 scripts/workflows/pynfs/run_loop.sh diff --git a/scripts/workflows/blktests/run_loop.sh b/scripts/workflows/blktests/run_loop.sh deleted file mode 100755 index 0deb899a..00000000 --- a/scripts/workflows/blktests/run_loop.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: copyleft-next-0.3.1 - -source ${TOPDIR}/.config -source ${TOPDIR}/scripts/lib.sh - -COUNT=1 - -run_loop() -{ - while true; do - echo "== kernel-ci blktests test loop $COUNT start: $(date)" > $KERNEL_CI_FAIL_LOG - echo "/usr/bin/time -f %E make blktests-baseline" >> $KERNEL_CI_FAIL_LOG - /usr/bin/time -p -o $KERNEL_CI_LOGTIME make blktests-baseline >> $KERNEL_CI_FAIL_LOG - echo "End $COUNT: $(date)" >> $KERNEL_CI_FAIL_LOG - cat $KERNEL_CI_LOGTIME >> $KERNEL_CI_FAIL_LOG - echo "git status:" >> $KERNEL_CI_FAIL_LOG - git status >> $KERNEL_CI_FAIL_LOG - echo "Results:" >> $KERNEL_CI_FAIL_LOG - - rm -f $KERNEL_CI_DIFF_LOG - - DIFF_COUNT=$(git diff workflows/blktests/expunges/ | wc -l) - if [[ "$DIFF_COUNT" -ne 0 ]]; then - echo "Detected a failure as reported by differences in our expunge list" >> $KERNEL_CI_DIFF_LOG - fi - - NEW_EXPUNGE_FILES="no" - ${TOPDIR}/playbooks/python/workflows/blktests/get_new_expunge_files.py workflows/blktests/expunges/ > .tmp.new_expunges - NEW_EXPUNGE_FILE_COUNT=$(cat .tmp.new_expunges | wc -l | awk '{print $1}') - if [[ $NEW_EXPUNGE_FILE_COUNT -ne 0 ]]; then - NEW_EXPUNGE_FILES="yes" - echo "Detected a failure since new expunge files were found which are not commited into git" >> $KERNEL_CI_DIFF_LOG - echo "New expunge file found, listing output below:" >> $KERNEL_CI_DIFF_LOG - cat .tmp.new_expunges >> $KERNEL_CI_DIFF_LOG - rm -f .tmp.new_expunges - fi - rm -f .tmp.new_expunges - - if [[ "$DIFF_COUNT" -ne 0 || "$NEW_EXPUNGE_FILES" == "yes" ]]; then - echo "Test $COUNT: FAILED!" >> $KERNEL_CI_DIFF_LOG - echo "== Test loop count $COUNT" >> $KERNEL_CI_DIFF_LOG - echo "$(git describe)" >> $KERNEL_CI_DIFF_LOG - git diff workflows/blktests/expunges/ >> $KERNEL_CI_DIFF_LOG - cat $KERNEL_CI_DIFF_LOG >> $KERNEL_CI_FAIL_LOG - cat $KERNEL_CI_FAIL_LOG >> $KERNEL_CI_FULL_LOG - echo $COUNT > $KERNEL_CI_FAIL_FILE - exit 1 - else - echo "Test $COUNT: OK!" >> $KERNEL_CI_FAIL_LOG - echo "----------------------------------------------------------------" >> $KERNEL_CI_FAIL_LOG - cat $KERNEL_CI_FAIL_LOG >> $KERNEL_CI_FULL_LOG - fi - 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 - 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 -run_loop diff --git a/scripts/workflows/fstests/run_loop.sh b/scripts/workflows/fstests/run_loop.sh deleted file mode 100755 index 7c60990c..00000000 --- a/scripts/workflows/fstests/run_loop.sh +++ /dev/null @@ -1,98 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: copyleft-next-0.3.1 - -source ${TOPDIR}/.config -source ${TOPDIR}/scripts/lib.sh - -FSTYPE="$CONFIG_FSTESTS_FSTYP" - -run_loop() -{ - while true; do - echo "== kernel-ci fstests $FSTYPE test loop $COUNT start: $(date)" > $KERNEL_CI_FAIL_LOG - echo "/usr/bin/time -f %E make fstests-baseline" >> $KERNEL_CI_FAIL_LOG - /usr/bin/time -p -o $KERNEL_CI_LOGTIME make fstests-baseline >> $KERNEL_CI_FAIL_LOG - echo "End $COUNT: $(date)" >> $KERNEL_CI_FAIL_LOG - cat $KERNEL_CI_LOGTIME >> $KERNEL_CI_FAIL_LOG - echo "git status:" >> $KERNEL_CI_FAIL_LOG - git status >> $KERNEL_CI_FAIL_LOG - echo "Results:" >> $KERNEL_CI_FAIL_LOG - - rm -f $KERNEL_CI_DIFF_LOG - - XUNIT_FAIL="no" - if [ -f workflows/fstests/results/xunit_results.txt ]; then - grep -qi "[^0].failures" workflows/fstests/results/xunit_results.txt - if [[ $? -eq 0 ]]; then - echo "Detected a failure as reported by xunit:" >> $KERNEL_CI_DIFF_LOG - cat workflows/fstests/results/xunit_results.txt >> $KERNEL_CI_DIFF_LOG - XUNIT_FAIL="yes" - else - echo "No failures detected by xunit:" >> $KERNEL_CI_DIFF_LOG - cat workflows/fstests/results/xunit_results.txt >> $KERNEL_CI_FAIL_LOG - fi - fi - - DIFF_COUNT=$(git diff workflows/fstests/expunges/ | wc -l) - if [[ "$DIFF_COUNT" -ne 0 ]]; then - echo "Detected a failure as reported by differences in our expunge list" >> $KERNEL_CI_DIFF_LOG - elif [[ "$XUNIT_FAIL" == "yes" ]]; then - echo "" >> $KERNEL_CI_DIFF_LOG - echo "Although xunit detects an error, no test bad file found. This is" >> $KERNEL_CI_DIFF_LOG - echo "likely due to a test which xunit reports as failed causing a" >> $KERNEL_CI_DIFF_LOG - echo "kernel warning." >> $KERNEL_CI_DIFF_LOG - echo "" >> $KERNEL_CI_DIFF_LOG - fi - - NEW_EXPUNGE_FILES="no" - if [[ -f workflows/fstests/new_expunge_files.txt && "$(wc -l workflows/fstests/new_expunge_files.txt | awk '{print $1}')" -ne 0 ]]; then - NEW_EXPUNGE_FILES="yes" - echo "Detected a failure since new expunge files were found which are not commited into git" >> $KERNEL_CI_DIFF_LOG - echo "New expunge file found, listing output below:" >> $KERNEL_CI_DIFF_LOG - for i in $(cat workflows/fstests/new_expunge_files.txt); do - echo "$i :" - if [[ -f $i ]]; then - cat $i >> $KERNEL_CI_DIFF_LOG - else - echo "Error: $i listed as new but its not found.." >> $KERNEL_CI_DIFF_LOG - fi - done - fi - - if [[ "$DIFF_COUNT" -ne 0 || "$XUNIT_FAIL" == "yes" || "$NEW_EXPUNGE_FILES" == "yes" ]]; then - echo "Test $COUNT: FAILED!" >> $KERNEL_CI_DIFF_LOG - echo "== Test loop count $COUNT" >> $KERNEL_CI_DIFF_LOG - echo "$(git describe)" >> $KERNEL_CI_DIFF_LOG - git diff >> $KERNEL_CI_DIFF_LOG - cat $KERNEL_CI_DIFF_LOG >> $KERNEL_CI_FAIL_LOG - cat $KERNEL_CI_FAIL_LOG >> $KERNEL_CI_FULL_LOG - echo $COUNT > $KERNEL_CI_FAIL_FILE - exit 1 - else - echo "Test $COUNT: OK!" >> $KERNEL_CI_FAIL_LOG - echo "----------------------------------------------------------------" >> $KERNEL_CI_FAIL_LOG - cat $KERNEL_CI_FAIL_LOG >> $KERNEL_CI_FULL_LOG - fi - 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 - exit 0 - fi - sleep 1 - done -} - -if [[ "$CONFIG_KERNEL_CI_STEADY_STATE_INCREMENTAL" == "y" && -f $KERNEL_CI_OK_FILE ]]; then - # Resume the loop from last success counter - COUNT=$(cat $KERNEL_CI_OK_FILE) -else - # Reset the loop success counter - rm -f $KERNEL_CI_OK_FILE - COUNT=0 -fi -let COUNT=$COUNT+1 - -rm -f $KERNEL_CI_FAIL_FILE -echo "= kernel-ci full log" > $KERNEL_CI_FULL_LOG -run_loop diff --git a/scripts/workflows/generic/run_kernel_ci.sh b/scripts/workflows/generic/run_kernel_ci.sh deleted file mode 100755 index 47c0bee1..00000000 --- a/scripts/workflows/generic/run_kernel_ci.sh +++ /dev/null @@ -1,295 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: copyleft-next-0.3.1 - -# Part of the kdevops kernel-ci. This script is in charge of running the -# script which runs the workflow up to the CONFIG_KERNEL_CI_STEADY_STATE_GOAL, -# and then batching out a workflow specific watchdog -- if one was requested -- -# (refer to kernel_ci_watchdog_loop()) and finally doing post-processing -# to try to make sense of what the results are (see kernel_ci_post_process()) - -source ${TOPDIR}/.config -source ${TOPDIR}/scripts/lib.sh - -TARGET_WORFKLOW="$(basename $(dirname $0))" -TARGET_WORFKLOW_DIR="$TARGET_WORFKLOW" -echo $0 | grep -q demos -if [[ $? -eq 0 ]]; then - TARGET_WORFKLOW_DIR="demos/$TARGET_WORFKLOW" -fi -TARGET_WORFKLOW_NAME="$TARGET_WORFKLOW" -STARTED_FILE="" -ENABLE_WATCHDOG="n" -WATCHDOG_SLEEP_TIME=100 -WATCHDOG_SCRIPT="./scripts/workflows/${TARGET_WORFKLOW_DIR}/${TARGET_WORFKLOW}_watchdog.py" -WATCHDOG_KILL_TASKS_ON_HANG="n" -WATCHDOG_RESET_HUNG_SYSTEMS="n" - -if [[ "$TARGET_WORFKLOW" == "fstests" ]]; then - FSTYPE="$CONFIG_FSTESTS_FSTYP" - TARGET_WORFKLOW_NAME="$TARGET_WORFKLOW on $FSTYPE" - STARTED_FILE=$FSTESTS_STARTED_FILE - ENABLE_WATCHDOG="$CONFIG_FSTESTS_WATCHDOG" - WATCHDOG_SLEEP_TIME=$CONFIG_FSTESTS_WATCHDOG_CHECK_TIME - WATCHDOG_KILL_TASKS_ON_HANG="$CONFIG_FSTESTS_WATCHDOG_KILL_TASKS_ON_HANG" - WATCHDOG_RESET_HUNG_SYSTEMS="$CONFIG_FSTESTS_WATCHDOG_RESET_HUNG_SYSTEMS" -elif [[ "$TARGET_WORFKLOW" == "blktests" ]]; then - STARTED_FILE=$BLKTESTS_STARTED_FILE - ENABLE_WATCHDOG="$CONFIG_BLKTESTS_WATCHDOG" - WATCHDOG_SLEEP_TIME=$CONFIG_BLKTESTS_WATCHDOG_CHECK_TIME - WATCHDOG_KILL_TASKS_ON_HANG="$CONFIG_BLKTESTS_WATCHDOG_KILL_TASKS_ON_HANG" - WATCHDOG_RESET_HUNG_SYSTEMS="$CONFIG_BLKTESTS_WATCHDOG_RESET_HUNG_SYSTEMS" -elif [[ "$TARGET_WORFKLOW" == "reboot-limit" ]]; then - STARTED_FILE=$REBOOT_LIMIT_STARTED_FILE - ENABLE_WATCHDOG="$CONFIG_REBOOT_LIMIT_WATCHDOG" - WATCHDOG_SLEEP_TIME=$CONFIG_REBOOT_LIMIT_WATCHDOG_CHECK_TIME - # reboot-limit has no custom watchog script -fi - -kernel_ci_subject_topic() -{ - if [[ "$CONFIG_KERNEL_CI_ADD_CUSTOM_SUBJECT_TOPIC" != "y" ]]; then - echo "kernel-ci on $(hostname)" - elif [[ "$CONFIG_KERNEL_CI_ADD_CUSTOM_SUBJECT_TOPIC_TAG" == "y" ]]; then - echo "kernel-ci on $(hostname) $CONFIG_KERNEL_CI_SUBJECT_TOPIC $CONFIG_BOOTLINUX_TREE_REF" - else - echo "kernel-ci on $(hostname) $CONFIG_KERNEL_CI_SUBJECT_TOPIC" - fi -} - -RCPT="ignore@test.com" -MAIL_FROM_MOD="" -SSH_TARGET="ignore" -KERNEL_CI_LOOP="${TOPDIR}/scripts/workflows/${TARGET_WORFKLOW_DIR}/run_loop.sh" -SUBJECT_PREFIX="$(kernel_ci_subject_topic) on $(hostname): ${TARGET_WORFKLOW_NAME} failure on test loop " -KERNEL_CI_LOOP_PID=0 -TARGET_HOSTS=$1 - -kernel_ci_post_process() -{ - if [[ -f $MANUAL_KILL_NOTICE_FILE ]]; then - exit 1 - fi - if [[ "$CONFIG_WORKFLOW_KOTD_ENABLE" == "y" ]]; then - if [[ -f $KOTD_LOG ]]; then - cat $KOTD_LOG $KERNEL_CI_FAIL_LOG > $KOTD_TMP - cp $KOTD_TMP $KERNEL_CI_FAIL_LOG - cp $KOTD_TMP $KERNEL_CI_DIFF_LOG - rm -f $KOTD_TMP - fi - fi - if [[ -f $KERNEL_CI_WATCHDOG_FAIL_LOG ]]; then - cat $KERNEL_CI_WATCHDOG_FAIL_LOG >> $KERNEL_CI_FAIL_LOG - cat $KERNEL_CI_WATCHDOG_FAIL_LOG >> $KERNEL_CI_DIFF_LOG - fi - - if [[ ! -s $KERNEL_CI_LOGTIME_FULL ]]; then - echo "-------------------------------------------" >> $KERNEL_CI_FAIL_LOG - echo "Full run time of kernel-ci loop:" >> $KERNEL_CI_FAIL_LOG - cat $KERNEL_CI_LOGTIME_FULL >> $KERNEL_CI_FAIL_LOG - - echo "-------------------------------------------" >> $KERNEL_CI_DIFF_LOG - echo "Full run time of kernel-ci loop:" >> $KERNEL_CI_DIFF_LOG - cat $KERNEL_CI_LOGTIME_FULL >> $KERNEL_CI_DIFF_LOG - fi - - if [[ "$CONFIG_KERNEL_CI_EMAIL_REPORT" != "y" ]]; then - if [[ -f $KERNEL_CI_FAIL_FILE ]]; then - FAIL_LOOP="$(cat $KERNEL_CI_FAIL_FILE)" - SUBJECT="$SUBJECT_PREFIX $FAIL_LOOP" - echo $SUBJECT - if [[ ! -s $KERNEL_CI_LOGTIME_FULL ]]; then - echo "Full run time of kernel-ci loop:" - cat $KERNEL_CI_LOGTIME_FULL - fi - exit 1 - elif [[ -f $KERNEL_CI_OK_FILE ]]; then - LOOP_COUNT=$(cat $KERNEL_CI_OK_FILE) - SUBJECT="$(kernel_ci_subject_topic) ${TARGET_WORFKLOW_NAME} never failed after $LOOP_COUNT test loops" - echo $SUBJECT - if [[ ! -s $KERNEL_CI_LOGTIME_FULL ]]; then - echo "Full run time of kernel-ci loop:" - cat $KERNEL_CI_LOGTIME_FULL - fi - exit 0 - fi - fi - - if [[ -f $KERNEL_CI_FAIL_FILE ]]; then - FAIL_LOOP="$(cat $KERNEL_CI_FAIL_FILE)" - SUBJECT="$SUBJECT_PREFIX $FAIL_LOOP" - - if [[ -f $KERNEL_CI_WATCHDOG_FAIL_LOG ]]; then - SUBJECT="$SUBJECT and watchdog picked up a hang" - fi - - cat $KERNEL_CI_DIFF_LOG | mail -s "'$SUBJECT'" $MAIL_FROM_MOD $RCPT - echo $SUBJECT - exit 1 - elif [[ -f $KERNEL_CI_OK_FILE ]]; then - LOOP_COUNT=$(cat $KERNEL_CI_OK_FILE) - SUBJECT="$(kernel_ci_subject_topic): ${TARGET_WORFKLOW_NAME} achieved steady-state goal of $LOOP_COUNT test loops!" - GOAL="$CONFIG_KERNEL_CI_STEADY_STATE_GOAL" - if [[ "$CONFIG_KERNEL_CI_ENABLE_STEADY_STATE" == "y" && - "$LOOP_COUNT" -lt "$CONFIG_KERNEL_CI_STEADY_STATE_GOAL" ]]; then - SUBJECT="$(kernel_ci_subject_topic): ${TARGET_WORFKLOW_NAME} bailed out on loop $LOOP_COUNT before steady-state goal of $GOAL!" - fi - if [[ -f $KERNEL_CI_WATCHDOG_FAIL_LOG ]]; then - SUBJECT="$(kernel_ci_subject_topic): ${TARGET_WORFKLOW_NAME} detected a hang after $LOOP_COUNT test loops" - fi - - cat $KERNEL_CI_FAIL_LOG | mail -s "'$SUBJECT'" $MAIL_FROM_MOD $RCPT - echo "$SUBJECT" - - if [[ -f $KERNEL_CI_WATCHDOG_FAIL_LOG ]]; then - exit 1 - else - exit 0 - fi - elif [[ -f $KERNEL_CI_WATCHDOG_FAIL_LOG ]]; then - SUBJECT="$(kernel_ci_subject_topic): ${TARGET_WORFKLOW_NAME} failed on a hung test on the first loop" - cat $KERNEL_CI_WATCHDOG_FAIL_LOG - cat $KERNEL_CI_DIFF_LOG | mail -s "'$SUBJECT'" $MAIL_FROM_MOD $RCPT - exit 1 - else - echo "The kernel-ci loop will create the file $KERNEL_CI_FAIL_FILE if" - echo "we completed with failure, while the $KERNEL_CI_OK_FILE would be" - echo "created if no failure was found. We did not find either file." - echo "This is an unexpected situation." - - SUBJECT="$(kernel_ci_subject_topic): ${TARGET_WORFKLOW_NAME} exited in an unexpection situation" - cat $KERNEL_CI_LOGTIME_FULL | mail -s "'$SUBJECT'" $MAIL_FROM_MOD $RCPT - exit 1 - fi -} - -kernel_ci_watchdog_loop() -{ - echo starting watchdog loop >> $KERNEL_CI_WATCHDOG_LOG - while true; do - if [[ -f $MANUAL_KILL_NOTICE_FILE ]]; then - exit 1 - fi - HUNG_FOUND="False" - TIMEOUT_FOUND="False" - echo watchdog loop work >> $KERNEL_CI_WATCHDOG_LOG - rm -f $KERNEL_CI_WATCHDOG_FAIL_LOG $KERNEL_CI_WATCHDOG_HUNG $KERNEL_CI_WATCHDOG_TIMEOUT - - if [[ ! -f $STARTED_FILE ]]; then - if [[ ! -d /proc/$KERNEL_CI_LOOP_PID ]]; then - # If $KERNEL_CI_FAIL_FILE doesn't exist and we have the $KERNEL_CI_OK_FILE file - # we've reached steady state, so don't send extra information to stdout to - # avoid confusing the user. - if [[ -f $KERNEL_CI_FAIL_FILE || ! -f $KERNEL_CI_OK_FILE ]]; then - echo "PID ($KERNEL_CI_LOOP_PID) for $KERNEL_CI_LOOP process no longer found, bailing watchdog" - fi - break - fi - echo watchdog does not yet see start file $STARTED_FILE so waiting $WATCHDOG_SLEEP_TIME seconds >> $KERNEL_CI_WATCHDOG_LOG - sleep $WATCHDOG_SLEEP_TIME - continue - fi - - if [[ ! -d /proc/$KERNEL_CI_LOOP_PID ]]; then - echo "Test not running" > $KERNEL_CI_WATCHDOG_RESULTS_NEW - cp $KERNEL_CI_WATCHDOG_RESULTS_NEW $KERNEL_CI_WATCHDOG_RESULTS - break - fi - - if [[ ! -f $WATCHDOG_SCRIPT ]]; then - sleep $WATCHDOG_SLEEP_TIME - continue - fi - - echo calling $(basename $WATCHDOG_SCRIPT) to output into $KERNEL_CI_WATCHDOG_RESULTS_NEW >> $KERNEL_CI_WATCHDOG_LOG - $WATCHDOG_SCRIPT ./hosts $TARGET_HOSTS > $KERNEL_CI_WATCHDOG_RESULTS_NEW - # Use the KERNEL_CI_WATCHDOG_RESULTS file to get fast results - cp $KERNEL_CI_WATCHDOG_RESULTS_NEW $KERNEL_CI_WATCHDOG_RESULTS - - grep "Hung-Stalled" $KERNEL_CI_WATCHDOG_RESULTS > $KERNEL_CI_WATCHDOG_HUNG - if [[ $? -eq 0 ]]; then - HUNG_FOUND="True" - else - rm -f $KERNEL_CI_WATCHDOG_HUNG - fi - - grep "Timeout" $KERNEL_CI_WATCHDOG_RESULTS > $KERNEL_CI_WATCHDOG_TIMEOUT - if [[ $? -eq 0 ]]; then - TIMEOUT_FOUND="True" - else - rm -f $KERNEL_CI_WATCHDOG_TIMEOUT - fi - - if [[ "$WATCHDOG_KILL_TASKS_ON_HANG" == "y" ]]; then - if [[ "$HUNG_FOUND" == "True" || "$TIMEOUT_FOUND" == "True" ]]; then - ${TOPDIR}/scripts/workflows/${TARGET_WORFKLOW_DIR}/kill_pids.sh --watchdog-mode 2> /dev/null - echo "The kdevops ${TARGET_WORFKLOW} watchdog detected hung or timed out hosts, stopping" >> $KERNEL_CI_WATCHDOG_FAIL_LOG - echo "all tests as otherwise we'd never have this test complete, so we killed PID $KERNEL_CI_LOOP_PID." >> $KERNEL_CI_WATCHDOG_FAIL_LOG - echo "" >> $KERNEL_CI_WATCHDOG_FAIL_LOG - echo "These are critical issues, you should try to reproduce manually and fix them." >> $KERNEL_CI_WATCHDOG_FAIL_LOG - echo "all tests as otherwise we'd never have this test complete." >> $KERNEL_CI_WATCHDOG_FAIL_LOG - if [[ "$HUNG_FOUND" == "True" ]]; then - echo "Hung hosts found:" >> $KERNEL_CI_WATCHDOG_FAIL_LOG - grep runtime $KERNEL_CI_WATCHDOG_RESULTS >> $KERNEL_CI_WATCHDOG_FAIL_LOG - cat $KERNEL_CI_WATCHDOG_HUNG >> $KERNEL_CI_WATCHDOG_FAIL_LOG - fi - if [[ "$TIMEOUT_FOUND" == "True" ]]; then - echo "Hosts we timed out on:" >> $KERNEL_CI_WATCHDOG_FAIL_LOG - grep runtime $KERNEL_CI_WATCHDOG_RESULTS >> $KERNEL_CI_WATCHDOG_FAIL_LOG - cat $KERNEL_CI_WATCHDOG_TIMEOUT >> $KERNEL_CI_WATCHDOG_FAIL_LOG - fi - if [[ "$WATCHDOG_RESET_HUNG_SYSTEMS" == "y" ]]; then - for i in $(awk '{print $1}' $KERNEL_CI_WATCHDOG_RESULTS | grep -E -v "runtime|Hostname"); do - if [[ "$CONFIG_GUESTFS" == "y" ]]; then - sudo virsh reset $i - else - echo "$i : Unsupported crashy reset for this bringup configuration" >> $KERNEL_CI_WATCHDOG_FAIL_LOG - fi - echo -e "\nReset all your associated systems:" >> $KERNEL_CI_WATCHDOG_FAIL_LOG - echo -e "\t$i" >> $KERNEL_CI_WATCHDOG_FAIL_LOG - done - fi - break - fi - fi - - sleep $WATCHDOG_SLEEP_TIME - done -} - -if [[ "$CONFIG_KERNEL_CI_STEADY_STATE_INCREMENTAL" == "y" && -f $KERNEL_CI_OK_FILE ]]; then - LOOP_COUNT=$(cat $KERNEL_CI_OK_FILE) -fi - -rm -f ${TOPDIR}/.kernel-ci.* -rm -f $STARTED_FILE - -if [[ "$CONFIG_KERNEL_CI_STEADY_STATE_INCREMENTAL" == "y" && ! -z "$LOOP_COUNT" ]]; then - # Resume the loop from last success counter - echo $LOOP_COUNT > $KERNEL_CI_OK_FILE -fi - -if [[ "$CONFIG_KERNEL_CI_EMAIL_REPORT" == "y" ]]; then - RCPT="$CONFIG_KERNEL_CI_EMAIL_RCPT" -fi - -if [[ "$CONFIG_KERNEL_CI_EMAIL_MODIFY_FROM" == "y" ]]; then - MAIL_FROM_MOD="-r '$CONFIG_KERNEL_CI_EMAIL_FROM'" -fi - -if [[ "$ENABLE_WATCHDOG" == "y" ]]; then - rm -f $KERNEL_CI_WATCHDOG_RESULTS_NEW $KERNEL_CI_WATCHDOG_RESULTS -fi - -/usr/bin/time -f %E -o $KERNEL_CI_LOGTIME_FULL $KERNEL_CI_LOOP & -KERNEL_CI_LOOP_PID=$! - -if [[ "$ENABLE_WATCHDOG" != "y" ]]; then - echo Skipping watchdog and just waiting for kernel-ci PID to complete >> $KERNEL_CI_WATCHDOG_LOG - wait -else - echo Kicking off watchdog loop >> $KERNEL_CI_WATCHDOG_LOG - kernel_ci_watchdog_loop - echo Completed watchdog loop >> $KERNEL_CI_WATCHDOG_LOG -fi - -kernel_ci_post_process diff --git a/scripts/workflows/gitr/run_loop.sh b/scripts/workflows/gitr/run_loop.sh deleted file mode 100755 index 2ba961e2..00000000 --- a/scripts/workflows/gitr/run_loop.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/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 - -source ${TOPDIR}/.config -source ${TOPDIR}/scripts/lib.sh - -WORKFLOWDIR=${TOPDIR}/workflows/gitr - -COUNT=1 - -run_loop() -{ - while true; do - echo "== kernel-ci gitr test loop $COUNT start: $(date)" > $KERNEL_CI_FAIL_LOG - echo "/usr/bin/time -f %E make gitr-baseline" >> $KERNEL_CI_FAIL_LOG - /usr/bin/time -p -o $KERNEL_CI_LOGTIME make gitr-baseline >> $KERNEL_CI_FAIL_LOG - ANSIBLE_CALL_RET=$? - echo "End $COUNT: $(date)" >> $KERNEL_CI_FAIL_LOG - cat $KERNEL_CI_LOGTIME >> $KERNEL_CI_FAIL_LOG - echo "git status:" >> $KERNEL_CI_FAIL_LOG - git status >> $KERNEL_CI_FAIL_LOG - echo "Results:" >> $KERNEL_CI_FAIL_LOG - - rm -f $KERNEL_CI_DIFF_LOG - - if [[ "$ANSIBLE_CALL_RET" -ne 0 ]]; then - echo "Test $COUNT: FAILED!" >> $KERNEL_CI_DIFF_LOG - echo "== Test loop count $COUNT" >> $KERNEL_CI_DIFF_LOG - echo "$(git describe)" >> $KERNEL_CI_DIFF_LOG - git diff >> $KERNEL_CI_DIFF_LOG - cat $KERNEL_CI_DIFF_LOG >> $KERNEL_CI_FAIL_LOG - cat $KERNEL_CI_FAIL_LOG >> $KERNEL_CI_FULL_LOG - echo $COUNT > $KERNEL_CI_FAIL_FILE - exit 1 - else - echo "Test $COUNT: OK!" >> $KERNEL_CI_FAIL_LOG - echo "----------------------------------------------------------------" >> $KERNEL_CI_FAIL_LOG - cat $KERNEL_CI_FAIL_LOG >> $KERNEL_CI_FULL_LOG - fi - - # This let's us keep track of which loop count was last successful - 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 - 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 -run_loop diff --git a/scripts/workflows/kotd/run_kernel_ci_kotd.sh b/scripts/workflows/kotd/run_kernel_ci_kotd.sh deleted file mode 100755 index a1ec8cbd..00000000 --- a/scripts/workflows/kotd/run_kernel_ci_kotd.sh +++ /dev/null @@ -1,107 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: copyleft-next-0.3.1 - -# Part of kdevops kernel-ci, this script is in charge of updating your -# kernel after each kernel-ci loop. - -if [[ "$TOPDIR" == "" ]]; then - TOPDIR=$PWD -fi - -TARGET_WORKFLOW="$(basename $(dirname $0))" - -if [[ ! -f ${TOPDIR}/.config || ! -f ${TOPDIR}/scripts/lib.sh ]]; then - echo "Unconfigured system" - exit 1 -fi - -source ${TOPDIR}/.config -source ${TOPDIR}/scripts/lib.sh - -rm -f ${TOPDIR}/.kotd.* - -if [[ "$CONFIG_KERNEL_CI" != "y" ]]; then - echo "Must enable CONFIG_KERNEL_CI to use this feature" - exit 1 -fi - -TARGET_HOSTS="baseline" -if [[ "$1" != "" ]]; then - TARGET_HOSTS=$1 -fi - -kotd_log() -{ - NOW=$(date --rfc-3339='seconds' | awk -F"+" '{print $1}') - echo "$NOW : $@" >> $KOTD_LOG -} - -KOTD_LOOP_COUNT=1 - -kotd_log "Begin KOTD work" - -kotd_rev_kernel() -{ - kotd_log "***********************************************************" - kotd_log "Begin KOTD loop #$KOTD_LOOP_COUNT" - kotd_log "---------------------------------" - - if [[ "$CONFIG_WORKFLOW_KOTD_ENABLE" != "y" ]]; then - return - fi - - kotd_log "Going to try to rev kernel" - /usr/bin/time -f %E -o $KOTD_LOGTIME make kotd-${TARGET_HOSTS} - if [[ $? -ne 0 ]]; then - kotd_log "failed running: make kotd-$TARGET_HOSTS" - if [[ -f $KOTD_BEFORE ]]; then - KERNEL_BEFORE="$(cat $KOTD_BEFORE)" - kotd_log "KOTD before: $KERNEL_BEFORE" - fi - if [[ -f $KOTD_AFTER ]]; then - KERNEL_AFTER="$(cat $KOTD_BEFORE)" - kotd_log "KOTD after: $KERNEL_AFTER" - fi - THIS_KOTD_LOGTIME=$(cat $KOTD_LOGTIME) - kotd_log "KOTD reving work failed after this amount of time: $THIS_KOTD_LOGTIME" - exit 1 - fi - - THIS_KOTD_LOGTIME=$(cat $KOTD_LOGTIME) - kotd_log "KOTD reving work succeeded after this amount of time: $THIS_KOTD_LOGTIME" - - KERNEL_BEFORE="" - if [[ -f $KOTD_BEFORE ]]; then - KERNEL_BEFORE="$(cat $KOTD_BEFORE)" - kotd_log "KOTD before: $KERNEL_BEFORE" - fi - KERNEL_AFTER="" - if [[ -f $KOTD_AFTER ]]; then - KERNEL_AFTER="$(cat $KOTD_BEFORE)" - kotd_log "KOTD after: $KERNEL_AFTER" - if [[ "$KERNEL_BEFORE" == "$KERNEL_AFTER" ]]; then - kotd_log "KOTD no updates were made, kernel remains identical" - else - kotd_log "KOTD kernel was updated" - fi - fi -} - -while true; do - kotd_rev_kernel - if [[ "$CONFIG_KERNEL_CI_ENABLE_STEADY_STATE" == "y" ]]; then - kotd_log "Running the $TARGET_WORKFLOW kernel-ci loop with a steady state goal of $CONFIG_KERNEL_CI_STEADY_STATE_GOAL" - else - kotd_log "Running the $TARGET_WORKFLOW kernel-ci loop with no steady state goal set" - fi - /usr/bin/time -f %E -o $KOTD_LOGTIME make $TARGET_WORKFLOW-${TARGET_HOSTS}-loop - if [[ $? -ne 0 ]]; then - kotd_log "failed running: make $TARGET_WORKFLOW-${TARGET_HOSTS}-loop" - THIS_KOTD_LOGTIME=$(cat $KOTD_LOGTIME) - kotd_log "$TARGET_WORKFLOW kernel-ci work failed after this amount of time: $THIS_KOTD_LOGTIME" - exit 1 - fi - THIS_KOTD_LOGTIME=$(cat $KOTD_LOGTIME) - kotd_log "Completed kernel-ci loop work for $TARGET_WORKFLOW successfully after this amount of time: $THIS_KOTD_LOGTIME" - let KOTD_LOOP_COUNT=$KOTD_LOOP_COUNT+1 -done diff --git a/scripts/workflows/ltp/run_loop.sh b/scripts/workflows/ltp/run_loop.sh deleted file mode 100755 index df005beb..00000000 --- a/scripts/workflows/ltp/run_loop.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/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 - -source ${TOPDIR}/.config -source ${TOPDIR}/scripts/lib.sh - -WORKFLOWDIR=${TOPDIR}/workflows/ltp - -COUNT=1 - -run_loop() -{ - while true; do - echo "== kernel-ci ltp test loop $COUNT start: $(date)" > $KERNEL_CI_FAIL_LOG - echo "/usr/bin/time -f %E make ltp-baseline" >> $KERNEL_CI_FAIL_LOG - /usr/bin/time -p -o $KERNEL_CI_LOGTIME make ltp-baseline >> $KERNEL_CI_FAIL_LOG - ANSIBLE_CALL_RET=$? - echo "End $COUNT: $(date)" >> $KERNEL_CI_FAIL_LOG - cat $KERNEL_CI_LOGTIME >> $KERNEL_CI_FAIL_LOG - echo "git status:" >> $KERNEL_CI_FAIL_LOG - git status >> $KERNEL_CI_FAIL_LOG - echo "Results:" >> $KERNEL_CI_FAIL_LOG - - rm -f $KERNEL_CI_DIFF_LOG - - if [[ "$ANSIBLE_CALL_RET" -ne 0 ]]; then - echo "Test $COUNT: FAILED!" >> $KERNEL_CI_DIFF_LOG - echo "== Test loop count $COUNT" >> $KERNEL_CI_DIFF_LOG - echo "$(git describe)" >> $KERNEL_CI_DIFF_LOG - git diff >> $KERNEL_CI_DIFF_LOG - cat $KERNEL_CI_DIFF_LOG >> $KERNEL_CI_FAIL_LOG - cat $KERNEL_CI_FAIL_LOG >> $KERNEL_CI_FULL_LOG - echo $COUNT > $KERNEL_CI_FAIL_FILE - exit 1 - else - echo "Test $COUNT: OK!" >> $KERNEL_CI_FAIL_LOG - echo "----------------------------------------------------------------" >> $KERNEL_CI_FAIL_LOG - cat $KERNEL_CI_FAIL_LOG >> $KERNEL_CI_FULL_LOG - fi - - # This let's us keep track of which loop count was last successful - 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 - 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 -run_loop diff --git a/scripts/workflows/nfstest/run_loop.sh b/scripts/workflows/nfstest/run_loop.sh deleted file mode 100755 index 22f80ca4..00000000 --- a/scripts/workflows/nfstest/run_loop.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/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 - -source ${TOPDIR}/.config -source ${TOPDIR}/scripts/lib.sh - -WORKFLOWDIR=${TOPDIR}/workflows/nfstest - -COUNT=1 - -run_loop() -{ - while true; do - echo "== kernel-ci nfstest test loop $COUNT start: $(date)" > $KERNEL_CI_FAIL_LOG - echo "/usr/bin/time -f %E make nfstest-baseline" >> $KERNEL_CI_FAIL_LOG - /usr/bin/time -p -o $KERNEL_CI_LOGTIME make nfstest-baseline >> $KERNEL_CI_FAIL_LOG - ANSIBLE_CALL_RET=$? - echo "End $COUNT: $(date)" >> $KERNEL_CI_FAIL_LOG - cat $KERNEL_CI_LOGTIME >> $KERNEL_CI_FAIL_LOG - echo "git status:" >> $KERNEL_CI_FAIL_LOG - git status >> $KERNEL_CI_FAIL_LOG - echo "Results:" >> $KERNEL_CI_FAIL_LOG - - rm -f $KERNEL_CI_DIFF_LOG - - if [[ "$ANSIBLE_CALL_RET" -ne 0 ]]; then - echo "Test $COUNT: FAILED!" >> $KERNEL_CI_DIFF_LOG - echo "== Test loop count $COUNT" >> $KERNEL_CI_DIFF_LOG - echo "$(git describe)" >> $KERNEL_CI_DIFF_LOG - git diff >> $KERNEL_CI_DIFF_LOG - cat $KERNEL_CI_DIFF_LOG >> $KERNEL_CI_FAIL_LOG - cat $KERNEL_CI_FAIL_LOG >> $KERNEL_CI_FULL_LOG - echo $COUNT > $KERNEL_CI_FAIL_FILE - exit 1 - else - echo "Test $COUNT: OK!" >> $KERNEL_CI_FAIL_LOG - echo "----------------------------------------------------------------" >> $KERNEL_CI_FAIL_LOG - cat $KERNEL_CI_FAIL_LOG >> $KERNEL_CI_FULL_LOG - fi - - # This let's us keep track of which loop count was last successful - 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 - 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 -run_loop diff --git a/scripts/workflows/pynfs/run_loop.sh b/scripts/workflows/pynfs/run_loop.sh deleted file mode 100755 index 3e953581..00000000 --- a/scripts/workflows/pynfs/run_loop.sh +++ /dev/null @@ -1,79 +0,0 @@ -#!/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 - -source ${TOPDIR}/.config -source ${TOPDIR}/scripts/lib.sh - -WORKFLOWDIR=${TOPDIR}/workflows/pynfs - -COUNT=1 - -run_loop() -{ - while true; do - echo "== kernel-ci pynfs test loop $COUNT start: $(date)" > $KERNEL_CI_FAIL_LOG - echo "/usr/bin/time -f %E make pynfs-baseline" >> $KERNEL_CI_FAIL_LOG - /usr/bin/time -p -o $KERNEL_CI_LOGTIME make pynfs-baseline >> $KERNEL_CI_FAIL_LOG - ANSIBLE_CALL_RET=$? - echo "End $COUNT: $(date)" >> $KERNEL_CI_FAIL_LOG - cat $KERNEL_CI_LOGTIME >> $KERNEL_CI_FAIL_LOG - echo "git status:" >> $KERNEL_CI_FAIL_LOG - git status >> $KERNEL_CI_FAIL_LOG - echo "Results:" >> $KERNEL_CI_FAIL_LOG - - rm -f $KERNEL_CI_DIFF_LOG - - if [ "$ANSIBLE_CALL_RET" -eq 0 ]; then - # get latest results files - JSON40=$(ls -t1 ${WORKFLOWDIR}/results/*-v4.0.json | head -1) - JSON41=$(ls -t1 ${WORKFLOWDIR}/results/*-v4.1.json | head -1) - - local tmpfile=$(mktemp) - ${TOPDIR}/scripts/workflows/pynfs/check_pynfs_results.py ${WORKFLOWDIR}/baseline/current-v4.0.json $JSON40 > $tmpfile - RET40=$? - if [ "$RET40" -ne 0 ]; then - echo "New v4.0 Failures:" >> $KERNEL_CI_DIFF_LOG - cat $tmpfile >> $KERNEL_CI_DIFF_LOG - fi - ${TOPDIR}/scripts/workflows/pynfs/check_pynfs_results.py ${WORKFLOWDIR}/baseline/current-v4.1.json $JSON41 > $tmpfile - RET41=$? - if [ "$RET41" -ne 0 ]; then - echo "New v4.1+ Failures:" >> $KERNEL_CI_DIFF_LOG - cat $tmpfile >> $KERNEL_CI_DIFF_LOG - fi - rm $tmpfile - fi - - if [[ "$ANSIBLE_CALL_RET" -ne 0 || "$RET40" -ne 0 || "$RET41" -ne 0 ]]; then - echo "Test $COUNT: FAILED!" >> $KERNEL_CI_DIFF_LOG - echo "== Test loop count $COUNT" >> $KERNEL_CI_DIFF_LOG - echo "$(git describe)" >> $KERNEL_CI_DIFF_LOG - git diff >> $KERNEL_CI_DIFF_LOG - cat $KERNEL_CI_DIFF_LOG >> $KERNEL_CI_FAIL_LOG - cat $KERNEL_CI_FAIL_LOG >> $KERNEL_CI_FULL_LOG - echo $COUNT > $KERNEL_CI_FAIL_FILE - exit 1 - else - echo "Test $COUNT: OK!" >> $KERNEL_CI_FAIL_LOG - echo "----------------------------------------------------------------" >> $KERNEL_CI_FAIL_LOG - cat $KERNEL_CI_FAIL_LOG >> $KERNEL_CI_FULL_LOG - fi - - # This let's us keep track of which loop count was last successful - 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 - 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 -run_loop -- 2.47.2