Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
8ced4fd4
Commit
8ced4fd4
authored
Jan 23, 2014
by
Stéphane Graber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: Tweak lxc-test-ubuntu to be faster
Signed-off-by:
Stéphane Graber
<
stgraber@ubuntu.com
>
Acked-by:
Serge E. Hallyn
<
serge.hallyn@ubuntu.com
>
parent
0e17b9c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
lxc-test-ubuntu
src/tests/lxc-test-ubuntu
+5
-4
No files found.
src/tests/lxc-test-ubuntu
View file @
8ced4fd4
...
...
@@ -23,7 +23,6 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
set
-e
FAIL
()
{
...
...
@@ -54,11 +53,13 @@ for template in ubuntu ubuntu-cloud; do
else
name
=
lxc-test-
$template
fi
lxc-create
-t
$template
-n
$name
||
FAIL
"creating
$template
container"
lxc-start
-n
$name
-d
||
FAIL
"starting
$template
container"
lxc-wait
-n
$name
-s
RUNNING
||
FAIL
"waiting for
$template
container to run"
for
tries
in
`
seq
1 20
`
;
do
lxcip
=
`
sudo
lxc-info
-i
-n
$name
|
awk
-F
:
'{ print $2 }'
|
awk
'{ print $1}'
|
head
-1
`
lxcip
=
$(
lxc-info
-i
-n
$name
-H
|
head
-1
)
[
-z
"
$lxcip
"
]
||
break
sleep
1
done
...
...
@@ -66,12 +67,12 @@ for template in ubuntu ubuntu-cloud; do
ping
-c
1
$lxcip
||
FAIL
"to ping
$template
container"
# Check apparmor
lxcpid
=
`
lxc-info
-n
$name
-p
|
awk
-F
:
'{ print $2 }'
|
awk
'{ print $1}'
`
lxcpid
=
`
lxc-info
-n
$name
-p
-H
`
aa
=
`
cat
/proc/
$lxcpid
/attr/current
`
if
[
"
$aa
"
!=
"lxc-container-default-with-nesting (enforce)"
-a
"
$aa
"
!=
"lxc-container-default (enforce)"
]
;
then
FAIL
" to correctly set apparmor profile (profile is
\"
$aa
\"
)"
fi
lxc-stop
-n
$name
lxc-stop
-n
$name
-k
lxc-destroy
-n
$name
done
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment