Blame SOURCES/openscap-1.3.6-waive-hugetables-pr-1745.patch

02a573
From 192f908562779fe4c9b7e5cc7605840976a06c85 Mon Sep 17 00:00:00 2001
02a573
From: =?UTF-8?q?Jan=20=C4=8Cern=C3=BD?= <jcerny@redhat.com>
02a573
Date: Mon, 26 Apr 2021 13:13:26 +0200
02a573
Subject: [PATCH] Waive the known issue with hugepages on ppc64/ppc64le
02a573
02a573
The known issue has been reported in
02a573
https://bugzilla.redhat.com/show_bug.cgi?id=1642995
02a573
02a573
This modification is currently applied as a patch applied during setup
02a573
phase of Sanity/smoke-test in Fedora CI gating.
02a573
https://src.fedoraproject.org/tests/openscap/blob/main/f/Sanity/smoke-test
02a573
The patched file got changed recetly so the patch doesn't apply anymore
02a573
which causes the Rawhide gating to fail.
02a573
We have decided to propose the change to upstream to avoid the need
02a573
for modifying the patch in the tests and to prevent similar problems
02a573
in the future.
02a573
---
02a573
 tests/probes/sysctl/test_sysctl_probe_all.sh | 5 +++++
02a573
 1 file changed, 5 insertions(+)
02a573
02a573
diff --git a/tests/probes/sysctl/test_sysctl_probe_all.sh b/tests/probes/sysctl/test_sysctl_probe_all.sh
02a573
index 2280ff7ae..c79d7ed18 100755
02a573
--- a/tests/probes/sysctl/test_sysctl_probe_all.sh
02a573
+++ b/tests/probes/sysctl/test_sysctl_probe_all.sh
02a573
@@ -73,6 +73,10 @@ if [ "$procps_ver" != "$lowest_ver" ]; then
02a573
 	sed -i '/.*vm.stat_refresh/d' "$sysctlNames"
02a573
 fi
02a573
 
02a573
+if ! grep -q "hugepages" "$ourNames"; then
02a573
+	sed -i "/^.*hugepages.*$/d" "$sysctlNames"
02a573
+fi
02a573
+
02a573
 echo "Diff (sysctlNames / ourNames): ------"
02a573
 diff "$sysctlNames" "$ourNames"
02a573
 echo "-------------------------------------"
02a573
@@ -84,6 +88,7 @@ sed -i -E "/^E: oscap: +Can't read sysctl value from /d" "$stderr"
02a573
 # that can't fit into 8K buffer and result in errno 14
02a573
 # (for example /proc/sys/kernel/spl/hostid could be the case)
02a573
 sed -i -E "/^E: oscap: +An error.*14, Bad address/d" "$stderr"
02a573
+sed -i "/^.*hugepages.*$/d" "$stderr"
02a573
 
02a573
 echo "Errors (without messages related to permissions):"
02a573
 cat "$stderr"