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

Unit test: fix bugs on a few unit tests on aarch64 #1202

Merged
merged 6 commits into from
Feb 15, 2019

Commits on Feb 14, 2019

  1. unit-test: struct TestDataa should be included in arch-indenpedent .g…

    …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 committed Feb 14, 2019
    Configuration menu
    Copy the full SHA
    44e2b9a View commit details
    Browse the repository at this point in the history
  2. unit-test: refine qemu_arm64_test.go

    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 committed Feb 14, 2019
    Configuration menu
    Copy the full SHA
    0679f6f View commit details
    Browse the repository at this point in the history
  3. unit-test: test func for RunningOnVMM should be arch-dependent

    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 committed Feb 14, 2019
    Configuration menu
    Copy the full SHA
    e93fb0b View commit details
    Browse the repository at this point in the history
  4. runtime: add appendBridges for arm64

    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 committed Feb 14, 2019
    Configuration menu
    Copy the full SHA
    3ec56ea View commit details
    Browse the repository at this point in the history
  5. unit-test: add nolint comment to avoid unused warning

    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 committed Feb 14, 2019
    Configuration menu
    Copy the full SHA
    1b967a4 View commit details
    Browse the repository at this point in the history
  6. unit-test: refine func TestGetCPUDetails

    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]>
    Pennyzct committed Feb 14, 2019
    Configuration menu
    Copy the full SHA
    23c554e View commit details
    Browse the repository at this point in the history