Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

unit-test: bugs on a few unit tests on aarch64 #1200

Closed
Pennyzct opened this issue Jan 31, 2019 · 0 comments
Closed

unit-test: bugs on a few unit tests on aarch64 #1200

Pennyzct opened this issue Jan 31, 2019 · 0 comments

Comments

@Pennyzct
Copy link
Contributor

Description of problem

09:55:00 cli/kata-check_arm64.go:129:9:warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
09:55:02 virtcontainers/qemu_arm64_test.go:43:23:warning: unused variable or constant undeclared name: virt (varcheck)
09:55:02 virtcontainers/qemu_arm64_test.go:50:11:warning: unused variable or constant undeclared name: defaultMemSlots (varcheck)
09:55:02 virtcontainers/qemu_arm64_test.go:54:40:warning: unused variable or constant too few arguments in call to arm64.memoryTopology (varcheck)
09:55:02 virtcontainers/qemu_arm64_test.go:29:23:warning: unused variable or constant undeclared name: virt (varcheck)
09:55:02 cli/kata-check_test.go:141:113:warning: unused variable or constant undeclared name: TestDataa (varcheck)
09:55:03 virtcontainers/qemu_arm64_test.go:43:23:warning: unused struct field undeclared name: virt (structcheck)
09:55:03 virtcontainers/qemu_arm64_test.go:50:11:warning: unused struct field undeclared name: defaultMemSlots (structcheck)
09:55:03 virtcontainers/qemu_arm64_test.go:54:40:warning: unused struct field too few arguments in call to arm64.memoryTopology (structcheck)
09:55:03 virtcontainers/qemu_arm64_test.go:29:23:warning: unused struct field undeclared name: virt (structcheck)
09:55:03 cli/kata-check_test.go:141:113:warning: unused struct field undeclared name: TestDataa (structcheck)
09:55:03 cli/kata-check_test.go:141:113:warning: undeclared name: TestDataa (unused)
09:55:04 cli/kata-check_test.go:141:113:warning: undeclared name: TestDataa (staticcheck)
09:55:05 Build step 'Execute shell' marked build as failure

There existed some bugs on a few unit tests on aarch64, and I will fix them asap.
During the time, In case ARM CI blocks other PRs, please bring it down temporarily.
@grahamwhaley @jodh-intel

Pennyzct added a commit to Pennyzct/runtime that referenced this issue Jan 31, 2019
…o file

argument struct TestDataa in generic func genericTestGetCPUDetails is repeatedly
defined in almost all arch-dependent .go file, cli/kata-check_amd64_test.go,
cli/kata-check_ppc64le_test.go, etcm, except arm64. let's only declare it once in
cli/kata-check_test.go. change its name to testCPUDetail for better understanding.

Fixes: kata-containers#1200

Signed-off-by: Penny Zheng <[email protected]>
Pennyzct added a commit to Pennyzct/runtime that referenced this issue Jan 31, 2019
refine a set of test functions under qemu_arm64_test.go. e.g. test
func for memoryTopology shouldn't be the same one on amd64, since
for now, we don't support nvdimm on arm64.

Fixes: kata-containers#1200

Signed-off-by: Penny Zheng <[email protected]>
Pennyzct added a commit to Pennyzct/runtime that referenced this issue Jan 31, 2019
original tests for func RunningOnVMM are sort of amd64-specific,
since all other archs don't support nested VMM for now.

Fixes: kata-containers#1200

Signed-off-by: Penny Zheng <[email protected]>
Pennyzct added a commit to Pennyzct/runtime that referenced this issue Jan 31, 2019
…o file

argument struct TestDataa in generic func genericTestGetCPUDetails is repeatedly
defined in almost all arch-dependent .go file, cli/kata-check_amd64_test.go,
cli/kata-check_ppc64le_test.go, etcm, except arm64. let's only declare it once in
cli/kata-check_test.go. change its name to testCPUDetail for better understanding.

