Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cli/kata-check.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ const (
kernelPropertyCorrect = "Kernel property value correct"

// these refer to fields in the procCPUINFO file
genericCPUFlagsTag = "flags" // nolint: varcheck, unused
genericCPUVendorField = "vendor_id" // nolint: varcheck, unused
genericCPUModelField = "model name" // nolint: varcheck, unused
genericCPUFlagsTag = "flags" // nolint: varcheck, unused, deadcode
genericCPUVendorField = "vendor_id" // nolint: varcheck, unused, deadcode
genericCPUModelField = "model name" // nolint: varcheck, unused, deadcode
)

// variables rather than consts to allow tests to modify them
Expand Down
6 changes: 3 additions & 3 deletions cli/kata-check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ type testModuleData struct {
contents string
}

// nolint: structcheck, unused
// nolint: structcheck, unused, deadcode
type testCPUData struct {
vendorID string
flags string
expectError bool
}

// nolint: structcheck, unused
// nolint: structcheck, unused, deadcode
type testCPUDetail struct {
contents string
expectedVendor string
Expand Down Expand Up @@ -147,7 +147,7 @@ func makeCPUInfoFile(path, vendorID, flags string) error {
return ioutil.WriteFile(path, contents.Bytes(), testFileMode)
}

// nolint: unused
// nolint: unused, deadcode
func genericTestGetCPUDetails(t *testing.T, validVendor string, validModel string, validContents string, data []testCPUDetail) {
tmpdir, err := ioutil.TempDir("", "")
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion cli/kata-env_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ func getExpectedAgentDetails(config oci.RuntimeConfig) (AgentInfo, error) {
}, nil
}

// nolint: unused
// nolint: unused, deadcode
func genericGetExpectedHostDetails(tmpdir string, expectedVendor string, expectedModel string, expectedVMContainerCapable bool) (HostInfo, error) {
type filesToCreate struct {
file string
Expand Down
4 changes: 2 additions & 2 deletions virtcontainers/hypervisor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -437,14 +437,14 @@ func TestGetHostMemorySizeKb(t *testing.T) {
}
}

// nolint: unused
// nolint: unused, deadcode
type testNestedVMMData struct {
content []byte
expectedErr bool
expected bool
}

// nolint: unused,deadcode
// nolint: unused, deadcode
func genericTestRunningOnVMM(t *testing.T, data []testNestedVMMData) {
for _, d := range data {
f, err := ioutil.TempFile("", "cpuinfo")
Expand Down
6 changes: 3 additions & 3 deletions virtcontainers/qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -1425,7 +1425,7 @@ func (q *qemu) resizeMemory(reqMemMB uint32, memoryBlockSizeMB uint32) (uint32,
}

// genericAppendBridges appends to devices the given bridges
// nolint: unused
// nolint: unused, deadcode
func genericAppendBridges(devices []govmmQemu.Device, bridges []types.PCIBridge, machineType string) []govmmQemu.Device {
bus := defaultPCBridgeBus
switch machineType {
Expand Down Expand Up @@ -1457,7 +1457,7 @@ func genericAppendBridges(devices []govmmQemu.Device, bridges []types.PCIBridge,
return devices
}

// nolint: unused
// nolint: unused, deadcode
func genericBridges(number uint32, machineType string) []types.PCIBridge {
var bridges []types.PCIBridge
var bt types.PCIType
Expand Down Expand Up @@ -1490,7 +1490,7 @@ func genericBridges(number uint32, machineType string) []types.PCIBridge {
return bridges
}

// nolint: unused
// nolint: unused, deadcode
func genericMemoryTopology(memoryMb, hostMemoryMb uint64, slots uint8, memoryOffset uint32) govmmQemu.Memory {
// image NVDIMM device needs memory space 1024MB
// See https://github.com/clearcontainers/runtime/issues/380
Expand Down