mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-27 15:57:09 +00:00
runtime: fix golint errors
Need to run gofmt -s on them. Signed-off-by: Peng Tao <bergwolf@hyper.sh>
This commit is contained in:
parent
d36d3486e9
commit
b3e528443d
@ -68,10 +68,10 @@ func TestStatsSandbox(t *testing.T) {
|
|||||||
StatsFunc: getSandboxCPUFunc(1000, 100000),
|
StatsFunc: getSandboxCPUFunc(1000, 100000),
|
||||||
StatsContainerFunc: getStatsContainerCPUFunc(100, 200, 10000, 20000),
|
StatsContainerFunc: getStatsContainerCPUFunc(100, 200, 10000, 20000),
|
||||||
MockContainers: []*vcmock.Container{
|
MockContainers: []*vcmock.Container{
|
||||||
&vcmock.Container{
|
{
|
||||||
MockID: "foo",
|
MockID: "foo",
|
||||||
},
|
},
|
||||||
&vcmock.Container{
|
{
|
||||||
MockID: "bar",
|
MockID: "bar",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -75,7 +75,7 @@ func TestIsVhostUserBlk(t *testing.T) {
|
|||||||
isVhostUserBlk := isVhostUserBlk(
|
isVhostUserBlk := isVhostUserBlk(
|
||||||
config.DeviceInfo{
|
config.DeviceInfo{
|
||||||
DevType: d.devType,
|
DevType: d.devType,
|
||||||
Major: d.major,
|
Major: d.major,
|
||||||
})
|
})
|
||||||
assert.Equal(t, d.expected, isVhostUserBlk)
|
assert.Equal(t, d.expected, isVhostUserBlk)
|
||||||
}
|
}
|
||||||
@ -100,7 +100,7 @@ func TestIsVhostUserSCSI(t *testing.T) {
|
|||||||
isVhostUserSCSI := isVhostUserSCSI(
|
isVhostUserSCSI := isVhostUserSCSI(
|
||||||
config.DeviceInfo{
|
config.DeviceInfo{
|
||||||
DevType: d.devType,
|
DevType: d.devType,
|
||||||
Major: d.major,
|
Major: d.major,
|
||||||
})
|
})
|
||||||
assert.Equal(t, d.expected, isVhostUserSCSI)
|
assert.Equal(t, d.expected, isVhostUserSCSI)
|
||||||
}
|
}
|
||||||
|
@ -136,18 +136,18 @@ type qemuArch interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type qemuArchBase struct {
|
type qemuArchBase struct {
|
||||||
qemuMachine govmmQemu.Machine
|
qemuMachine govmmQemu.Machine
|
||||||
qemuExePath string
|
qemuExePath string
|
||||||
memoryOffset uint32
|
memoryOffset uint32
|
||||||
nestedRun bool
|
nestedRun bool
|
||||||
vhost bool
|
vhost bool
|
||||||
disableNvdimm bool
|
disableNvdimm bool
|
||||||
dax bool
|
dax bool
|
||||||
networkIndex int
|
networkIndex int
|
||||||
kernelParamsNonDebug []Param
|
kernelParamsNonDebug []Param
|
||||||
kernelParamsDebug []Param
|
kernelParamsDebug []Param
|
||||||
kernelParams []Param
|
kernelParams []Param
|
||||||
Bridges []types.Bridge
|
Bridges []types.Bridge
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -36,7 +36,7 @@ var kernelParams = []Param{
|
|||||||
{"net.ifnames", "0"},
|
{"net.ifnames", "0"},
|
||||||
}
|
}
|
||||||
|
|
||||||
var supportedQemuMachine = govmmQemu.Machine {
|
var supportedQemuMachine = govmmQemu.Machine{
|
||||||
Type: QemuPseries,
|
Type: QemuPseries,
|
||||||
Options: defaultQemuMachineOptions,
|
Options: defaultQemuMachineOptions,
|
||||||
}
|
}
|
||||||
@ -63,12 +63,12 @@ func newQemuArch(config HypervisorConfig) (qemuArch, error) {
|
|||||||
|
|
||||||
q := &qemuPPC64le{
|
q := &qemuPPC64le{
|
||||||
qemuArchBase{
|
qemuArchBase{
|
||||||
qemuMachine: supportedQemuMachine,
|
qemuMachine: supportedQemuMachine,
|
||||||
qemuExePath: defaultQemuPath,
|
qemuExePath: defaultQemuPath,
|
||||||
memoryOffset: config.MemOffset,
|
memoryOffset: config.MemOffset,
|
||||||
kernelParamsNonDebug: kernelParamsNonDebug,
|
kernelParamsNonDebug: kernelParamsNonDebug,
|
||||||
kernelParamsDebug: kernelParamsDebug,
|
kernelParamsDebug: kernelParamsDebug,
|
||||||
kernelParams: kernelParams,
|
kernelParams: kernelParams,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ var kernelParams = []Param{
|
|||||||
|
|
||||||
var ccwbridge = types.NewBridge(types.CCW, "", make(map[uint32]string, types.CCWBridgeMaxCapacity), 0)
|
var ccwbridge = types.NewBridge(types.CCW, "", make(map[uint32]string, types.CCWBridgeMaxCapacity), 0)
|
||||||
|
|
||||||
var supportedQemuMachine = govmmQemu.Machine {
|
var supportedQemuMachine = govmmQemu.Machine{
|
||||||
Type: QemuCCWVirtio,
|
Type: QemuCCWVirtio,
|
||||||
Options: defaultQemuMachineOptions,
|
Options: defaultQemuMachineOptions,
|
||||||
}
|
}
|
||||||
@ -61,12 +61,12 @@ func newQemuArch(config HypervisorConfig) (qemuArch, error) {
|
|||||||
|
|
||||||
q := &qemuS390x{
|
q := &qemuS390x{
|
||||||
qemuArchBase{
|
qemuArchBase{
|
||||||
qemuMachine: supportedQemuMachine,
|
qemuMachine: supportedQemuMachine,
|
||||||
qemuExePath: defaultQemuPath,
|
qemuExePath: defaultQemuPath,
|
||||||
memoryOffset: config.MemOffset,
|
memoryOffset: config.MemOffset,
|
||||||
kernelParamsNonDebug: kernelParamsNonDebug,
|
kernelParamsNonDebug: kernelParamsNonDebug,
|
||||||
kernelParamsDebug: kernelParamsDebug,
|
kernelParamsDebug: kernelParamsDebug,
|
||||||
kernelParams: kernelParams,
|
kernelParams: kernelParams,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
// Set first bridge type to CCW
|
// Set first bridge type to CCW
|
||||||
|
Loading…
Reference in New Issue
Block a user