Fixes: kata-containers#1200

Signed-off-by: Penny Zheng <[email protected]>
Pennyzct added a commit to Pennyzct/runtime that referenced this issue Jan 31, 2019
refine a set of test functions under qemu_arm64_test.go. e.g. test
func for memoryTopology shouldn't be the same one on amd64, since
for now, we don't support nvdimm on arm64.

Fixes: kata-containers#1200

Signed-off-by: Penny Zheng <[email protected]>
Pennyzct added a commit to Pennyzct/runtime that referenced this issue Jan 31, 2019
original tests for func RunningOnVMM are sort of amd64-specific,
since all other archs don't support nested VMM for now.

Fixes: kata-containers#1200

Signed-off-by: Penny Zheng <[email protected]>
Pennyzct added a commit to Pennyzct/runtime that referenced this issue Feb 13, 2019
…o file

argument struct TestDataa in generic func genericTestGetCPUDetails is repeatedly
defined in almost all arch-dependent .go file, cli/kata-check_amd64_test.go,
cli/kata-check_ppc64le_test.go, etcm, except arm64. let's only declare it once in
cli/kata-check_test.go. change its name to testCPUDetail for better understanding.

Fixes: kata-containers#1200

Signed-off-by: Penny Zheng <[email protected]>
Pennyzct added a commit to Pennyzct/runtime that referenced this issue Feb 13, 2019
refine a set of test functions under qemu_arm64_test.go. e.g. test
func for memoryTopology shouldn't be the same one on amd64, since
for now, we don't support nvdimm on arm64.

Fixes: kata-containers#1200

Signed-off-by: Penny Zheng <[email protected]>
Pennyzct added a commit to Pennyzct/runtime that referenced this issue Feb 13, 2019
original tests for func RunningOnVMM are sort of amd64-specific,
since all other archs don't support nested VMM for now.

Fixes: kata-containers#1200

Signed-off-by: Penny Zheng <[email protected]>
Pennyzct added a commit to Pennyzct/runtime that referenced this issue Feb 13, 2019
…o file

argument struct TestDataa in generic func genericTestGetCPUDetails is repeatedly
defined in almost all arch-dependent .go file, cli/kata-check_amd64_test.go,
cli/kata-check_ppc64le_test.go, etcm, except arm64. let's only declare it once in
cli/kata-check_test.go. change its name to testCPUDetail for better understanding.

Fixes: kata-containers#1200

Signed-off-by: Penny Zheng <[email protected]>
Pennyzct added a commit to Pennyzct/runtime that referenced this issue Feb 13, 2019
refine a set of test functions under qemu_arm64_test.go. e.g. test
func for memoryTopology shouldn't be the same one on amd64, since
for now, we don't support nvdimm on arm64.

Fixes: kata-containers#1200

Signed-off-by: Penny Zheng <[email protected]>
Pennyzct added a commit to Pennyzct/runtime that referenced this issue Feb 13, 2019
original tests for func RunningOnVMM are sort of amd64-specific,
since all other archs don't support nested VMM for now.

Fixes: kata-containers#1200

Signed-off-by: Penny Zheng <[email protected]>
Pennyzct added a commit to Pennyzct/runtime that referenced this issue Feb 13, 2019
…o file

argument struct TestDataa in generic func genericTestGetCPUDetails is repeatedly
defined in almost all arch-dependent .go file, cli/kata-check_amd64_test.go,
cli/kata-check_ppc64le_test.go, etcm, except arm64. let's only declare it once in
cli/kata-check_test.go. change its name to testCPUDetail for better understanding.

Fixes: kata-containers#1200

Signed-off-by: Penny Zheng <[email protected]>
Pennyzct added a commit to Pennyzct/runtime that referenced this issue Feb 13, 2019
refine a set of test functions under qemu_arm64_test.go. e.g. test
func for memoryTopology shouldn't be the same one on amd64, since
for now, we don't support nvdimm on arm64.

