public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Matus Marhefka <mmarhefk@redhat.com>
To: git-commits@fedoraproject.org
Subject: [tests/openscap] main: Sanity/smoke-test: remove no longer needed conditions for old EOL releases
Date: Mon, 02 Nov 2026 11:31:45 GMT	[thread overview]
Message-ID: <179361910519.1.6814185087657730418.tests-openscap-aa232a7339b7@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : tests/openscap
Branch : main
Commit : aa232a7339b71a2faba849ec9554ff3bf0846734
Author : Matus Marhefka <mmarhefk@redhat.com>
Date   : 2026-11-02T11:41:02+01:00
Stats  : +37/-123 in 3 file(s)
URL    : https://src.fedoraproject.org/tests/openscap/c/aa232a7339b71a2faba849ec9554ff3bf0846734?branch=main

Log:
Sanity/smoke-test: remove no longer needed conditions for old EOL releases

---
diff --git a/Sanity/smoke-test/fix_hugepages_err.patch b/Sanity/smoke-test/fix_hugepages_err.patch
deleted file mode 100644
index d86bd0f..0000000
--- a/Sanity/smoke-test/fix_hugepages_err.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff --git a/tests/probes/sysctl/test_sysctl_probe_all.sh b/tests/probes/sysctl/test_sysctl_probe_all.sh
-index bc9513347..2f17adc8b 100755
---- a/tests/probes/sysctl/test_sysctl_probe_all.sh
-+++ b/tests/probes/sysctl/test_sysctl_probe_all.sh
-@@ -73,10 +73,14 @@ if [ "$procps_ver" != "$lowest_ver" ]; then
- 	sed -i '/.*vm.stat_refresh/d' "$sysctlNames"
- fi
- 
-+if ! grep -q "hugepages" "$ourNames"; then
-+	sed -i "/^.*hugepages.*$/d" "$sysctlNames"
-+fi
- diff "$sysctlNames" "$ourNames"
- 
- # remove oscap error message related to permissions from stderr
- sed -i -E "/^E: oscap: +Can't read sysctl value from /d" "$stderr"
-+sed -i "/^.*hugepages.*$/d" "$stderr"
- [ ! -s $stderr ]
- 
- rm $stderr $result $ourNames $sysctlNames

diff --git a/Sanity/smoke-test/fix_hugepages_err7.patch b/Sanity/smoke-test/fix_hugepages_err7.patch
deleted file mode 100644
index 4ca95ee..0000000
--- a/Sanity/smoke-test/fix_hugepages_err7.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/tests/probes/sysctl/test_sysctl_probe_all.sh b/tests/probes/sysctl/test_sysctl_probe_all.sh
-index 732d22ec1..119e92c33 100755
---- a/tests/probes/sysctl/test_sysctl_probe_all.sh
-+++ b/tests/probes/sysctl/test_sysctl_probe_all.sh
-@@ -69,6 +69,7 @@ diff "$sysctlNames" "$ourNames"
- 
- # remove oscap error message related to permissions from stderr
- sed -i -E "/^E: lt-probe_sysctl: Can't read sysctl value from /d" "$stderr"
-+sed -i "/^.*hugepages.*$/d" "$stderr"
- [ ! -s $stderr ]
- 
- rm $stderr $result $ourNames $sysctlNames

diff --git a/Sanity/smoke-test/runtest.sh b/Sanity/smoke-test/runtest.sh
index 818559b..a15926c 100755
--- a/Sanity/smoke-test/runtest.sh
+++ b/Sanity/smoke-test/runtest.sh
@@ -42,28 +42,20 @@ rlJournalStart
         rlRun "TmpDir=\$(mktemp -d)" 0
         # shellcheck disable=SC2154 # TmpDir is assigned by rlRun above
         CleanupRegister "rlRun 'rm -r $TmpDir' 0 'Removing tmp directory'"
-        rlRun "cp fix_hugepages_err7.patch fix_hugepages_err.patch $TmpDir"
         rlRun "pushd $TmpDir"
         CleanupRegister "rlRun 'popd'"
         rlServiceStart sendmail
         CleanupRegister "rlRun 'rlServiceRestore sendmail'"
 
-        if rlIsRHEL 7; then
-            rlLog "Build system is using the latest version of python, therefore"
-            rlLog "python3 packages must not be present on the machine to make"
-            rlLog "sure that the build system configures with python2."
-            rlRun "yum remove -y python3*" 0 "python3 packages must not be installed"
-        elif rlIsRHEL ">=8"; then
-            rlFileBackup "/etc/yum.repos.d/"
-            CleanupRegister "rlFileRestore"
-            # we have to enable buildroot repo
-            rlRun "dnf config-manager --set-enabled rhel-buildroot" 0-255
-            # Some packages needed to build openscap moved from rhel-buildroot to rhel-CRB
-            rlRun "dnf config-manager --set-enabled rhel-CRB" 0-255
-            rlRun "dnf config-manager --set-enabled beaker-CRB" 0-255
-            # AppStream source repo is not enabled by default
-            rlRun "dnf config-manager --set-enabled beaker-AppStream-source" 0-255
-        fi
+        rlFileBackup "/etc/yum.repos.d/"
+        CleanupRegister "rlFileRestore"
+        # we have to enable buildroot repo
+        rlRun "dnf config-manager --set-enabled rhel-buildroot" 0-255
+        # Some packages needed to build openscap moved from rhel-buildroot to rhel-CRB
+        rlRun "dnf config-manager --set-enabled rhel-CRB" 0-255
+        rlRun "dnf config-manager --set-enabled beaker-CRB" 0-255
+        # AppStream source repo is not enabled by default
+        rlRun "dnf config-manager --set-enabled beaker-AppStream-source" 0-255
 
         # in RHEL10, pytest is in CRB which is not enabled during tmt preparation phase
         if rlIsRHEL ">=10"; then
