VirtualBox

Changeset 94122 in vbox for trunk


Ignore:
Timestamp:
Mar 8, 2022 12:25:02 PM (3 years ago)
Author:
vboxsync
Message:

ValKit/tdAudioTest.py: A coupld of @todos; pylint warnings. bugref:10008

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/tests/audio/tdAudioTest.py

    r93115 r94122  
    288288        fRc = False;
    289289
     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
    290300        asEnvTmp = os.environ.copy();
    291301        if asEnv:
     
    353363        Kills processes by their name.
    354364        """
     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
    355371        reporter.log('Trying to kill processes named "%s"' % (sProcName,));
    356372        if sys.platform == 'win32':
     
    360376        else: # Note: killall is not available on older Debians (requires psmisc).
    361377            # 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
    363379            out, err = procPs.communicate();
    364380            if err:
     
    370386                for sLine in out.decode('utf-8').splitlines():
    371387                    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'!
    373389                        pid = int(sLine.split(None, 1)[0]);
    374390                        reporter.log('Killing PID %d' % (pid,));
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette