VirtualBox

Ignore:
Timestamp:
Jan 22, 2019 4:50:18 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
128315
Message:

Additions/linux/vboxvideo: Fix incorrect type in assignment sparse warning
bugref:8282: Additions/linux: track kernel changes to vboxvideo in our own tree

Sparse emitted the following warning:
../drivers/staging/vboxvideo/vbox_fb.c:173:27: warning: incorrect type in as

signment (different address spaces)

../drivers/staging/vboxvideo/vbox_fb.c:173:27: expected char [noderef] <a

sn:2>*screen_base

../drivers/staging/vboxvideo/vbox_fb.c:173:27: got void *virtual


The vbox_bo buffer object kernel mapping is handled by a call
to ttm_bo_kmap() prior to the assignment of bo->kmap.virtual to
info->screen_base of type char iomem*.
Casting bo->kmap.virtual to char
iomem* in this assignment fixes
the warning.


vboxvideo: Fix address space of expression removal sparse warning


Sparse emitted the following warning:
../drivers/staging/vboxvideo/vbox_main.c:64:25: warning: cast removes address space of expression


vbox->vbva_buffers iomapping is handled by calling vbox_accel_init()
from vbox_hw_init().
force attribute is used in assignment to vbva to fix the warning.


Signed-off-by: Alexander Kapshuk <alexander.kapshuk@…>
Reviewed-by: Hans de Goede <hdegoede@…>
Signed-off-by: Greg Kroah-Hartman <gregkh@…>

