[apparmor] [patch] regression swap test: 640 KiB not enough swap for everyone

Steve Beattie steve at nxnw.org
Thu Mar 20 07:53:36 UTC 2014


On ppc64el platforms, the minimum swapfile size is 640KiB. Our swap
test aborts there because it creates a swapfile of size 512KiB. This
patch adjusts the size to 768KiB, to satisfy ppc64el and to try
to keep the size down for embedded and otherwise limited platforms
(e.g. phones).

Signed-off-by: Steve Beattie <steve at nxnw.org>
---
 tests/regression/apparmor/swap.sh |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Index: b/tests/regression/apparmor/swap.sh
===================================================================
--- a/tests/regression/apparmor/swap.sh
+++ b/tests/regression/apparmor/swap.sh
@@ -38,7 +38,9 @@ fi
 
 swap_file=$tmpdir/swapfile
 
-dd if=/dev/zero of=${swap_file} bs=1024 count=512 2> /dev/null
+# ppc64el wants this to be larger than 640KiB
+# arm/small machines want this as small as possible
+dd if=/dev/zero of=${swap_file} bs=1024 count=768 2> /dev/null
 /sbin/mkswap -f ${swap_file} > /dev/null
 
 # TEST 1.  Make sure can enable and disable swap unconfined

-- 
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20140320/388b2f82/attachment.pgp>


More information about the AppArmor mailing list