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

test: supplement test cases for kata-check and kata-env in Arm64 #414

Merged
merged 1 commit into from
Jun 21, 2018

Conversation

Pennyzct
Copy link
Contributor

There were missing test cases in Arm64 for platform-dependent kata-check and kata-env, leading to 'make test' failure under kata-containers/runtime

Fixes: #403

Signed-off-by: Penny Zheng penny.zheng@arm.com

@Pennyzct
Copy link
Contributor Author

ptal😊. @bergwolf @jodh-intel

@katacontainersbot
Copy link
Contributor

PSS Measurement:
Qemu: 143726 KB
Proxy: 4607 KB
Shim: 8762 KB

Memory inside container:
Total Memory: 2045972 KB
Free Memory: 2007308 KB

@@ -455,3 +456,72 @@ func TestKvmIsUsable(t *testing.T) {
err = kvmIsUsable()
assert.Error(err)
}

func TestGetCPUDetails(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test function is identical for amd64 and ppc64le. So, I suggest you move this function to cli/kata-check_test.go and call it func genericTestGetCPUDetails(t *testing).

Then, you can update cli/kata-check_amd64_test.go and cli/kata-check_ppc64le_test.go to have just:

func TestGetCPUDetails(t *testing.T) {
    genericTestGetCPUDetails(t)
}

Copy link
Contributor Author

@Pennyzct Pennyzct Jun 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update. asap.😊

@jodh-intel
Copy link
Contributor

@nitkon - since this touches ppc64le code, please could you review/test the changes?

@bergwolf
Copy link
Member

CI failed with ERROR: Required license identifier ('SPDX-License-Identifier: Apache-2.0') missing from following files:. Please fix it by adding the identifier in all new files.

@Pennyzct
Copy link
Contributor Author

@bergwolf license identifier has already been updated.🙂

@katacontainersbot
Copy link
Contributor

PSS Measurement:
Qemu: 142305 KB
Proxy: 4709 KB
Shim: 8917 KB

Memory inside container:
Total Memory: 2045972 KB
Free Memory: 2007432 KB

@jodh-intel
Copy link
Contributor

jodh-intel commented Jun 20, 2018

lgtm.

CI is failing on linter errors - kata-containers/tests#439.

Approved with PullApprove

Copy link

@sboeuf sboeuf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for increasing the unit testing @Pennyzct !
This looks good to me and ready to be merged once you get the CI passing.

There were missing test cases in Arm64 for platform-dependent
kata-check and kata-env, leading to 'make test' failure under
kata-containers/runtime

Fixes: kata-containers#403

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
@katacontainersbot
Copy link
Contributor

PSS Measurement:
Qemu: 148674 KB
Proxy: 4506 KB
Shim: 8789 KB

Memory inside container:
Total Memory: 2045972 KB
Free Memory: 2007432 KB

@codecov
Copy link

codecov bot commented Jun 21, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@fca7eb8). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #414   +/-   ##
=========================================
  Coverage          ?   63.99%           
=========================================
  Files             ?       87           
  Lines             ?     8795           
  Branches          ?        0           
=========================================
  Hits              ?     5628           
  Misses            ?     2563           
  Partials          ?      604

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fca7eb8...f2096f1. Read the comment docs.

@Pennyzct
Copy link
Contributor Author

@sboeuf Hi~thanks for approving. I have already fixed linter warning😊 and passed CI.

@jodh-intel
Copy link
Contributor

Hi @nitkon - I haven't heard back so I assume you are ok with these changes. If not, please raise a follow-on PR.

lgtm

@jodh-intel jodh-intel merged commit 8e581f4 into kata-containers:master Jun 21, 2018
lifupan pushed a commit to lifupan/kata-runtime that referenced this pull request Aug 5, 2020
cgroup: fix the issue of crashed when meet unsupported cgroup
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants