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
6cd5db20
Commit
6cd5db20
authored
Jul 05, 2017
by
Long Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: create temp file before lxc_container_new
Signed-off-by:
Long Wang
<
w@laoqinren.net
>
parent
978a7383
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
parse_config_file.c
src/tests/parse_config_file.c
+5
-6
No files found.
src/tests/parse_config_file.c
View file @
6cd5db20
...
@@ -279,12 +279,6 @@ int main(int argc, char *argv[])
...
@@ -279,12 +279,6 @@ int main(int argc, char *argv[])
char
tmpf
[]
=
"lxc-parse-config-file-XXXXXX"
;
char
tmpf
[]
=
"lxc-parse-config-file-XXXXXX"
;
char
retval
[
4096
]
=
{
0
};
char
retval
[
4096
]
=
{
0
};
c
=
lxc_container_new
(
tmpf
,
NULL
);
if
(
!
c
)
{
lxc_error
(
"%s
\n
"
,
"failed to create new container"
);
exit
(
EXIT_FAILURE
);
}
fd
=
mkstemp
(
tmpf
);
fd
=
mkstemp
(
tmpf
);
if
(
fd
<
0
)
{
if
(
fd
<
0
)
{
lxc_error
(
"%s
\n
"
,
"Could not create temporary file"
);
lxc_error
(
"%s
\n
"
,
"Could not create temporary file"
);
...
@@ -292,6 +286,11 @@ int main(int argc, char *argv[])
...
@@ -292,6 +286,11 @@ int main(int argc, char *argv[])
}
}
close
(
fd
);
close
(
fd
);
c
=
lxc_container_new
(
tmpf
,
NULL
);
if
(
!
c
)
{
lxc_error
(
"%s
\n
"
,
"Failed to create new container"
);
exit
(
EXIT_FAILURE
);
}
/* lxc.arch */
/* lxc.arch */
if
(
set_get_compare_clear_save_load
(
c
,
"lxc.arch"
,
"x86_64"
,
tmpf
,
if
(
set_get_compare_clear_save_load
(
c
,
"lxc.arch"
,
"x86_64"
,
tmpf
,
...
...
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