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
58b61f6d
Commit
58b61f6d
authored
Oct 19, 2013
by
S.Çağlar Onur
Committed by
Serge Hallyn
Oct 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use snapshot_destroy in tests/snapshot.c and clean up containers after the test run
Signed-off-by:
S.Çağlar Onur
<
caglar@10ur.org
>
Signed-off-by:
Serge Hallyn
<
serge.hallyn@ubuntu.com
>
parent
771d96b3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
snapshot.c
src/tests/snapshot.c
+15
-3
No files found.
src/tests/snapshot.c
View file @
58b61f6d
...
@@ -118,13 +118,25 @@ int main(int argc, char *argv[])
...
@@ -118,13 +118,25 @@ int main(int argc, char *argv[])
goto
err
;
goto
err
;
}
}
printf
(
"All tests passed
\n
"
);
if
(
!
c
->
snapshot_destroy
(
c
,
"snap0"
))
{
fprintf
(
stderr
,
"%s: %d: failed to destroy snapshot
\n
"
,
__FILE__
,
__LINE__
);
goto
err
;
}
if
(
!
c
->
destroy
(
c
))
{
fprintf
(
stderr
,
"%s: %d: failed to destroy container
\n
"
,
__FILE__
,
__LINE__
);
goto
err
;
}
lxc_container_put
(
c
);
lxc_container_put
(
c
);
exit
(
0
);
try_to_remove
(
);
printf
(
"All tests passed
\n
"
);
exit
(
0
);
err:
err:
lxc_container_put
(
c
);
lxc_container_put
(
c
);
fprintf
(
stderr
,
"Exiting on error
\n
"
);
try_to_remove
();
try_to_remove
();
fprintf
(
stderr
,
"Exiting on error
\n
"
);
exit
(
1
);
exit
(
1
);
}
}
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