# lxc: linux Container library
# Authors:
# Serge Hallyn <serge.hallyn@ubuntu.com>
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
# At the moment this only tests cgroup automount. Testing proc and
# sys automounts would be worthwhile.
# cgmanager doesn't do the same cgroup filesystem mounting
set -ex
set +e
echo "automount test failed at $PHASE"
exit 1
fi
echo "automount test passed"
exit 0
}
echo "Starting phase $PHASE"
echo "lxc.mount.auto = proc:mixed sys:mixed" >> $config
notfound=0
# Tests are as follows:
# 1. check that freezer controller is mounted
# 2. check that it is cgroupfs for cgroup-full (/cgroup.procs exists) or
# tmpfs for cgroup
# 3. check that root cgroup dir is readonly or not (try mkdir)
# 4. check that the container's cgroup dir is readonly or not
# 5. check that the container's cgroup dir is cgroupfs (/cgroup.procs exists)
echo "Starting phase $PHASE"
echo "lxc.mount.auto = cgroup:mixed proc:mixed sys:mixed" >> $config
notfound=0
notfound=0
ro=0
ro=0
notfound=0
echo "Starting phase $PHASE"
echo "lxc.mount.auto = cgroup:ro proc:mixed sys:mixed" >> $config
notfound=0
notfound=0
ro=0
ro=0
notfound=0
echo "Starting phase $PHASE"
echo "lxc.mount.auto = cgroup:rw proc:mixed sys:mixed" >> $config
notfound=0
notfound=0
ro=0
ro=0
notfound=0
# cgroup-full
echo "Starting phase $PHASE"
echo "lxc.mount.auto = cgroup-full:mixed proc:mixed sys:mixed" >> $config
notfound=0
notfound=0
ro=0
ro=0
notfound=0
echo "Starting phase $PHASE"
echo "lxc.mount.auto = cgroup-full:ro proc:mixed sys:mixed" >> $config
notfound=0
notfound=0
ro=0
ro=0
notfound=0
echo "Starting phase $PHASE"
echo "lxc.mount.auto = cgroup-full:rw proc:mixed sys:mixed" >> $config
notfound=0
notfound=0
ro=0
ro=0
notfound=0
PHASE=done