aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorKevin Daudt <kdaudt@alpinelinux.org>2020-05-01 20:58:22 +0000
committerKevin Daudt <kdaudt@alpinelinux.org>2020-05-01 20:59:22 +0000
commit5befc183667573f96dd0909343b9ac89dded64e1 (patch)
tree0fbd5cbd7bae44f4f57633e6cf7f22b7968b5a2c /main
parent312dbe117f6f084129f82df29703eabebe18e65b (diff)
downloadaports-5befc183667573f96dd0909343b9ac89dded64e1.tar.bz2
aports-5befc183667573f96dd0909343b9ac89dded64e1.tar.xz
main/fail2ban: skip tests with segfaults on s390x
Upstream issue: https://github.com/fail2ban/fail2ban/issues/2708
Diffstat (limited to 'main')
-rw-r--r--main/fail2ban/APKBUILD4
-rw-r--r--main/fail2ban/skip-tests-with-segfaults-on-s390x.patch81
2 files changed, 84 insertions, 1 deletions
diff --git a/main/fail2ban/APKBUILD b/main/fail2ban/APKBUILD
index 215be5ddfa..ffc18657ff 100644
--- a/main/fail2ban/APKBUILD
+++ b/main/fail2ban/APKBUILD
@@ -18,6 +18,7 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/fail2ban/fail2ban/archive/$p
alpine-ssh.jaild
alpine-sshd.filterd
alpine-sshd-ddos.filterd
+ skip-tests-with-segfaults-on-s390x.patch
"
[ "$CARCH" == "mips64" ] && options="!check"
@@ -51,4 +52,5 @@ sha512sums="019b088aa6375f98742ed101ef6f65adabca3324444d71d5b8597a8d1d22fa76b9f5
4ff9dd2793f42e414d83676104f47966f781b9e042e90dbc839d4e6b27faee08ebea2231b178d1d41084fa6c59aa62689bdb713977096d8b235a33e73268ccc5 fail2ban.logrotate
84915967ae1276f1e14a5813680ee2ebf081af1ff452a688ae5f9ac3363f4aff90e39f8e6456b5c33d5699917d28a16308797095fd1ef9bb1fbcb46d4cea3def alpine-ssh.jaild
3e8e08d5e349e857b51ce34a9d968f16661b34e1cec06bec0aa9a32723bbe9be5a9890dd479331a9cc860821d33b1bf3b8e995182e319dead5a3d434b1816304 alpine-sshd.filterd
-36a81b771be0b36fe0dfb5ee4c72c9cb5b504e110618a8eb6f0f241b4e57d92df01dc5cc04b6b68d5bc6a5e6d68de1000092770285d7a328e5937e50b4b226a3 alpine-sshd-ddos.filterd"
+36a81b771be0b36fe0dfb5ee4c72c9cb5b504e110618a8eb6f0f241b4e57d92df01dc5cc04b6b68d5bc6a5e6d68de1000092770285d7a328e5937e50b4b226a3 alpine-sshd-ddos.filterd
+3b98dac63af40e05dc91056e3add16af824877b9a72ea3a5e3f5790295bc2a7cb7cc762871971ceeac9803bff06375448aaa111a0b9002cb0d73736097a43922 skip-tests-with-segfaults-on-s390x.patch"
diff --git a/main/fail2ban/skip-tests-with-segfaults-on-s390x.patch b/main/fail2ban/skip-tests-with-segfaults-on-s390x.patch
new file mode 100644
index 0000000000..3d51c0d9fe
--- /dev/null
+++ b/main/fail2ban/skip-tests-with-segfaults-on-s390x.patch
@@ -0,0 +1,81 @@
+Upstream: no
+Reason: several tests segfault on s390x, so we skip them for now
+Url: https://github.com/fail2ban/fail2ban/issues/2708
+diff --git a/fail2ban/tests/databasetestcase.py b/fail2ban/tests/databasetestcase.py
+index 95bd9f9..cc89a37 100644
+--- a/fail2ban/tests/databasetestcase.py
++++ b/fail2ban/tests/databasetestcase.py
+@@ -43,6 +43,7 @@ from .utils import LogCaptureTestCase, logSys as DefLogSys
+
+ TEST_FILES_DIR = os.path.join(os.path.dirname(__file__), "files")
+
++import platform
+
+ # because of tests performance use memory instead of file:
+ def getFail2BanDb(filename):
+@@ -272,6 +273,7 @@ class DatabaseTest(LogCaptureTestCase):
+ self.assertTrue(
+ isinstance(tickets[0], FailTicket))
+
++ @unittest.skipIf(platform.machine() == 's390x', 'segfault')
+ def testAddBanInvalidEncoded(self):
+ self.testAddJail()
+ # invalid + valid, invalid + valid unicode, invalid + valid dual converted (like in filter:readline by fallback) ...
+@@ -425,6 +427,7 @@ class DatabaseTest(LogCaptureTestCase):
+ self.assertEqual(ticket.getAttempt(), len(failures))
+ self.assertEqual(len(ticket.getMatches()), 0)
+
++ @unittest.skipIf(platform.machine() == 's390x', 'segfault')
+ def testGetBansMerged(self):
+ self.testAddJail()
+
+diff --git a/fail2ban/tests/fail2banclienttestcase.py b/fail2ban/tests/fail2banclienttestcase.py
+index 7ebda8c..67e38c8 100644
+--- a/fail2ban/tests/fail2banclienttestcase.py
++++ b/fail2ban/tests/fail2banclienttestcase.py
+@@ -47,6 +47,7 @@ from .utils import LogCaptureTestCase, logSys as DefLogSys, with_tmpdir, shutil,
+ STOCK, CONFIG_DIR as STOCK_CONF_DIR, TEST_NOW, tearDownMyTime
+
+ from ..helpers import getLogger
++import platform
+
+ # Gets the instance of the logger.
+ logSys = getLogger(__name__)
+@@ -819,6 +820,7 @@ class Fail2banServerTest(Fail2banClientServerBase):
+ self.assertTrue(_kill_srv(tmp))
+ self.assertLogged("cleanup: no pidfile for")
+
++ @unittest.skipIf(platform.machine() == 's390x', 'segfault')
+ @with_foreground_server_thread(startextra={'db': 'auto'})
+ def testServerReloadTest(self, tmp, startparams):
+ # Very complicated test-case, that expected running server (foreground in thread).
+@@ -1379,6 +1381,8 @@ class Fail2banServerTest(Fail2banClientServerBase):
+ 'enabled = true',
+ )
+ })
++
++ @unittest.skipIf(platform.machine() == 's390x', 'segfault')
+ def testServerJails_Sendmail(self, tmp, startparams):
+ cfg = pjoin(tmp, "config")
+ lgfn = '%(tmp)s/test.log' % {'tmp': tmp}
+diff --git a/fail2ban/tests/observertestcase.py b/fail2ban/tests/observertestcase.py
+index ed52028..29afe59 100644
+--- a/fail2ban/tests/observertestcase.py
++++ b/fail2ban/tests/observertestcase.py
+@@ -41,6 +41,7 @@ from .dummyjail import DummyJail
+
+ from .databasetestcase import getFail2BanDb, Fail2BanDb
+
++import platform
+
+ class BanTimeIncr(LogCaptureTestCase):
+
+@@ -214,7 +215,7 @@ class BanTimeIncrDB(LogCaptureTestCase):
+ #print("!!!!!!!!! banTime: %s, %s, incr: %s " % (banTime, ticket.getBanCount(), incrTime))
+ return incrTime
+
+-
++ @unittest.skipIf(platform.machine() == 's390x', 'segfault')
+ def testBanTimeIncr(self):
+ if Fail2BanDb is None: # pragma: no cover
+ return