diff --git a/ci/vmtest/helpers.sh b/ci/vmtest/helpers.sh index c44d0983..86c734cf 100755 --- a/ci/vmtest/helpers.sh +++ b/ci/vmtest/helpers.sh @@ -36,3 +36,11 @@ print_error() { print_notice() { __print notice $1 $2 } + +read_lists() { + (for path in "$@"; do + if [[ -s "$path" ]]; then + cat "$path" + fi; + done) | cut -d'#' -f1 | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' | tr -s '\n' ',' +} diff --git a/ci/vmtest/sched_ext_selftests.sh b/ci/vmtest/sched_ext_selftests.sh new file mode 100755 index 00000000..a20672db --- /dev/null +++ b/ci/vmtest/sched_ext_selftests.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +set -euo pipefail + +source "$(cd "$(dirname "$0")" && pwd)/helpers.sh" + +foldable start selftests/sched_ext "Executing selftests/sched_ext/runner" + +SELFTESTS_DIR="${KERNEL_ROOT}/selftests/sched_ext" +STATUS_FILE=/mnt/vmtest/exitstatus + +cd "${SELFTESTS_DIR}" +./runner "$@" | tee runner.log + +failed=$(tail -n 16 runner.log | grep "FAILED" | awk '{print $2}') + +echo "selftests/sched_ext:$failed" >>"${STATUS_FILE}" + +foldable end selftests/sched_ext diff --git a/ci/vmtest/vmtest_selftests.sh b/ci/vmtest/vmtest_selftests.sh index e4e368b8..699a92e8 100755 --- a/ci/vmtest/vmtest_selftests.sh +++ b/ci/vmtest/vmtest_selftests.sh @@ -13,7 +13,7 @@ set -euo pipefail source "$(cd "$(dirname "$0")" && pwd)/helpers.sh" ARCH=$(uname -m) -DEPLOYMENT=$(if [[ "$GITHUB_REPOSITORY" == *"-rc" ]]; then echo "rc"; else echo "prod"; fi) +DEPLOYMENT=$(if [[ "$GITHUB_REPOSITORY" == "kernel-patches/bpf" ]]; then echo "prod"; else echo "rc"; fi) STATUS_FILE=/mnt/vmtest/exitstatus OUTPUT_DIR=/mnt/vmtest @@ -22,14 +22,6 @@ WORKING_DIR="/${PROJECT_NAME}" BPF_SELFTESTS_DIR="${WORKING_DIR}/selftests/bpf" VMTEST_CONFIGS_PATH="${WORKING_DIR}/ci/vmtest/configs" -read_lists() { - (for path in "$@"; do - if [[ -s "$path" ]]; then - cat "$path" - fi; - done) | cut -d'#' -f1 | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' | tr -s '\n' ',' -} - DENYLIST=$(read_lists \ "$BPF_SELFTESTS_DIR/DENYLIST" \ "$BPF_SELFTESTS_DIR/DENYLIST.${ARCH}" \