tests: add check for long kernel parameters support in zipl

This commit is contained in:
Dan Horák 2025-07-31 17:55:16 +02:00
parent b84c0f81db
commit e18b9ab604
2 changed files with 74 additions and 0 deletions

View File

@ -0,0 +1,18 @@
summary: zipl-long-params
description: |
Check for long parameter line support in zipl
link: https://issues.redhat.com/browse/RHEL-105492
contact: Daniel Horák <dhorak@redhat.com>
component:
- s390utils
test: ./runtest.sh
framework: beakerlib
require:
- s390utils-core
- grubby
duration: 5m
enabled: true
adjust:
- when: arch != s390x
enabled: false
because: This test applies only to s390x systems.

View File

@ -0,0 +1,56 @@
#!/bin/bash
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Description: Check for long parameter line support in zipl
# Author: Dan Horák <dhorak@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2025 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="s390utils-core"
PARAMS=params.txt
rlJournalStart
if [ "$TMT_REBOOT_COUNT" -eq 0 ]; then
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlPhaseEnd
rlPhaseStartTest "Check if long kernel parameter line is supported"
# add additional parameters for the default kernel, 24x 46B = 1104B, over the original 896B limit
( for i in `seq -w 0 23`; do echo -n " param$i=`uuidgen`"; done ) > $PARAMS
rlRun 'grubby --args="$(cat $PARAMS)" --update-kernel=DEFAULT'
rlRun "zipl -V"
rlPhaseEnd
rlRun "tmt-reboot" 0 "Reboot the machine"
elif [ "$TMT_REBOOT_COUNT" -eq 1 ]; then
rlPhaseStartTest "Check if all parameters are present after reboot"
rlRun "grep -f $PARAMS /proc/cmdline"
rlPhaseEnd
rlPhaseStartCleanup
rlPhaseEnd
fi
rlJournalPrintText
rlJournalEnd