1
0
mirror of https://github.com/kata-containers/kata-containers.git synced 2025-04-29 12:14:48 +00:00

govmm: Ignore govet checks, at least for now

govet checks have been ignored on govmm repo, but those are enabled on
kata-containers one.  So, in order to avoid failing our CIs let's just
keep ignoring the checks for the govmm structs and have an issue opened
for fixing it whenever someone has cycles to do it.

The important bit here is, we're not making anything worse that it
already is. :-)

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
Fabiano Fidêncio 2022-01-19 12:16:46 +01:00
parent de678a3aaa
commit 6dd6577986
3 changed files with 30 additions and 0 deletions
src/runtime/pkg/govmm/qemu

View File

@ -250,6 +250,7 @@ const (
)
// Object is a qemu object representation.
// nolint: govet
type Object struct {
// Driver is the qemu device driver
Driver DeviceDriver
@ -439,6 +440,7 @@ const (
)
// FSDevice represents a qemu filesystem configuration.
// nolint: govet
type FSDevice struct {
// Driver is the qemu device driver
Driver DeviceDriver
@ -574,6 +576,7 @@ const (
)
// CharDevice represents a qemu character device.
// nolint: govet
type CharDevice struct {
Backend CharDeviceBackend
@ -784,6 +787,7 @@ func (n NetDeviceType) QemuDeviceParam(netdev *NetDevice, config *Config) Device
}
// NetDevice represents a guest networking device
// nolint: govet
type NetDevice struct {
// Type is the netdev type (e.g. tap).
Type NetDeviceType
@ -1041,6 +1045,7 @@ func (dev LegacySerialDevice) deviceName(config *Config) string {
*/
// SerialDevice represents a qemu serial device.
// nolint: govet
type SerialDevice struct {
// Driver is the qemu device driver
Driver DeviceDriver
@ -1149,6 +1154,7 @@ const (
)
// BlockDevice represents a qemu block device.
// nolint: govet
type BlockDevice struct {
Driver DeviceDriver
ID string
@ -1316,6 +1322,7 @@ func (dev LoaderDevice) QemuParams(config *Config) []string {
// VhostUserDevice represents a qemu vhost-user device meant to be passed
// in to the guest
// nolint: govet
type VhostUserDevice struct {
SocketPath string //path to vhostuser socket on host
CharDevID string
@ -1567,6 +1574,7 @@ func (vhostuserDev VhostUserDevice) deviceName(config *Config) string {
}
// PCIeRootPortDevice represents a memory balloon device.
// nolint: govet
type PCIeRootPortDevice struct {
ID string // format: rp{n}, n>=0
@ -1747,6 +1755,7 @@ func (vfioDev VFIODevice) deviceName(config *Config) string {
}
// SCSIController represents a SCSI controller device.
// nolint: govet
type SCSIController struct {
ID string
@ -1843,6 +1852,7 @@ const (
)
// BridgeDevice represents a qemu bridge device like pci-bridge, pxb, etc.
// nolint: govet
type BridgeDevice struct {
// Type of the bridge
Type BridgeType
@ -1940,6 +1950,7 @@ func (bridgeDev BridgeDevice) QemuParams(config *Config) []string {
}
// VSOCKDevice represents a AF_VSOCK socket.
// nolint: govet
type VSOCKDevice struct {
ID string
@ -2036,6 +2047,7 @@ func (vsock VSOCKDevice) deviceName(config *Config) string {
}
// RngDevice represents a random number generator device.
// nolint: govet
type RngDevice struct {
// ID is the device ID
ID string
@ -2124,6 +2136,7 @@ func (v RngDevice) deviceName(config *Config) string {
}
// BalloonDevice represents a memory balloon device.
// nolint: govet
type BalloonDevice struct {
DeflateOnOOM bool
DisableModern bool
@ -2358,6 +2371,7 @@ type SMP struct {
}
// Memory is the guest memory configuration structure.
// nolint: govet
type Memory struct {
// Size is the amount of memory made available to the guest.
// It should be suffixed with M or G for sizes in megabytes or
@ -2505,6 +2519,7 @@ const (
)
// Incoming controls migration source preparation
// nolint: govet
type Incoming struct {
// Possible values are MigrationFD, MigrationExec
MigrationType int
@ -2516,6 +2531,7 @@ type Incoming struct {
// Config is the qemu configuration structure.
// It allows for passing custom settings and parameters to the qemu API.
// nolint: govet
type Config struct {
// Path is the qemu binary path.
Path string

View File

@ -96,6 +96,7 @@ type qmpEventFilter struct {
}
// QMPEvent contains a single QMP event, sent on the QMPConfig.EventCh channel.
// nolint: govet
type QMPEvent struct {
// The name of the event, e.g., DEVICE_DELETED
Name string
@ -118,6 +119,7 @@ type qmpResult struct {
err error
}
// nolint: govet
type qmpCommand struct {
ctx context.Context
res chan qmpResult
@ -130,6 +132,7 @@ type qmpCommand struct {
// QMP is a structure that contains the internal state used by startQMPLoop and
// the go routines it spwans. All the contents of this structure are private.
// nolint: govet
type QMP struct {
cmdCh chan qmpCommand
conn io.ReadWriteCloser
@ -141,6 +144,7 @@ type QMP struct {
// QMPVersion contains the version number and the capabailities of a QEMU
// instance, as reported in the QMP greeting message.
// nolint: govet
type QMPVersion struct {
Major int
Minor int
@ -158,6 +162,7 @@ type CPUProperties struct {
}
// HotpluggableCPU represents a hotpluggable CPU
// nolint: govet
type HotpluggableCPU struct {
Type string `json:"type"`
VcpusCount int `json:"vcpus-count"`
@ -166,6 +171,7 @@ type HotpluggableCPU struct {
}
// MemoryDevicesData cotains the data describes a memory device
// nolint: govet
type MemoryDevicesData struct {
Slot int `json:"slot"`
Node int `json:"node"`
@ -178,12 +184,14 @@ type MemoryDevicesData struct {
}
// MemoryDevices represents memory devices of vm
// nolint: govet
type MemoryDevices struct {
Data MemoryDevicesData `json:"data"`
Type string `json:"type"`
}
// CPUInfo represents information about each virtual CPU
// nolint: govet
type CPUInfo struct {
CPU int `json:"CPU"`
Current bool `json:"current"`
@ -196,6 +204,7 @@ type CPUInfo struct {
}
// CPUInfoFast represents information about each virtual CPU
// nolint: govet
type CPUInfoFast struct {
CPUIndex int `json:"cpu-index"`
QomPath string `json:"qom-path"`
@ -252,6 +261,7 @@ type SchemaInfo struct {
}
// StatusInfo represents guest running status
// nolint: govet
type StatusInfo struct {
Running bool `json:"running"`
SingleStep bool `json:"singlestep"`

View File

@ -61,11 +61,13 @@ func (l qmpTestLogger) Errorf(format string, v ...interface{}) {
l.Infof(format, v...)
}
// nolint: govet
type qmpTestCommand struct {
name string
args map[string]interface{}
}
// nolint: govet
type qmpTestEvent struct {
name string
data map[string]interface{}
@ -73,11 +75,13 @@ type qmpTestEvent struct {
after time.Duration
}
// nolint: govet
type qmpTestResult struct {
result string
data interface{}
}
// nolint: govet
type qmpTestCommandBuffer struct {
newDataCh chan []byte
t *testing.T