VirtualBox

Changeset 83500 in vbox for trunk/src


Ignore:
Timestamp:
Apr 1, 2020 11:13:00 AM (5 years ago)
Author:
vboxsync
Message:

ValKit/vbox.py: Reverted r136720 (Hack alert: Added sanitizeLogFlagsString() to support more than one log flag as command line argument (--vbox-XXXX-log-flags).)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testdriver/vbox.py

    r83479 r83500  
    10551055        return self.fImportedVBoxApi;
    10561056
    1057     def sanitizeLogFlagsString(self, sString):
    1058         """
    1059         Sanitizes a given log flag string by removing any separators (":" and ",") with
    1060         a space and removes quotes.
    1061 
    1062         ## @todo !!! HACK ALERT !!! Needed until we have proper argument parsing / quoting support.
    1063         """
    1064         for ch in [ ':', ',' ]:
    1065             if ch in sString:
    1066                 sString = sString.replace(ch, " ");
    1067         for ch in [ '\'', '"' ]:
    1068             if ch in sString:
    1069                 sString = sString.replace(ch, "");
    1070         return sString;
    1071 
    10721057    def _startVBoxSVC(self): # pylint: disable=too-many-statements
    10731058        """ Starts VBoxSVC. """
     
    10801065        except: pass;
    10811066        os.environ['VBOX_LOG']       = self.sLogSvcGroups;
    1082         # Append because of VBoxXPCOMIPCD.
    1083         os.environ['VBOX_LOG_FLAGS'] = '%s append' % (self.sanitizeLogFlagsString(self.sLogSvcFlags),);
     1067        os.environ['VBOX_LOG_FLAGS'] = '%s append' % (self.sLogSvcFlags,);  # Append becuse of VBoxXPCOMIPCD.
    10841068        if self.sLogSvcDest:
    10851069            os.environ['VBOX_LOG_DEST'] = 'nodeny ' + self.sLogSvcDest;
     
    13071291        except: pass;
    13081292        os.environ['VBOX_LOG']       = self.sLogSelfGroups;
    1309         os.environ['VBOX_LOG_FLAGS'] = '%s append' % (self.sanitizeLogFlagsString(self.sLogSelfFlags), );
     1293        os.environ['VBOX_LOG_FLAGS'] = '%s append' % (self.sLogSelfFlags, );
    13101294        if self.sLogSelfDest:
    13111295            os.environ['VBOX_LOG_DEST'] = 'nodeny ' + self.sLogSelfDest;
     
    17821766                raise base.InvalidOption('The "--vbox-self-log-flags" takes an argument');
    17831767            self.sLogSelfFlags = asArgs[iArg];
     1768            print('self.sLogSelfFlags="%s"' % (self.sLogSelfFlags,))
    17841769        elif asArgs[iArg] == '--vbox-self-log-dest':
    17851770            iArg += 1;
     
    18271812            iArg += 1;
    18281813            if iArg >= len(asArgs):
    1829                 raise base.InvalidOption('The "--vbox-log-flags" takes an argument');
     1814                raise base.InvalidOption('The "--vbox-svc-flags" takes an argument');
    18301815            self.sLogSelfFlags     = asArgs[iArg];
    18311816            self.sLogSessionFlags  = asArgs[iArg];
     
    27832768        asEnvFinal = [
    27842769            'VBOX_LOG=%s' % (self.sLogSessionGroups,),
    2785             'VBOX_LOG_FLAGS=%s' % (self.sanitizeLogFlagsString(self.sLogSessionFlags),),
     2770            'VBOX_LOG_FLAGS=%s' % (self.sLogSessionFlags,),
    27862771            'VBOX_LOG_DEST=nodeny %s' % (sLogDest,),
    27872772            'VBOX_RELEASE_LOG_FLAGS=append time',
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