Merge ~cascardo/qa-regression-testing:master into qa-regression-testing:master

Proposed by Thadeu Lima de Souza Cascardo
Status: Merged
Merge reported by: Steve Beattie
Merged at revision: 53632afdd47f71d926beb640d0ed4568581a72d0
Proposed branch: ~cascardo/qa-regression-testing:master
Merge into: qa-regression-testing:master
Diff against target: 33 lines (+3/-5)
2 files modified
scripts/kernel-security/min-addr/low-mmap.c (+2/-0)
scripts/test-kernel-security.py (+1/-5)
Reviewer Review Type Date Requested Status
Steve Beattie Approve
Review via email: mp+435590@code.launchpad.net

Description of the change

Fix tests on ARM64 with 64k pages.

To post a comment you must log in.
Revision history for this message
Steve Beattie (sbeattie) wrote :

Thanks, I've gone ahead and merged these, after rebasing to fix up the author field on the commits.

I do wonder whether the better approach for the ulimit_stack_small test would be to write a little utility program that allocates a PAGESIZE amount of memory on the stack to use in place of /bin/true, rather than relying on repeated iterations to trip the test.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/scripts/kernel-security/min-addr/low-mmap.c b/scripts/kernel-security/min-addr/low-mmap.c
2index 64916d4..433942b 100644
3--- a/scripts/kernel-security/min-addr/low-mmap.c
4+++ b/scripts/kernel-security/min-addr/low-mmap.c
5@@ -25,6 +25,8 @@ int main(int argc, char *argv[])
6 int testsize = 0;
7 if (argc>1) testsize=atoi(argv[1]);
8 if (!testsize) testsize=65536;
9+ testsize = (testsize+pagesize-1) & ~(pagesize-1);
10+ printf("using testsize %d after aligning to pagesize %ld\n", testsize, pagesize);
11
12 // drop setuidness (for MMAP_PAGE_ZERO testing)
13 if (geteuid() != getuid()) {
14diff --git a/scripts/test-kernel-security.py b/scripts/test-kernel-security.py
15index b6558ed..e93668b 100755
16--- a/scripts/test-kernel-security.py
17+++ b/scripts/test-kernel-security.py
18@@ -3027,14 +3027,10 @@ class KernelNonSecurityTest(KernelSecurityBaseTest):
19
20 '''Origin of test https://bugzilla.redhat.com/show_bug.cgi?id=1463241 '''
21
22- if self.dpkg_arch == 'ppc64el':
23- '''https://bugs.launchpad.net/bugs/1814295'''
24- return self._skipped('WARN: intermittent failures on ppc64el (LP: #1814295)')
25-
26 expected = [139]
27 if not self.kernel_at_least('4.4'):
28 expected += [137]
29- self.assertShellExitIn(expected, self._unpriv_cmd(["sh", "-c", "ulimit -s 1 && /bin/true"]))
30+ self.assertShellExitIn(expected, self._unpriv_cmd(["sh", "-c", "set -e ; ulimit -s 1 && for i in `seq 0 10`; do /bin/true ; done"]))
31
32 def test_ulimit_stack_reasonable(self):
33 '''Ensure reasonably small stack limits do not fail'''

Subscribers

People subscribed via source and target branches