Fixes: kata-containers#1200

Signed-off-by: Penny Zheng <[email protected]>
Pennyzct added a commit to Pennyzct/runtime that referenced this issue Feb 13, 2019
original tests for func RunningOnVMM are sort of amd64-specific,
since all other archs don't support nested VMM for now.

Fixes: kata-containers#1200

Signed-off-by: Penny Zheng <[email protected]>
Pennyzct added a commit to Pennyzct/runtime that referenced this issue Feb 13, 2019
since generic func genericAppendBridges and genericBridges
is also applied for machine type QemuVirt, we use it as implementation
for appendBridges and bridges on aarch64.
since const defaultPCBridgeBus is used in generic func
genericAppendBridges for pc machine, we should define it once
in generic file, instead of redefining it in different
arch-specific files.

Fixes: kata-containers#1200

Signed-off-by: Penny Zheng <[email protected]>
Pennyzct added a commit to Pennyzct/runtime that referenced this issue Feb 13, 2019
since all generic* could bring unused linter warnings, which lead to
CI crash, we add nolint comment to avoid them.

Fixes: kata-containers#1200

Signed-off-by: Samuel Ortiz <[email protected]>
Signed-off-by: Penny Zheng <[email protected]>
Pennyzct added a commit to Pennyzct/runtime that referenced this issue Feb 13, 2019
since generic func genericAppendBridges and genericBridges
is also applied for machine type QemuVirt, we use it as implementation
for appendBridges and bridges on aarch64.
since const defaultPCBridgeBus is used in generic func
genericAppendBridges for pc machine, we should define it once
in generic file, instead of redefining it in different
arch-specific files.

Fixes: kata-containers#1200

Signed-off-by: Penny Zheng <[email protected]>
Pennyzct added a commit to Pennyzct/runtime that referenced this issue Feb 13, 2019
since all generic* could bring unused linter warnings, which lead to
CI crash, we add nolint comment to avoid them.

Fixes: kata-containers#1200

Signed-off-by: Samuel Ortiz <[email protected]>
Signed-off-by: Penny Zheng <[email protected]>
Pennyzct added a commit to Pennyzct/runtime that referenced this issue Feb 13, 2019
since all generic* could bring unused linter warnings, which lead to
CI crash, we add nolint comment to avoid them.

Fixes: kata-containers#1200

Signed-off-by: Samuel Ortiz <[email protected]>
Signed-off-by: Penny Zheng <[email protected]>
Pennyzct added a commit to Pennyzct/runtime that referenced this issue Feb 14, 2019
refine a set of test functions under qemu_arm64_test.go. e.g. test
func for memoryTopology shouldn't be the same one on amd64, since
for now, we don't support nvdimm on arm64.

Fixes: kata-containers#1200

Signed-off-by: Penny Zheng <[email protected]>
Pennyzct added a commit to Pennyzct/runtime that referenced this issue Feb 14, 2019
original tests for func RunningOnVMM are sort of amd64-specific,
since all other archs don't support nested VMM for now.

Fixes: kata-containers#1200

Signed-off-by: Penny Zheng <[email protected]>
Pennyzct added a commit to Pennyzct/runtime that referenced this issue Feb 14, 2019
since generic func genericAppendBridges and genericBridges
is also applied for machine type QemuVirt, we use it as implementation
for appendBridges and bridges on aarch64.
since const defaultPCBridgeBus is used in generic func
genericAppendBridges for pc machine, we should define it once
in generic file, instead of redefining it in different
arch-specific files.

Fixes: kata-containers#1200

Signed-off-by: Penny Zheng <[email protected]>
Pennyzct added a commit to Pennyzct/runtime that referenced this issue Feb 14, 2019
since all generic* could bring unused linter warnings, which lead to
CI crash, we add nolint comment to avoid them.

