[lxc-devel] [lxcfs/master] tests: Fix run on ppc64el
stgraber on Github
lxc-bot at linuxcontainers.org
Sat Dec 3 00:46:20 UTC 2016
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 490 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20161203/cc747234/attachment.bin>
-------------- next part --------------
From 08efccf3cfd73bfcd90302e08ad9b1d7c02b6b6e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Fri, 2 Dec 2016 19:45:18 -0500
Subject: [PATCH] tests: Fix run on ppc64el
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Turns out a MB of memory isn't quite enough to run things like cat on
some architectures, so lets bump to a more comfortable 64MB.
Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
tests/test_cgroup | 4 ++--
tests/test_proc | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/test_cgroup b/tests/test_cgroup
index 1a7879a..27e0e7e 100755
--- a/tests/test_cgroup
+++ b/tests/test_cgroup
@@ -42,12 +42,12 @@ for p in ${mempath} ${frzpath} ${cpupath}; do
done
# set values though lxcfs
-echo $((1024*1024)) > ${LXCFSDIR}/cgroup/memory/${initmemory}/${UUID}/memory.limit_in_bytes
+echo $((64*1024*1024)) > ${LXCFSDIR}/cgroup/memory/${initmemory}/${UUID}/memory.limit_in_bytes
echo 0 > ${LXCFSDIR}/cgroup/cpuset/${initcpuset}/${UUID}/cpuset.cpus
# and verify them through cgroupfs
v=`cat $mempath/${UUID}/memory.limit_in_bytes`
-[ "$v" = "$((1024*1024))" ]
+[ "$v" = "$((64*1024*1024))" ]
v=`cat ${cpupath}/${UUID}/cpuset.cpus`
[ "$v" = "0" ]
diff --git a/tests/test_proc b/tests/test_proc
index a689227..a965a68 100755
--- a/tests/test_proc
+++ b/tests/test_proc
@@ -32,7 +32,7 @@ mkdir ${mempath}/lxcfs_test_proc
echo 1 > ${cpupath}/lxcfs_test_proc/tasks
echo 1 > ${mempath}/lxcfs_test_proc/tasks
-echo $((1024*1024)) > ${mempath}/lxcfs_test_proc/memory.limit_in_bytes
+echo $((64*1024*1024)) > ${mempath}/lxcfs_test_proc/memory.limit_in_bytes
echo 0 > ${cpupath}/lxcfs_test_proc/cpuset.cpus
# Test uptime
@@ -46,7 +46,7 @@ grep -q "^processor.*0$" ${LXCFSDIR}/proc/cpuinfo
[ "$(grep "^cpu" ${LXCFSDIR}/proc/stat | wc -l)" = "2" ]
# Test meminfo
-grep -q "^MemTotal.*1024 kB$" ${LXCFSDIR}/proc/meminfo
+grep -q "^MemTotal.*65536 kB$" ${LXCFSDIR}/proc/meminfo
PASS=1
echo PASS
More information about the lxc-devel
mailing list