@@ -71,11 +63,7 @@ rlJournalStart
         fi
 
         rlFetchSrcForInstalled $PACKAGE
-        if rlIsRHEL "<=7"; then
-            rlRun "yum-builddep -y $PACKAGE*"
-        else
-            rlRun "dnf builddep -y $PACKAGE*"
-        fi
+        rlRun "dnf builddep -y $PACKAGE*"
         TOPDIR=$(rpm --eval %_topdir)
         rlRun "rm -rf ${TOPDIR}/BUILD/${PACKAGE}*" 0-255
         rlRun "rpm -ihv ./*.rpm" 0 "Install $PACKAGE source RPM"
@@ -86,32 +74,13 @@ rlJournalStart
         CleanupRegister "rlRun 'rm -rf ${TOPDIR}/BUILD/${PACKAGE}*'"
         CleanupRegister "rlRun 'rm -rf ${TOPDIR}/SPECS/${PACKAGE}*'"
         CleanupRegister "rlRun 'rm -rf ${TOPDIR}/SOURCES/*'"
-
-        if rlIsRHEL '<8.5' ; then
-            rlLogInfo "Waive the known issue with hugepages on ppc64/ppc64le"
-            rlLogInfo "platforms which won't be fixed on RHEL7:"
-            rlLogInfo "https://bugzilla.redhat.com/show_bug.cgi?id=1607382"
-            rlLogInfo "and is a known issue on RHEL >= 8:"
-            rlLogInfo "https://bugzilla.redhat.com/show_bug.cgi?id=1642995"
-            TEST_CWD=$(pwd)
-            TREE_CWD=$(readlink -f "${TOPDIR}/BUILD/${PACKAGE}"*)
-            if rlIsRHEL 7; then
-                HUGEPAGES_PATCH="fix_hugepages_err7.patch"
-            else
-                HUGEPAGES_PATCH="fix_hugepages_err.patch"
-            fi
-            rlRun "cp $HUGEPAGES_PATCH $TREE_CWD"
-            rlRun "cd $TREE_CWD"
-            rlRun "patch -p1 < $HUGEPAGES_PATCH"
-            rlRun "cd $TEST_CWD" 0 "Restore test default working directory"
-        fi
     rlPhaseEnd
 
     rlPhaseStartTest "Run upstream test suite against installed $PACKAGE"
         rlRun "export OSCAP_FULL_VALIDATION=1"
         rlRun "export CUSTOM_OSCAP=$(which oscap)"
         BUILD_DIR="$(rpm --eval '%{_vpath_builddir}')"
-        if rlIsFedora ">=41"; then
+        if rlIsFedora; then
             BUILD_DIR_PATH=$(readlink -f "${TOPDIR}/BUILD/${PACKAGE}"*/"${PACKAGE}"*/"${BUILD_DIR}")
         else
             BUILD_DIR_PATH=$(readlink -f "${TOPDIR}/BUILD/${PACKAGE}"*/"${BUILD_DIR}")
@@ -119,63 +88,39 @@ rlJournalStart
                 BUILD_DIR_PATH=$(readlink -f "${TOPDIR}/BUILD/${PACKAGE}"*/build)
             fi
         fi
-        if rlIsRHEL "<=7"; then
-            rlRun -s "make -C $(readlink -f "${TOPDIR}/BUILD/${PACKAGE}"*) check"
-            rv=$?
-        else
-            rlRun -s "ctest --test-dir $BUILD_DIR_PATH --output-on-failure"
-            rv=$?
-            # cmake output does not contain enough information, submit verbose output log
-            FILE="${BUILD_DIR_PATH}/Testing/Temporary/LastTest.log"
-            rlFileSubmit "$(readlink -f "$FILE")" test_verbose_output.log
-        fi
+        rlRun -s "ctest --test-dir $BUILD_DIR_PATH --output-on-failure"
+        rv=$?
+        # cmake output does not contain enough information, submit verbose output log
+        FILE="${BUILD_DIR_PATH}/Testing/Temporary/LastTest.log"
+        rlFileSubmit "$(readlink -f "$FILE")" test_verbose_output.log
 
         # if we got error, submit file with result of particular test for easier debugging
         if [ $rv -ne 0 ]; then
