Changeset 91123 in vbox
- Timestamp:
- Sep 6, 2021 1:23:14 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/audio/tdAudioTest.py
r91119 r91123 205 205 return oTestVm.pathJoin(self.getGuestTempDir(oTestVm), 'vkat-guest.log'); 206 206 207 def locateGst Vkat(self, oSession, oTxsSession):208 """ 209 Returns guest side path to VKAT.210 """ 211 for s VkatPath in self.asGstVkatPaths:212 reporter.log2('Checking for VKAT at: %s ...' % (sVkatPath));213 if self.txsIsFile(oSession, oTxsSession, s VkatPath, fIgnoreErrors = True):214 return (True, s VkatPath);215 reporter.error('Unable to find guest VKAT in any of these places:\n%s' % ('\n'.join(self.asGstVkatPaths),));207 def locateGstBinary(self, oSession, oTxsSession, asPaths): 208 """ 209 Locates a guest binary on the guest by checking the paths in \a asPaths. 210 """ 211 for sCurPath in asPaths: 212 reporter.log2('Checking for \"%s\" ...' % (sCurPath)); 213 if self.txsIsFile(oSession, oTxsSession, sCurPath, fIgnoreErrors = True): 214 return (True, sCurPath); 215 reporter.error('Unable to find guest binary in any of these places:\n%s' % ('\n'.join(asPaths),)); 216 216 return (False, ""); 217 217 … … 409 409 reporter.log('Guest audio test tag is \"%s\"' % (sTag)); 410 410 411 fRc, sVkatExe = self.locateGst Vkat(oSession, oTxsSession);411 fRc, sVkatExe = self.locateGstBinary(oSession, oTxsSession, self.asGstVkatPaths); 412 412 if fRc: 413 413 reporter.log('Using VKAT on guest at \"%s\"' % (sVkatExe)); 414 414 415 sCmd = ''; 415 416 asArgs = []; 416 417 … … 435 436 # as the Test Execution Service (TxS) currently does not implement impersonation yet. 436 437 # 437 sCmd = '/usr/bin/su'; 438 sCmdArgs = ''; 439 for sArg in asArgs: 440 sCmdArgs += sArg + " "; 441 asArgs = [ sCmd, 'vbox', '-c', sCmdArgs ]; 442 else: # Just start it with the same privileges as TxS. 443 sCmd = sVkatExe; 438 asSU = [ '/bin/su', 439 '/usr/bin/su', 440 '/usr/local/bin/su' ]; 441 fRc, sCmd = self.locateGstBinary(oSession, oTxsSession, asSU); 442 if fRc: 443 sCmdArgs = ''; 444 for sArg in asArgs: 445 sCmdArgs += sArg + " "; 446 asArgs = [ sCmd, 'vbox', '-c', sCmdArgs ]; 447 else: 448 reporter.log('Unable to find SU on guest, falling back to regular starting ...') 449 450 if not sCmd: # Just start it with the same privileges as TxS. 451 sCmd = sVkatExe; 444 452 445 453 reporter.log2('startVkatOnGuest: sCmd=%s' % (sCmd,));
Note:
See TracChangeset
for help on using the changeset viewer.