Skip to content

Commit

Permalink
Merge branch 'main' into rhel10-fix-43460
Browse files Browse the repository at this point in the history
  • Loading branch information
pvalena authored Aug 8, 2024
2 parents 1487a70 + 45a1020 commit 0d71552
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 36 deletions.
29 changes: 0 additions & 29 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,35 +62,6 @@ jobs:
uses: actions/checkout@v4
- name: "${{ matrix.container }} TEST-${{ matrix.test }}"
run: USE_NETWORK=${{ matrix.network }} ./tools/test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}
network-legacy:
name: ${{ matrix.test }} on ${{ matrix.container }} using ${{ matrix.network }}
runs-on: ubuntu-latest
timeout-minutes: 45
concurrency:
group: network-legacy-${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }}-${{ matrix.network }}
cancel-in-progress: true
strategy:
matrix:
container: [
"centos:stream10",
]
network: [
"network-legacy",
]
test: [
"20",
"30",
"40",
]
fail-fast: false
container:
image: ghcr.io/redhat-plumbers/${{ matrix.container }}
options: "--privileged -v /dev:/dev"
steps:
- name: "Checkout Repository"
uses: actions/checkout@v4
- name: "${{ matrix.container }} TEST-${{ matrix.test }}"
run: USE_NETWORK=${{ matrix.network }} ./tools/test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}
systemd-networkd:
name: ${{ matrix.test }} on ${{ matrix.container }} using ${{ matrix.network }}
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .packit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ patch_generation_ignore_paths:
- .distro/
- .packit.yml
- .github/
- test/
patch_generation_patch_id_digits: 1
sync_changelog: true

Expand Down
2 changes: 1 addition & 1 deletion modules.d/80test-makeroot/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ check() {
}

depends() {
echo "dash rootfs-block kernel-modules qemu"
echo "rootfs-block kernel-modules qemu"
}