-            if rlIsRHEL "<=7"; then
-                # shellcheck disable=SC2154 # rlRun_LOG is set by rlRun -s
-                if grep "See tests/" "$rlRun_LOG"; then
-                    RESULT=$(grep "See tests/" "$rlRun_LOG" | sed -e "s/See tests\(.*\)/tests\1/")
-                    FILE=$(readlink -f "${TOPDIR}/BUILD/${PACKAGE}"*/"${RESULT}")
-                    cat "$FILE"
-                    rlBundleLogs test_outputs "$(dirname "$FILE")"
-                    if grep "See tests/" "$FILE"; then # we need to go deeper ...
-                        RESULT=$(grep "See tests/" "$FILE" | sed -e "s/See tests\(.*\)/tests\1/")
-                        FILE=$(readlink -f "${TOPDIR}/BUILD/${PACKAGE}"*/"${RESULT}")
-                        cat "$FILE"
-                        rlBundleLogs test_outputs_deep "$(dirname "$FILE")"
-                    fi
-                fi
-            else
-                FILE="${BUILD_DIR_PATH}/tests"
-                rlBundleLogs test_outputs_all "$(readlink -f "$FILE")"
-            fi
+            rlBundleLogs test_outputs_all "$(readlink -f "${BUILD_DIR_PATH}/tests")"
         fi
     rlPhaseEnd
 
-    if ! rlIsRHEL "<=7"; then
-        # C unit tests guarded by ${CUSTOM_OSCAP+x} skip their binary (and report
-        # Passed) when CUSTOM_OSCAP is set, so run them again with it unset.
-        rlPhaseStartTest "Run upstream C unit tests"
-            SRC_DIR=$(sed -n 's/^CMAKE_HOME_DIRECTORY:INTERNAL=//p' "$BUILD_DIR_PATH/CMakeCache.txt")
-            rlRun "test -d '$SRC_DIR/tests'" 0 "Source tests directory found: $SRC_DIR/tests"
-            UNIT_TESTS=$(cd "$SRC_DIR/tests" && grep -rlE 'CUSTOM_OSCAP\+x' --include='*.sh' . | sed 's|^\./||' | sort)
-            if [ -z "$UNIT_TESTS" ]; then
-                rlLogInfo "No CUSTOM_OSCAP-guarded unit tests found, skipping"
-            else
-                rlLogInfo "Guarded unit tests: $(echo "$UNIT_TESTS" | paste -sd' ')"
-                UNIT_TESTS_ESCAPED=${UNIT_TESTS//./\\.}
-                REGEX="^(${UNIT_TESTS_ESCAPED//$'\n'/|})\$"
-                rlRun -s "env -u CUSTOM_OSCAP ctest --test-dir $BUILD_DIR_PATH --output-on-failure -R '$REGEX'"
-                rv=$?
-                FILE="${BUILD_DIR_PATH}/Testing/Temporary/LastTest.log"
-                rlFileSubmit "$(readlink -f "$FILE")" unit_test_verbose_output.log
-                if [ $rv -ne 0 ]; then
-                    rlBundleLogs unit_test_outputs_all "$(readlink -f "${BUILD_DIR_PATH}/tests")"
-                fi
+    # C unit tests guarded by ${CUSTOM_OSCAP+x} skip their binary (and report
+    # Passed) when CUSTOM_OSCAP is set, so run them again with it unset.
+    rlPhaseStartTest "Run upstream C unit tests"
+        SRC_DIR=$(sed -n 's/^CMAKE_HOME_DIRECTORY:INTERNAL=//p' "$BUILD_DIR_PATH/CMakeCache.txt")
+        rlRun "test -d '$SRC_DIR/tests'" 0 "Source tests directory found: $SRC_DIR/tests"
+        UNIT_TESTS=$(cd "$SRC_DIR/tests" && grep -rlE 'CUSTOM_OSCAP\+x' --include='*.sh' . | sed 's|^\./||' | sort)
+        if [ -z "$UNIT_TESTS" ]; then
+            rlLogInfo "No CUSTOM_OSCAP-guarded unit tests found, skipping"
+        else
+            rlLogInfo "Guarded unit tests: $(echo "$UNIT_TESTS" | paste -sd' ')"
+            UNIT_TESTS_ESCAPED=${UNIT_TESTS//./\\.}
+            REGEX="^(${UNIT_TESTS_ESCAPED//$'\n'/|})\$"
+            rlRun -s "env -u CUSTOM_OSCAP ctest --test-dir $BUILD_DIR_PATH --output-on-failure -R '$REGEX'"
+            rv=$?
+            FILE="${BUILD_DIR_PATH}/Testing/Temporary/LastTest.log"
+            rlFileSubmit "$(readlink -f "$FILE")" unit_test_verbose_output.log
+            if [ $rv -ne 0 ]; then
+                rlBundleLogs unit_test_outputs_all "$(readlink -f "${BUILD_DIR_PATH}/tests")"
             fi
-        rlPhaseEnd
-    fi
+        fi
+    rlPhaseEnd
 
     rlPhaseStartCleanup
         CleanupDo

                 reply	other threads:[~2026-11-02 11:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179361910519.1.6814185087657730418.tests-openscap-aa232a7339b7@fedoraproject.org \
    --to=mmarhefk@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox