VirtualBox

Changeset 78824 in vbox


Ignore:
Timestamp:
May 28, 2019 3:15:37 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
130923
Message:

ValKit: Moved isHostCpuAffectedByUbuntuNewAmdBug from tdGuestOsInstTest1.py and into the parent, vboxtestvms.py.

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

Legend:

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

    r78674 r78824  
    595595        return False;
    596596
     597    def isHostCpuAffectedByUbuntuNewAmdBug(self, oTestDrv):
     598        """
     599        Checks if the host OS is affected by older ubuntu installers being very
     600        picky about which families of AMD CPUs it would run on.
     601
     602        The installer checks for family 15, later 16, later 20, and in 11.10
     603        they remove the family check for AMD CPUs.
     604        """
     605        if not oTestDrv.isHostCpuAmd():
     606            return False;
     607        try:
     608            (uMaxExt, _, _, _) = oTestDrv.oVBox.host.getProcessorCPUIDLeaf(0, 0x80000000, 0);
     609            (uFamilyModel, _, _, _) = oTestDrv.oVBox.host.getProcessorCPUIDLeaf(0, 0x80000001, 0);
     610        except:
     611            reporter.logXcpt();
     612            return False;
     613        if uMaxExt < 0x80000001 or uMaxExt > 0x8000ffff:
     614            return False;
     615
     616        uFamily = (uFamilyModel >> 8) & 0xf
     617        if uFamily == 0xf:
     618            uFamily = ((uFamilyModel >> 20) & 0x7f) + 0xf;
     619        ## @todo Break this down into which old ubuntu release supports exactly
     620        ##       which AMD family, if we care.
     621        if uFamily <= 15:
     622            return False;
     623        reporter.log('Skipping "%s" because host CPU is a family %u AMD, which may cause trouble for the guest OS installer.'
     624                     % (self.sVmName, uFamily,));
     625        return True;
     626
    597627
    598628class BootSectorTestVm(TestVm):
  • trunk/src/VBox/ValidationKit/tests/installation/tdGuestOsInstTest1.py

    r76553 r78824  
    192192        # Done.
    193193        return (fRc, oVM)
    194 
    195     def isHostCpuAffectedByUbuntuNewAmdBug(self, oTestDrv):
    196         """
    197         Checks if the host OS is affected by older ubuntu installers being very
    198         picky about which families of AMD CPUs it would run on.
    199 
    200         The installer checks for family 15, later 16, later 20, and in 11.10
    201         they remove the family check for AMD CPUs.
    202         """
    203         if not oTestDrv.isHostCpuAmd():
    204             return False;
    205         try:
    206             (uMaxExt, _, _, _) = oTestDrv.oVBox.host.getProcessorCPUIDLeaf(0, 0x80000000, 0);
    207             (uFamilyModel, _, _, _) = oTestDrv.oVBox.host.getProcessorCPUIDLeaf(0, 0x80000001, 0);
    208         except:
    209             reporter.logXcpt();
    210             return False;
    211         if uMaxExt < 0x80000001 or uMaxExt > 0x8000ffff:
    212             return False;
    213 
    214         uFamily = (uFamilyModel >> 8) & 0xf
    215         if uFamily == 0xf:
    216             uFamily = ((uFamilyModel >> 20) & 0x7f) + 0xf;
    217         ## @todo Break this down into which old ubuntu release supports exactly
    218         ##       which AMD family, if we care.
    219         if uFamily <= 15:
    220             return False;
    221         reporter.log('Skipping "%s" because host CPU is a family %u AMD, which may cause trouble for the guest OS installer.'
    222                      % (self.sVmName, uFamily,));
    223         return True;
    224194
    225195
Note: See TracChangeset for help on using the changeset viewer.

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