@@ -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