Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions .packit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,23 @@ _:
distros: [RHEL-10.2-Nightly]
skip_build: true
manual_trigger: false
tmt_plan: kpatch-integration-rhel
fmf_url: https://gitlab.com/redhat/centos-stream/tests/kernel/test-plans.git
fmf_ref: main
tmt_plan: kpatch-integration-rhel/kernel
fmf_url: https://gitlab.com/mkostic1/test-plans.git
fmf_ref: integration-kernel-case

common-rhel-64k-test-config: &common-rhel-64k-test-config
job: tests
branch: master
identifier: "integration-rhel-64k"
use_internal_tf: true
targets:
rhel+epel-10-aarch64:
distros: [RHEL-10.3-Nightly]
skip_build: true
manual_trigger: false
tmt_plan: kpatch-integration-rhel/kernel-64k
fmf_url: https://gitlab.com/mkostic1/test-plans.git
fmf_ref: integration-kernel-case

jobs:
- <<: *common-upstream-kernel-test-config
Expand All @@ -70,3 +84,12 @@ jobs:
trigger: commit
labels:
- integration-commit

- <<: *common-rhel-64k-test-config
trigger: pull_request
labels:
- integration-pr
- <<: *common-rhel-64k-test-config
trigger: commit
labels:
- integration-commit
7 changes: 6 additions & 1 deletion kpatch-build/kpatch-build
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,11 @@ if [[ "$ARCHVERSION" =~ - ]]; then
KREL="${KREL%.*}"
fi

VARIANT=""
if [[ "$ARCHVERSION" =~ \+(.*)$ ]]; then
VARIANT="-${BASH_REMATCH[1]//_/-}"
fi

[[ "$ARCHVERSION" =~ .el7a. ]] && ALT="-alt"

[[ -z "$TARGETS" ]] && TARGETS="vmlinux modules"
Expand Down Expand Up @@ -1114,7 +1119,7 @@ else
elif [[ "$DISTRO" = photon ]]; then
[[ -z "$CONFIGFILE" ]] && CONFIGFILE="$KERNEL_SRCDIR"/.config
else
[[ -z "$CONFIGFILE" ]] && CONFIGFILE="$KERNEL_SRCDIR/configs/kernel$ALT-$KVER-$ARCH.config"
[[ -z "$CONFIGFILE" ]] && CONFIGFILE="$KERNEL_SRCDIR/configs/kernel$ALT-$KVER-$ARCH$VARIANT.config"
fi
if [[ ! "$DISTRO" = photon ]]; then
(cd "$KERNEL_SRCDIR" && make mrproper 2>&1 | logger) || die
Expand Down
14 changes: 10 additions & 4 deletions test/integration/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,30 +42,36 @@ kpatch_rhel_dependencies()
local arch
local rhel_major
local yum_utils_version
local variant=""
kernel_version=$(uname -r)
arch=$(uname -m)
rhel_major=${VERSION_ID%%.*}

# Detect kernel (e.g., +64k , +rt_64k)
if [[ "$kernel_version" =~ \+(.*)$ ]]; then
variant="-${BASH_REMATCH[1]//_/-}"
fi

# kpatch-build dependencies
sudo yum install -y \
elfutils \
elfutils-devel \
gcc \
gcc-c++ \
git \
"kernel-devel-${kernel_version%.*}" \
"kernel${variant}-devel-${kernel_version%.*}" \
rpm-build \
wget \
yum-utils
sudo debuginfo-install -y "kernel-${kernel_version%.*}"
sudo debuginfo-install -y "kernel${variant}-${kernel_version%.*}"
[[ "$arch" == "ppc64le" ]] && sudo yum install -y gcc-plugin-devel

# kernel dependencies
yum_utils_version=$(rpm -q --queryformat="%{version}" yum-utils)
if [[ "${yum_utils_version}" = "$(echo -e "${yum_utils_version}\\n4.0.12" | sort -rV | head -n1)" ]]; then
sudo yum-builddep -y --skip-unavailable "kernel-${kernel_version%.*}"
sudo yum-builddep -y --skip-unavailable "kernel${variant}-${kernel_version%.*}"
else
sudo yum-builddep -y "kernel-${kernel_version%.*}"
sudo yum-builddep -y "kernel${variant}-${kernel_version%.*}"
fi
[[ "$arch" == "x86_64" ]] && sudo yum install -y pesign

Expand Down
Loading