VirtualBox

vbox的更動 62072 路徑 trunk/src/VBox/ValidationKit


忽略:
時間撮記:
2016-7-6 下午04:03:29 (8 年 以前)
作者:
vboxsync
訊息:

testboxscript: Need to apply the reinitScratch hack a bit wider. This also helps slow down bad testbox stuff a little bit.

位置:
trunk/src/VBox/ValidationKit/testboxscript
檔案:
修改 2 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/ValidationKit/testboxscript/testboxscript_real.py

    r61988 r62072  
    662662        return self._sTestBoxName;
    663663
    664     def reinitScratch(self, fnLog = testboxcommons.log, fUseTheForce = None):
     664    def _reinitScratch(self, fnLog, fUseTheForce):
    665665        """
    666666        Wipes the scratch directories and re-initializes them.
     
    742742        return oRc.fRc;
    743743
     744    def reinitScratch(self, fnLog = testboxcommons.log, fUseTheForce = None, cRetries = 0, cMsDelay = 5000):
     745        """
     746        Wipes the scratch directories and re-initializes them.
     747
     748        Will retry according to the cRetries and cMsDelay parameters.  Windows
     749        forces us to apply this hack as it ships with services asynchronously
     750        scanning files after they execute, thus racing us cleaning up after a
     751        test.  On testboxwin3 we had frequent trouble with aelupsvc.dll keeping
     752        vts_rm.exe kind of open, somehow preventing us from removing the
     753        directory containing it, despite not issuing any errors deleting the
     754        file itself.  The service is called "Application Experience", which
     755        feels like a weird joke here.
     756
     757        No exceptions raise, returns success indicator instead.
     758        """
     759        fRc = self._reinitScratch(fnLog, fUseTheForce)
     760        while fRc is False and cRetries > 0:
     761            time.sleep(cMsDelay / 1000.0);
     762            fnLog('reinitScratch: Retrying...');
     763            fRc = self._reinitScratch(fnLog, fUseTheForce)
     764            cRetries -= 1;
     765        return fRc;
     766
     767
    744768    def _doSignOn(self):
    745769        """
     
    791815
    792816        # Set up the scratch area.
    793         self.reinitScratch(fUseTheForce = self._fFirstSignOn);
     817        self.reinitScratch(fUseTheForce = self._fFirstSignOn, cRetries = 2);
    794818
    795819        self._fFirstSignOn = False;
     
    856880
    857881            # Automatically reboot if scratch init fails.
    858             if self._cReinitScratchErrors > 8 and self.reinitScratch() is False:
     882            if self._cReinitScratchErrors > 8 and self.reinitScratch(cRetries = 3) is False:
    859883                testboxcommons.log('Scratch does not initialize cleanly after %d attempts, rebooting...'
    860884                                   % ( self._cReinitScratchErrors, ));
  • trunk/src/VBox/ValidationKit/testboxscript/testboxtasks.py

    r62024 r62072  
    592592
    593593        #
    594         # Wipe the stuff clean.  On failure, delay for a total of 20 seconds while
    595         # periodically retrying the cleanup.  This is a hack to work around issues
    596         # on windows caused by the service in aelupsvc.dll preventing us from deleting
    597         # vts_rm.exe (or rather the directory its in).  The service is called
    598         # "Application Experience", which feels like a weird joke here.
    599         #
    600         fRc2 = self._oTestBoxScript.reinitScratch(fnLog = self._log);
    601         cRetries = 4;
    602         while fRc2 is False and cRetries > 0:
    603             time.sleep(5);
    604             fRc2 = self._oTestBoxScript.reinitScratch(fnLog = self._log);
    605             cRetries -= 1;
     594        # Wipe the stuff clean.
     595        #
     596        fRc2 = self._oTestBoxScript.reinitScratch(fnLog = self._log, cRetries = 6);
    606597
    607598        return fRc and fRc2;
     
    912903        #
    913904        if fNeedCleanUp:
    914             if self._oTestBoxScript.reinitScratch(self._logInternal) is not True:
     905            if self._oTestBoxScript.reinitScratch(self._logInternal, cRetries = 6) is not True:
    915906                self._log('post run reinitScratch failed.');
    916907                fRc = False;
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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