- Timestamp:
- Mar 8, 2022 12:25:02 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/audio/tdAudioTest.py
r93115 r94122 288 288 fRc = False; 289 289 290 ## @todo r=bird: From what I can tell this is running on the main thread. 291 ## So, you're blocking event handling till the process 292 ## finishes. Not a great idea. 293 ## 294 ## Also, use the base API base.testdriver.pidFileAdd API 295 ## and you can kick out the fAsAdmin and killHstProcessByName 296 ## fun. (If you need to kill stuff, check what pidFileRead, 297 ## or better add some name based killer around it to the 298 ## base class.) 299 290 300 asEnvTmp = os.environ.copy(); 291 301 if asEnv: … … 353 363 Kills processes by their name. 354 364 """ 365 366 ## 367 ## @todo r=bird: This doesn't belong here and probably won't work right everywhere anyway. 368 ## See alternative approach outlined in executeHstLoop. 369 ## 370 355 371 reporter.log('Trying to kill processes named "%s"' % (sProcName,)); 356 372 if sys.platform == 'win32': … … 360 376 else: # Note: killall is not available on older Debians (requires psmisc). 361 377 # Using the BSD syntax here; MacOS also should understand this. 362 procPs = subprocess.Popen(['ps', 'ax'], stdout=subprocess.PIPE); 378 procPs = subprocess.Popen(['ps', 'ax'], stdout=subprocess.PIPE); # pylint: disable=consider-using-with 363 379 out, err = procPs.communicate(); 364 380 if err: … … 370 386 for sLine in out.decode('utf-8').splitlines(): 371 387 reporter.log4(sLine); 372 if sProcName in sLine: 388 if sProcName in sLine: ## @todo r=bird: This just isn't good enough for short stuff like 'vkat'! 373 389 pid = int(sLine.split(None, 1)[0]); 374 390 reporter.log('Killing PID %d' % (pid,));
Note:
See TracChangeset
for help on using the changeset viewer.