installkernel() {
Expand Down
8 changes: 6 additions & 2 deletions test/TEST-16-DMSQUASH/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,18 @@ SUBSYSTEM=="block", ENV{ID_FS_TYPE}=="ntfs", ENV{ID_FS_TYPE}="ntfs3"
EOF

test_dracut \
--modules "dash dmsquash-live qemu" \
--no-hostonly \
--add "dmsquash-live qemu" \
--omit "systemd" \
--drivers "ntfs3" \
--install "mkfs.ext4" \
--include /tmp/ntfs3.rules /lib/udev/rules.d/ntfs3.rules \
"$TESTDIR"/initramfs.testing

test_dracut \
--modules "dmsquash-live-autooverlay qemu" \
--no-hostonly \
--add "dmsquash-live-autooverlay qemu" \
--omit "systemd" \
--install "mkfs.ext4" \
"$TESTDIR"/initramfs.testing-autooverlay

Expand Down
1 change: 1 addition & 0 deletions test/TEST-20-NFS/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ test_setup() {

# Make client's dracut image
test_dracut \
--no-hostonly --no-hostonly-cmdline \
-a "dmsquash-live ${USE_NETWORK}" \
"$TESTDIR"/initramfs.testing

Expand Down
3 changes: 2 additions & 1 deletion test/TEST-30-ISCSI/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ test_setup() {

# Make server's dracut image
"$DRACUT" -l \
-a "dash rootfs-block test kernel-modules network-legacy" \
-a "rootfs-block test kernel-modules ${USE_NETWORK}" \
-d "piix ide-gd_mod ata_piix ext4 sd_mod e1000 drbg virtio_pci virtio_scsi" \
-i "./server.link" "/etc/systemd/network/01-server.link" \
-i ./wait-if-server.sh /lib/dracut/hooks/pre-mount/99-wait-if-server.sh \
Expand All @@ -222,6 +222,7 @@ test_setup() {

# Make client's dracut image
test_dracut \
--no-hostonly --no-hostonly-cmdline \
--add "$USE_NETWORK" \
--include "./client.link" "/etc/systemd/network/01-client.link" \
--kernel-cmdline "rw rd.auto rd.retry=50" \
Expand Down
3 changes: 2 additions & 1 deletion test/TEST-35-ISCSI-MULTI/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,14 @@ test_setup() {

# Make client's dracut image
test_dracut \
--no-hostonly --no-hostonly-cmdline \
--add "$USE_NETWORK" \
-i "./client.link" "/etc/systemd/network/01-client.link" \
"$TESTDIR"/initramfs.testing

# Make server's dracut image
"$DRACUT" -l -i "$TESTDIR"/overlay / \
-a "test dash rootfs-block debug kernel-modules network-legacy" \
-a "test rootfs-block debug kernel-modules ${USE_NETWORK}" \
-d "af_packet piix ide-gd_mod ata_piix ext4 sd_mod e1000 drbg" \
-i "./server.link" "/etc/systemd/network/01-server.link" \
-i "./wait-if-server.sh" "/lib/dracut/hooks/pre-mount/99-wait-if-server.sh" \
Expand Down
1 change: 1 addition & 0 deletions test/TEST-40-NBD/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ test_setup() {
echo -n test > /tmp/key

test_dracut \
--no-hostonly --no-hostonly-cmdline \
-a "${USE_NETWORK}" \
-i "./cryptroot-ask.sh" "/sbin/cryptroot-ask" \
-i "./client.link" "/etc/systemd/network/01-client.link" \
Expand Down
1 change: 1 addition & 0 deletions test/TEST-50-MULTINIC/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ test_setup() {
)
# Make client's dracut image
test_dracut \
--no-hostonly --no-hostonly-cmdline \
-a "${USE_NETWORK}" \
"$TESTDIR"/initramfs.testing

Expand Down
1 change: 1 addition & 0 deletions test/TEST-60-BONDBRIDGEVLAN/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ test_setup() {
)
# Make client's dracut image
test_dracut \
--no-hostonly --no-hostonly-cmdline \
-a "debug ${USE_NETWORK} ifcfg" \
"$TESTDIR"/initramfs.testing

Expand Down
9 changes: 8 additions & 1 deletion test/container/Dockerfile-CentOS-10-Stream
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ RUN echo 'export DRACUT_NO_XATTR=1 KVERSION=$(cd /lib/modules; ls -1 | tail -1)'

# Install needed packages for the dracut CI container
# FIXME: properly re-add dash once C10S EPEL is available
# http://mirrors.kernel.org/fedora/releases/34/Everything/x86_64/os/Packages/d/dash-0.5.10.2-8.fc34.x86_64.rpm \
RUN dnf -y install --skip-broken --enablerepo crb --setopt=install_weak_deps=False \
https://kojipkgs.fedoraproject.org//packages/dash/0.5.12/4.eln141/x86_64/dash-0.5.12-4.eln141.x86_64.rpm \
https://kojipkgs.fedoraproject.org//packages/btrfs-progs/6.9.2/1.eln141/x86_64/btrfs-progs-6.9.2-1.eln141.x86_64.rpm \
qemu-kvm \
NetworkManager \
asciidoc \
Expand Down Expand Up @@ -121,3 +122,9 @@ RUN dnf -y install --skip-broken --setopt=install_weak_deps=False \
wget \
xz \
&& dnf -y remove dracut --noautoremove && dnf -y update && dnf clean all

# discard configurations that enforce an out-of-tree dracut module
# which would break test automation
# since this is a distro specific change, lets do it in the container
RUN \
rm -rf /usr/lib/dracut/dracut.conf.d/50-nss-softokn.conf
11 changes: 10 additions & 1 deletion test/test-functions
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,16 @@ DRACUT=${DRACUT-${basedir}/dracut.sh}
PKGLIBDIR=${PKGLIBDIR-$basedir}

test_dracut() {
TEST_DRACUT_ARGS+=" --local --no-hostonly --no-hostonly-cmdline --no-early-microcode --add test --force --kver $KVERSION"
# directory for test configurations
mkdir -p /tmp/dracut.conf.d

# grab the distro configuration from the host and make it available for the tests
if [ -d /usr/lib/dracut/dracut.conf.d ]; then
cp -a /usr/lib/dracut/dracut.conf.d /tmp/
fi

# pick up configuration from /tmp/dracut.conf.d when running the tests
TEST_DRACUT_ARGS+=" --local --confdir /tmp/dracut.conf.d --no-early-microcode --add test --force --kver $KVERSION"

# include $TESTDIR"/overlay if exists
if [ -d "$TESTDIR"/overlay ]; then
Expand Down

0 comments on commit 0d71552

Please sign in to comment.