]>
git.proxmox.com Git - mirror_lxc.git/blob - src/tests/lxc-test-procsys
3 # lxc: linux Container library
6 # Motiejus Jakštys <motiejus@jakstys.lt>
8 # Ensure that when /proc and/or /sys do not exist in the container,
9 # it is started successfully anyway.
11 # This library is free software; you can redistribute it and/or
12 # modify it under the terms of the GNU Lesser General Public
13 # License as published by the Free Software Foundation; either
14 # version 2.1 of the License, or (at your option) any later version.
16 # This library is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 # Lesser General Public License for more details.
21 # You should have received a copy of the GNU Lesser General Public
22 # License along with this library; if not, write to the Free Software
23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
29 lxc-destroy
-n lxc-test-procsys
-f
33 lxc-destroy
-n lxc-test-procsys
-f ||
:
34 lxc-create
-t busybox
-n lxc-test-procsys
35 rmdir /var
/lib
/lxc
/lxc-test-procsys
/rootfs
/{proc
,sys
}
37 lxc-start
-n lxc-test-procsys
38 lxc-wait
-n lxc-test-procsys
-s RUNNING || FAIL
"waiting for busybox container to run"
40 lxc-attach
-n lxc-test-procsys
-- sh
-c 'test -f /proc/version' || FAIL
"/proc/version not found"
41 lxc-attach
-n lxc-test-procsys
-- sh
-c 'test -d /sys/fs' || FAIL
"/sys/fs not found"
43 lxc-destroy
-n lxc-test-procsys
-f