Fixes: kata-containers#1200

Signed-off-by: Samuel Ortiz <[email protected]>
Signed-off-by: Penny Zheng <[email protected]>
Pennyzct added a commit to Pennyzct/runtime that referenced this issue Feb 14, 2019
original tests for func RunningOnVMM are sort of amd64-specific,
since all other archs don't support nested VMM for now.

Fixes: kata-containers#1200

Signed-off-by: Penny Zheng <[email protected]>
Pennyzct added a commit to Pennyzct/runtime that referenced this issue Feb 14, 2019
since generic func genericAppendBridges and genericBridges
is also applied for machine type QemuVirt, we use it as implementation
for appendBridges and bridges on aarch64.
since const defaultPCBridgeBus is used in generic func
genericAppendBridges for pc machine, we should define it once
in generic file, instead of redefining it in different
arch-specific files.

Fixes: kata-containers#1200

Signed-off-by: Penny Zheng <[email protected]>
Pennyzct added a commit to Pennyzct/runtime that referenced this issue Feb 14, 2019
since all generic* could bring unused linter warnings, which lead to
CI crash, we add nolint comment to avoid them.

Fixes: kata-containers#1200

Signed-off-by: Samuel Ortiz <[email protected]>
Signed-off-by: Penny Zheng <[email protected]>
Pennyzct added a commit to Pennyzct/runtime that referenced this issue Feb 14, 2019
refine struct testData in func TestGetCPUDetails to remove redundant
/unused struct field expectedVendor and expectedModel

Fixes: kata-containers#1200

Signed-off-by: Penny Zheng <[email protected]>
egernst pushed a commit to egernst/runtime that referenced this issue Feb 26, 2019
…o file

argument struct TestDataa in generic func genericTestGetCPUDetails is repeatedly
defined in almost all arch-dependent .go file, cli/kata-check_amd64_test.go,
cli/kata-check_ppc64le_test.go, etcm, except arm64. let's only declare it once in
cli/kata-check_test.go. change its name to testCPUDetail for better understanding.

Fixes: kata-containers#1200

Signed-off-by: Penny Zheng <[email protected]>
egernst pushed a commit to egernst/runtime that referenced this issue Feb 26, 2019
refine a set of test functions under qemu_arm64_test.go. e.g. test
func for memoryTopology shouldn't be the same one on amd64, since
for now, we don't support nvdimm on arm64.

Fixes: kata-containers#1200

Signed-off-by: Penny Zheng <[email protected]>
egernst pushed a commit to egernst/runtime that referenced this issue Feb 26, 2019
original tests for func RunningOnVMM are sort of amd64-specific,
since all other archs don't support nested VMM for now.

Fixes: kata-containers#1200

Signed-off-by: Penny Zheng <[email protected]>
egernst pushed a commit to egernst/runtime that referenced this issue Feb 26, 2019
since generic func genericAppendBridges and genericBridges
is also applied for machine type QemuVirt, we use it as implementation
for appendBridges and bridges on aarch64.
since const defaultPCBridgeBus is used in generic func
genericAppendBridges for pc machine, we should define it once
in generic file, instead of redefining it in different
arch-specific files.

Fixes: kata-containers#1200

Signed-off-by: Penny Zheng <[email protected]>
egernst pushed a commit to egernst/runtime that referenced this issue Feb 26, 2019
since all generic* could bring unused linter warnings, which lead to
CI crash, we add nolint comment to avoid them.

Fixes: kata-containers#1200

Signed-off-by: Samuel Ortiz <[email protected]>
Signed-off-by: Penny Zheng <[email protected]>
egernst pushed a commit to egernst/runtime that referenced this issue Feb 26, 2019
refine struct testData in func TestGetCPUDetails to remove redundant
/unused struct field expectedVendor and expectedModel

Fixes: kata-containers#1200

Signed-off-by: Penny Zheng <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant