Skip to content

Commit 8dd9c65

Browse files
committed
run_exec: Remove invalid sub-subtests
Signed-off-by: Chris Evich <[email protected]>
1 parent 6804542 commit 8dd9c65

File tree

2 files changed

+2
-81
lines changed

2 files changed

+2
-81
lines changed

config_defaults/subtests/docker_cli/run_exec.ini

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ bash_cmd = /bin/sh
99
exec_options_csv = --interactive
1010
#: csv command prefix (docker exec ... $exec_bash_cmd $cmd)
1111
exec_bash_cmd = /bin/sh,-c
12-
#: Specifies the executed command inside the container
12+
#: Specifies the executed command inside the running container
1313
cmd =
1414
#: expected exit status
1515
exit_status =
16-
subsubtests = exec_true, exec_false, exec_pid_count, detached_pid_count, smoke_pid_count
16+
subsubtests = exec_true, exec_false, exec_pid_count
1717

1818
[docker_cli/run_exec/exec_true]
1919
cmd = /bin/true
@@ -27,24 +27,4 @@ exit_status = 1
2727
exec_bash_cmd = /bin/sh
2828
#: Expected count of pid in container when command using exec is started.
2929
pid_count = 3
30-
cmd =
31-
exit_status = 0
32-
33-
[docker_cli/run_exec/detached_pid_count]
34-
exec_bash_cmd = /bin/sh
35-
#: Expected count of pid in container when command using exec is started.
36-
exec_options_csv = --interactive,--detach
37-
#: Expected count of pid in container when command using exec is started.
38-
pid_count = 3
39-
cmd =
40-
exit_status = 0
41-
42-
43-
[docker_cli/run_exec/smoke_pid_count]
44-
exec_bash_cmd = /bin/sh
45-
#: Expected count of pid in container when command using exec is started.
46-
exec_options_csv = --interactive,--detach
47-
#: Expected count of pid in container when command using exec is started.
48-
pid_count = 200
49-
cmd =
5030
exit_status = 0

subtests/docker_cli/run_exec/run_exec.py

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -217,62 +217,3 @@ def postprocess(self):
217217
self.failif(len(pids) != self.config.get("pid_count", 3),
218218
"There should be exactly 3 pids in"
219219
" container. Count of pid: %s" % len(pids))
220-
221-
222-
class detached_pid_count(exec_base):
223-
224-
def run_once(self):
225-
super(detached_pid_count, self).run_once() # Prints out basic info
226-
dkrcmd = AsyncDockerCmdStdIn(self, 'exec', self.sub_stuff['exec_args'],
227-
stdin_r=AsyncDockerCmdStdIn.PIPE)
228-
self.sub_stuff['dkrcmd_exec'] = dkrcmd
229-
230-
time.sleep(5)
231-
run_dkrcmd = self.sub_stuff['dkrcmd']
232-
self.run_cmd(run_dkrcmd.stdin, "ls -l /proc\n")
233-
self.wait_for_output(run_dkrcmd, "cmdline", 10)
234-
self.run_cmd(run_dkrcmd.stdin, "exit\n")
235-
dkrcmd.close()
236-
237-
def postprocess(self):
238-
super(detached_pid_count, self).postprocess() # Prints out basic info
239-
if 'dkrcmd_exec' in self.sub_stuff and 'dkrcmd' in self.sub_stuff:
240-
# Check count of pids
241-
dkrcmd = self.sub_stuff['dkrcmd']
242-
pids = re.findall("^dr.+ ([0-9]+).?$", dkrcmd.stdout, re.MULTILINE)
243-
self.failif(len(pids) != self.config.get("pid_count", 3),
244-
"There should be exactly 3 pids in"
245-
" container. Count of pid: %s\n detail: %s" %
246-
(len(pids), self.sub_stuff['dkrcmd_exec']))
247-
248-
249-
class smoke_pid_count(exec_base):
250-
251-
def run_once(self):
252-
super(smoke_pid_count, self).run_once() # Prints out basic info
253-
self.sub_stuff['dkrcmd_exec_list'] = []
254-
for _ in xrange(self.config.get("pid_count", "200") - 2):
255-
dkrcmd = AsyncDockerCmdStdIn(self, 'exec',
256-
self.sub_stuff['exec_args'],
257-
stdin_r=AsyncDockerCmdStdIn.PIPE)
258-
self.sub_stuff['dkrcmd_exec_list'].append(dkrcmd)
259-
260-
time.sleep(5)
261-
run_dkrcmd = self.sub_stuff['dkrcmd']
262-
self.run_cmd(run_dkrcmd.stdin, "ls -l /proc\n")
263-
self.wait_for_output(run_dkrcmd, "cmdline", 10)
264-
self.run_cmd(run_dkrcmd.stdin, "exit\n")
265-
for dkrcmd in self.sub_stuff['dkrcmd_exec_list']:
266-
dkrcmd.close()
267-
268-
def postprocess(self):
269-
super(smoke_pid_count, self).postprocess() # Prints out basic info
270-
if 'dkrcmd_exec_list' in self.sub_stuff and 'dkrcmd' in self.sub_stuff:
271-
# Check count of pids
272-
dkrcmd = self.sub_stuff['dkrcmd']
273-
274-
pids = re.findall("^dr.+ ([0-9]+).?$", dkrcmd.stdout, re.MULTILINE)
275-
self.failif(len(pids) != self.config.get("pid_count", 200),
276-
"There should be exactly %s pids in"
277-
" container. Count of pid: %s\n" %
278-
(self.config.get("pid_count", 200), len(pids)))

0 commit comments

Comments
 (0)