VirtualBox

Changeset 91107 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Sep 3, 2021 3:05:24 PM (3 years ago)
Author:
vboxsync
Message:

Audio/Validation Kit: Worked around a bug / limitation of OL 8.1 (and probably similar) guests where VKAT on the guest needs to be started as a regular user and not under behalf of TxS. ​bugref:10008

File:
1 edited

Legend:

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

    r91096 r91107  
    412412            reporter.log('Using VKAT on guest at \"%s\"' % (sVkatExe));
    413413
    414             asArgs = [ sVkatExe, 'test', '--mode', 'guest', '--probe-backends', \
    415                                  '--tempdir', sPathAudioTemp, '--outdir', sPathAudioOut ];
     414            asArgs = [];
     415
     416            asArgsVkat = [ sVkatExe, 'test', '--mode', 'guest', '--probe-backends', \
     417                           '--tempdir', sPathAudioTemp, '--outdir', sPathAudioOut ];
     418
     419            asArgs.extend(asArgsVkat);
    416420
    417421            for _ in range(1, reporter.getVerbosity()): # Verbosity always is initialized at 1.
     
    420424            # Needed for NATed VMs.
    421425            asArgs.extend(['--tcp-connect-addr', '10.0.2.2' ]);
     426
     427            if oTestVm.isLinux(): ## @todo Might need some more fine tuning later.
     428                #
     429                # Some Linux distros have a bug / are configured (?) so that processes started by init system
     430                # cannot access the PulseAudio server ("Connection refused"), for example OL 8.1.
     431                #
     432                # To work around this, we use the (hopefully) configured user "vbox" and run it under its behalf,
     433                # as the Test Execution Service (TxS) currently does not implement impersonation yet.
     434                #
     435                sCmd     = '/usr/bin/su';
     436                sCmdArgs = '';
     437                for sArg in asArgs:
     438                    sCmdArgs += sArg + " ";
     439                asArgs   = [ sCmd, 'vbox', '-c', sCmdArgs ];
     440            else: # Just start it with the same privileges as TxS.
     441                sCmd     = sVkatExe;
     442
     443            reporter.log2('startVkatOnGuest: sCmd=%s' % (sCmd,));
     444            reporter.log2('startVkatOnGuest: asArgs=%s' % (asArgs,));
    422445
    423446            #
     
    436459            # Execute asynchronously on the guest.
    437460            #
    438             fRc = oTxsSession.asyncExec(sVkatExe, asArgs, asEnv, cMsTimeout = 15 * 60 * 1000);
     461            fRc = oTxsSession.asyncExec(sCmd, asArgs, asEnv, cMsTimeout = 15 * 60 * 1000, sPrefix = '[VKAT Guest] ');
    439462            if fRc:
    440463                self.addTask(oTxsSession);
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