VirtualBox

Changeset 56374 in vbox for trunk/src/VBox/ValidationKit


Ignore:
Timestamp:
Jun 11, 2015 6:48:31 PM (10 years ago)
Author:
vboxsync
Message:

ValidationKit: Added option for skipping raw-mode tests based on testbox config or VirtualBox build. (untested)

Location:
trunk/src/VBox/ValidationKit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/common/constants/tbreq.py

    r56295 r56374  
    7575SIGNON_PARAM_HAS_64_BIT_GUEST   = 'HAS_64_BIT_GUST';
    7676SIGNON_PARAM_HAS_IOMMU          = 'HAS_IOMMU';
     77## TODO: SIGNON_PARAM_WITH_RAW_MODE
    7778SIGNON_PARAM_MEM_SIZE           = 'MEM_SIZE';
    7879SIGNON_PARAM_SCRATCH_SIZE       = 'SCRATCH_SIZE';
  • trunk/src/VBox/ValidationKit/testboxscript/testboxscript_real.py

    r56295 r56374  
    171171            constants.tbreq.SIGNON_PARAM_HAS_64_BIT_GUEST: { self.VALUE: self._can64BitGuest(),        self.FN: None },
    172172            constants.tbreq.SIGNON_PARAM_HAS_IOMMU:        { self.VALUE: self._hasHostIoMmu(),         self.FN: None },
     173            #constants.tbreq.SIGNON_PARAM_WITH_RAW_MODE:    { self.VALUE: self._withRawModeSupport(),   self.FN: None },
    173174            constants.tbreq.SIGNON_PARAM_SCRIPT_REV:       { self.VALUE: self._getScriptRev(),         self.FN: None },
    174175            constants.tbreq.SIGNON_PARAM_REPORT:           { self.VALUE: self._getHostReport(),        self.FN: None },
     
    221222        os.environ['TESTBOX_MEM_SIZE']          = self.getSignOnParam(constants.tbreq.SIGNON_PARAM_MEM_SIZE);
    222223        os.environ['TESTBOX_SCRATCH_SIZE']      = self.getSignOnParam(constants.tbreq.SIGNON_PARAM_SCRATCH_SIZE);
     224        #TODO: os.environ['TESTBOX_WITH_RAW_MODE']     = self.getSignOnParam(constants.tbreq.SIGNON_PARAM_WITH_RAW_MODE);
     225        os.environ['TESTBOX_WITH_RAW_MODE']     = self._withRawModeSupport();
    223226        os.environ['TESTBOX_MANAGER_URL']       = self._oOptions.sTestManagerUrl;
    224227        os.environ['TESTBOX_UUID']              = self._sTestBoxUuid;
     
    531534            self._oOptions.fHasIoMmu = False;
    532535        return self._oOptions.fHasIoMmu;
     536
     537    def _withRawModeSupport(self):
     538        """
     539        Check if the testbox is configured with raw-mode support or not.
     540        """
     541        if self._oOptions.fWithRawMode is None:
     542            self._oOptions.fWithRawMode = True;
     543        return self._oOptions.fWithRawMode;
    533544
    534545    def _getHostReport(self):
     
    934945                          dest="fHasIoMmu", action="store_false", default=None,
    935946                          help="No I/O MMU available");
     947        parser.add_option("--raw-mode",
     948                          dest="fWithRawMode", action="store_true", default=None,
     949                          help="Use raw-mode on this host.");
     950        parser.add_option("--no-raw-mode",
     951                          dest="fWithRawMode", action="store_false", default=None,
     952                          help="Disables raw-mode tests on this host.");
    936953        parser.add_option("--pidfile",
    937954                          dest="sPidFile", default=None,
  • trunk/src/VBox/ValidationKit/testdriver/vbox.py

    r55995 r56374  
    26902690        return sCpuDesc.startswith("VIA") or sCpuDesc == 'CentaurHauls';
    26912691
     2692    def hasRawModeSupport(self, fQuiet = False):
     2693        """
     2694        Checks if raw-mode is supported by VirtualBox that the testbox is
     2695        configured for it.
     2696
     2697        Returns True / False.
     2698        Raises no exceptions.
     2699
     2700        Note! Differs from the rest in that we don't require the
     2701              TESTBOX_WITH_RAW_MODE value to match the API.  It is
     2702              sometimes helpful to disable raw-mode on individual
     2703              test boxes. (This probably goes for
     2704        """
     2705        # The environment variable can be used to disable raw-mode.
     2706        fEnv = os.environ.get('TESTBOX_WITH_RAW_MODE', None);
     2707        if fEnv is not None:
     2708            fEnv = fEnv.lower() not in [ 'false', 'f', 'not', 'no', 'n', '0', ];
     2709            if fEnv is False:
     2710                return False;
     2711
     2712        # Starting with 5.0 GA / RC2 the API can tell us whether VBox was built
     2713        # with raw-mode support or not.
     2714        self.importVBoxApi();
     2715        if self.fpApiVer >= 5.0:
     2716            try:
     2717                fVBox = self.oVBox.systemProperties.rawModeSupported;
     2718            except:
     2719                if not fQuiet:
     2720                    reporter.logXcpt();
     2721                fVBox = True;
     2722            if fVBox is False:
     2723                return False;
     2724
     2725        return True;
    26922726
    26932727    #
  • trunk/src/VBox/ValidationKit/testdriver/vboxtestvms.py

    r56295 r56374  
    671671            reporter.log('Nested paging not supported by the host, skipping it.');
    672672            self.asVirtModes.remove('hwvirt-np');
     673
     674        if 'raw' in self.asVirtModes and not oTestDrv.hasRawModeSupport():
     675            reporter.log('Raw-mode virtualization is not available in this build (or perhaps for this host), skipping it.');
     676            self.asVirtModes.remove('raw');
     677
    673678        return True;
    674679
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