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

Run go test -v in virtcontainers directory get error  #1835

@flyflypeng

Description

@flyflypeng

Description of problem

kata-version: 1.7

Since I want to run all testcases in virtcontainers directory, so I execute the following the command:

# cd virtcontainers
# make
# make install //install some mock binary files
# go test -v
......
=== RUN   TestCalculateSandboxMem/3-mix-constraints
=== RUN   TestCalculateSandboxMem/3-constrained
--- PASS: TestCalculateSandboxMem (0.00s)
    --- PASS: TestCalculateSandboxMem/1-unconstrained (0.00s)
    --- PASS: TestCalculateSandboxMem/2-unconstrained (0.00s)
    --- PASS: TestCalculateSandboxMem/1-constrained (0.00s)
    --- PASS: TestCalculateSandboxMem/2-constrained (0.00s)
    --- PASS: TestCalculateSandboxMem/3-mix-constraints (0.00s)
    --- PASS: TestCalculateSandboxMem/3-constrained (0.00s)
=== RUN   TestCreateSandboxEmptyID
--- PASS: TestCreateSandboxEmptyID (0.00s)
=== RUN   TestSandboxStateReadyRunning
--- PASS: TestSandboxStateReadyRunning (0.00s)
=== RUN   TestSandboxStateRunningPaused
--- PASS: TestSandboxStateRunningPaused (0.00s)
=== RUN   TestSandboxStatePausedRunning
--- PASS: TestSandboxStatePausedRunning (0.00s)
=== RUN   TestSandboxStatePausedStopped
--- PASS: TestSandboxStatePausedStopped (0.00s)
=== RUN   TestSandboxStateRunningStopped
--- PASS: TestSandboxStateRunningStopped (0.00s)
=== RUN   TestSandboxStateReadyPaused
ERRO[0001] Unable to launch /tmp/vc-tmp-526112270/hypervisor: fork/exec /tmp/vc-tmp-526112270/hypervisor: permission denied  source=virtcontainers subsystem=qmp
ERRO[0001]                                               source=virtcontainers subsystem=qmp
ok  	github.com/kata-containers/runtime/virtcontainers	1.561s

And then I execute the TestSandboxStateReadyPaused testcase alone, however it passes:

go test -v -run TestSandboxStateReadyPaused
INFO: Creating virtcontainers test directory /tmp/vc-tmp-785259853
=== RUN   TestSandboxStateReadyPaused
--- PASS: TestSandboxStateReadyPaused (0.00s)
PASS
ok  	github.com/kata-containers/runtime/virtcontainers	0.042s

I want to know what's wrong with it?

Expected result

Run go test -v in virtcontainers dir will not get error info.

Actual result

Run go test -v in virtcontainers dir get the above error info.

Metadata

Metadata

Assignees

Labels

bugIncorrect behaviourneeds-reviewNeeds to be assessed by the team.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions