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
32068a26
Unverified
Commit
32068a26
authored
Sep 10, 2017
by
Christian Brauner
Committed by
Stéphane Graber
Sep 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: remove dead assignments
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
f0475785
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
32 deletions
+16
-32
containertests.c
src/tests/containertests.c
+4
-8
destroytest.c
src/tests/destroytest.c
+2
-4
saveconfig.c
src/tests/saveconfig.c
+2
-4
shortlived.c
src/tests/shortlived.c
+4
-8
startone.c
src/tests/startone.c
+4
-8
No files found.
src/tests/containertests.c
View file @
32068a26
...
@@ -40,10 +40,8 @@ static int destroy_busybox(void)
...
@@ -40,10 +40,8 @@ static int destroy_busybox(void)
return
-
1
;
return
-
1
;
}
}
if
(
pid
==
0
)
{
if
(
pid
==
0
)
{
ret
=
execlp
(
"lxc-destroy"
,
"lxc-destroy"
,
"-f"
,
"-n"
,
MYNAME
,
NULL
);
execlp
(
"lxc-destroy"
,
"lxc-destroy"
,
"-f"
,
"-n"
,
MYNAME
,
NULL
);
// Should not return
exit
(
EXIT_FAILURE
);
perror
(
"execl"
);
exit
(
1
);
}
}
again:
again:
ret
=
waitpid
(
pid
,
&
status
,
0
);
ret
=
waitpid
(
pid
,
&
status
,
0
);
...
@@ -72,10 +70,8 @@ static int create_busybox(void)
...
@@ -72,10 +70,8 @@ static int create_busybox(void)
return
-
1
;
return
-
1
;
}
}
if
(
pid
==
0
)
{
if
(
pid
==
0
)
{
ret
=
execlp
(
"lxc-create"
,
"lxc-create"
,
"-t"
,
"busybox"
,
"-n"
,
MYNAME
,
NULL
);
execlp
(
"lxc-create"
,
"lxc-create"
,
"-t"
,
"busybox"
,
"-n"
,
MYNAME
,
NULL
);
// Should not return
exit
(
EXIT_FAILURE
);
perror
(
"execl"
);
exit
(
1
);
}
}
again:
again:
ret
=
waitpid
(
pid
,
&
status
,
0
);
ret
=
waitpid
(
pid
,
&
status
,
0
);
...
...
src/tests/destroytest.c
View file @
32068a26
...
@@ -38,10 +38,8 @@ static int create_container(void)
...
@@ -38,10 +38,8 @@ static int create_container(void)
return
-
1
;
return
-
1
;
}
}
if
(
pid
==
0
)
{
if
(
pid
==
0
)
{
ret
=
execlp
(
"lxc-create"
,
"lxc-create"
,
"-t"
,
"busybox"
,
"-n"
,
MYNAME
,
NULL
);
execlp
(
"lxc-create"
,
"lxc-create"
,
"-t"
,
"busybox"
,
"-n"
,
MYNAME
,
NULL
);
// Should not return
exit
(
EXIT_FAILURE
);
perror
(
"execl"
);
exit
(
1
);
}
}
again:
again:
ret
=
waitpid
(
pid
,
&
status
,
0
);
ret
=
waitpid
(
pid
,
&
status
,
0
);
...
...
src/tests/saveconfig.c
View file @
32068a26
...
@@ -38,10 +38,8 @@ static int create_container(void)
...
@@ -38,10 +38,8 @@ static int create_container(void)
return
-
1
;
return
-
1
;
}
}
if
(
pid
==
0
)
{
if
(
pid
==
0
)
{
ret
=
execlp
(
"lxc-create"
,
"lxc-create"
,
"-t"
,
"busybox"
,
"-n"
,
MYNAME
,
NULL
);
execlp
(
"lxc-create"
,
"lxc-create"
,
"-t"
,
"busybox"
,
"-n"
,
MYNAME
,
NULL
);
// Should not return
exit
(
EXIT_FAILURE
);
perror
(
"execl"
);
exit
(
1
);
}
}
again:
again:
ret
=
waitpid
(
pid
,
&
status
,
0
);
ret
=
waitpid
(
pid
,
&
status
,
0
);
...
...
src/tests/shortlived.c
View file @
32068a26
...
@@ -40,10 +40,8 @@ static int destroy_container(void)
...
@@ -40,10 +40,8 @@ static int destroy_container(void)
return
-
1
;
return
-
1
;
}
}
if
(
pid
==
0
)
{
if
(
pid
==
0
)
{
ret
=
execlp
(
"lxc-destroy"
,
"lxc-destroy"
,
"-f"
,
"-n"
,
MYNAME
,
NULL
);
execlp
(
"lxc-destroy"
,
"lxc-destroy"
,
"-f"
,
"-n"
,
MYNAME
,
NULL
);
// Should not return
exit
(
EXIT_FAILURE
);
perror
(
"execl"
);
exit
(
1
);
}
}
again:
again:
ret
=
waitpid
(
pid
,
&
status
,
0
);
ret
=
waitpid
(
pid
,
&
status
,
0
);
...
@@ -72,10 +70,8 @@ static int create_container(void)
...
@@ -72,10 +70,8 @@ static int create_container(void)
return
-
1
;
return
-
1
;
}
}
if
(
pid
==
0
)
{
if
(
pid
==
0
)
{
ret
=
execlp
(
"lxc-create"
,
"lxc-create"
,
"-t"
,
"busybox"
,
"-n"
,
MYNAME
,
NULL
);
execlp
(
"lxc-create"
,
"lxc-create"
,
"-t"
,
"busybox"
,
"-n"
,
MYNAME
,
NULL
);
// Should not return
exit
(
EXIT_FAILURE
);
perror
(
"execl"
);
exit
(
1
);
}
}
again:
again:
ret
=
waitpid
(
pid
,
&
status
,
0
);
ret
=
waitpid
(
pid
,
&
status
,
0
);
...
...
src/tests/startone.c
View file @
32068a26
...
@@ -40,10 +40,8 @@ static int destroy_container(void)
...
@@ -40,10 +40,8 @@ static int destroy_container(void)
return
-
1
;
return
-
1
;
}
}
if
(
pid
==
0
)
{
if
(
pid
==
0
)
{
ret
=
execlp
(
"lxc-destroy"
,
"lxc-destroy"
,
"-f"
,
"-n"
,
MYNAME
,
NULL
);
execlp
(
"lxc-destroy"
,
"lxc-destroy"
,
"-f"
,
"-n"
,
MYNAME
,
NULL
);
// Should not return
exit
(
EXIT_FAILURE
);
perror
(
"execl"
);
exit
(
1
);
}
}
again:
again:
ret
=
waitpid
(
pid
,
&
status
,
0
);
ret
=
waitpid
(
pid
,
&
status
,
0
);
...
@@ -72,10 +70,8 @@ static int create_container(void)
...
@@ -72,10 +70,8 @@ static int create_container(void)
return
-
1
;
return
-
1
;
}
}
if
(
pid
==
0
)
{
if
(
pid
==
0
)
{
ret
=
execlp
(
"lxc-create"
,
"lxc-create"
,
"-t"
,
"busybox"
,
"-n"
,
MYNAME
,
NULL
);
execlp
(
"lxc-create"
,
"lxc-create"
,
"-t"
,
"busybox"
,
"-n"
,
MYNAME
,
NULL
);
// Should not return
exit
(
EXIT_FAILURE
);
perror
(
"execl"
);
exit
(
1
);
}
}
again:
again:
ret
=
waitpid
(
pid
,
&
status
,
0
);
ret
=
waitpid
(
pid
,
&
status
,
0
);
...
...
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