File:
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/tests/additions/tdAddLinux1.py

    r72536 r76938  
    44
    55"""
    6 VirtualBox Validation Kit - OS/2 install tests.
     6VirtualBox Validation Kit - Linux Additions install tests.
    77"""
    88
     
    4949
    5050
    51 class tdGuestOsInstOs2(vbox.TestDriver):
     51class tdGuestOsInstLinux(vbox.TestDriver):
    5252    """
    53     OS/2 unattended installation.
     53    Linux unattended installation with Additions.
    5454
    5555    Scenario:
    5656        - Create new VM that corresponds specified installation ISO image
    5757        - Create HDD that corresponds to OS type that will be installed
    58         - Set VM boot order: HDD, Floppy, ISO
    59         - Start VM: sinse there is no OS installed on HDD, VM will booted from floppy
    60         - After first reboot VM will continue installation from HDD automatically
    61         - Wait for incomming TCP connection (guest should initiate such a
    62           connection in case installation has been completed successfully)
     58        - Wait for the installed Additions to write their message to the
     59          machine log file.
    6360    """
    64 
    65     ksSataController = 'SATA Controller'
    66     ksIdeController  = 'IDE Controller'
    67 
    68     # VM parameters required to run ISO image.
    69     # Format: (cBytesHdd, sKind)
    70     kaoVmParams = {
    71         'acp2-txs.iso': ( 2*1024*1024*1024, 'OS2', ksIdeController ),
    72         'mcp2-txs.iso': ( 2*1024*1024*1024, 'OS2', ksIdeController ),
    73     }
    7461
    7562    def __init__(self):
     
    8370        self.sIso                = None
    8471        self.sFloppy             = None
    85         self.sIsoPathBase        = os.path.join(self.sResourcePath, '4.2', 'isos')
     72        self.sIsoPathBase        = os.path.join(self.sResourcePath, '5.3', 'isos')
    8673        self.fEnableIOAPIC       = True
    8774        self.cCpus               = 1
     
    8976        self.fEnablePAE          = False
    9077        self.asExtraData         = []
     78        self.oUnattended         = None
    9179
    9280    #
     
    145133
    146134        assert self.sIso is not None
    147         if self.sIso not in self.kaoVmParams:
    148             reporter.log('Error: unknown ISO image specified: %s' % self.sIso)
    149             return False
    150 
    151         # Get VM params specific to ISO image
    152         cBytesHdd, sKind, sController = self.kaoVmParams[self.sIso]
     135
     136        # Create unattended object
     137        oUnattended = self.oVBox.createUnattendedInstaller()
     138        self.sIso = os.path.join(self.sIsoPathBase, self.sIso)
     139        assert os.path.isfile(self.sIso)
     140        oUnattended.isoPath = self.sIso
     141        oUnattended.user = "vbox"
     142        oUnattended.password = "password"
     143        oUnattended.installGuestAdditions = True
     144        try:
     145            oUnattended.detectIsoOS()
     146        except:
     147            pass
     148        sOSTypeId  = oUnattended.detectedOSTypeId
     149        sOSVersion = oUnattended.detectedOSVersion
     150        oGuestOSType = self.oVBox.getGuestOSType(sOSTypeId)
     151        assert oGuestOSType.familyId == "Linux"
    153152
    154153        # Create VM itself
    155154        eNic0AttachType = vboxcon.NetworkAttachmentType_NAT
    156         self.sIso = os.path.join(self.sIsoPathBase, self.sIso)
    157         assert os.path.isfile(self.sIso)
    158 
    159         self.sFloppy = os.path.join(self.sIsoPathBase, os.path.splitext(self.sIso)[0] + '.img')
    160 
    161         oVM = self.createTestVM(self.sVmName, 1, sKind = sKind, sDvdImage = self.sIso, cCpus = self.cCpus,
    162                                 sFloppy = self.sFloppy, eNic0AttachType = eNic0AttachType)
     155
     156        oVM = self.createTestVM(self.sVmName, 1, sKind = oGuestOSType.id, sDvdImage = None, cCpus = self.cCpus,
     157                                eNic0AttachType = eNic0AttachType, sNic0MacAddr = None)
    163158        assert oVM is not None
    164159
     
    168163        sHddPath = os.path.join(self.sScratchPath, self.sHddName)
    169164        fRc = True
    170         if sController == self.ksSataController:
    171             fRc = oSession.setStorageControllerType(vboxcon.StorageControllerType_IntelAhci, sController)
    172 
    173         fRc = fRc and oSession.createAndAttachHd(sHddPath, cb = cBytesHdd,
     165        if sOSTypeId == "RedHat" and sOSVersion.startswith("3."):
     166            sController = 'IDE Controller'
     167            fRc = fRc and oSession.setStorageControllerPortCount(sController, 1)
     168        else:
     169            sController = 'SATA Controller'
     170        fRc = oSession.setStorageControllerType(vboxcon.StorageControllerType_PIIX4, sController)
     171
     172        fRc = fRc and oSession.createAndAttachHd(sHddPath, cb = 12 * 1024 * 1024 * 1024,
    174173                                                 sController = sController, iPort = 0, fImmutable=False)
    175         if sController == self.ksSataController:
    176             fRc = fRc and oSession.setStorageControllerPortCount(sController, 1)
    177 
    178         # Set proper boot order
    179         fRc = fRc and oSession.setBootOrder(1, vboxcon.DeviceType_HardDisk)
    180         fRc = fRc and oSession.setBootOrder(2, vboxcon.DeviceType_Floppy)
    181174
    182175        # Enable HW virt
     
    208201        fRc = oSession.close()
    209202        assert fRc is True
     203
     204        # Set the machine on the unattended object
     205        oUnattended.machine = oVM
     206
     207        # Additional set-up
     208        oUnattended.prepare()
     209        oUnattended.constructMedia()
     210        oUnattended.reconfigureVM()
     211        self.oUnattended = oUnattended
    210212
    211213        return vbox.TestDriver.actionConfig(self)
     
    245247
    246248if __name__ == '__main__':
    247     sys.exit(tdGuestOsInstOs2().main(sys.argv));
    248 
     249    sys.exit(tdGuestOsInstLinux().main(sys.argv));
     250
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