Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit test fails #7671

Closed
andk opened this issue Apr 15, 2020 · 2 comments
Closed

Unit test fails #7671

andk opened this issue Apr 15, 2020 · 2 comments
Labels
co/kvm2-driver KVM2 driver related issues kind/documentation Categorizes issue or PR as related to documentation. needs-solution-message Issues where where offering a solution for an error would be helpful os/linux

Comments

@andk
Copy link

andk commented Apr 15, 2020

Steps to reproduce the issue:

  1. Run make
  2. Run make test
  3. No need to run minikube start

Full output of failed command:

% make test
MINIKUBE_LDFLAGS="-X k8s.io/minikube/pkg/version.version=v1.9.2 -X k8s.io/minikube/pkg/version.isoVersion=v1.9.0 -X k8s.io/minikube/pkg/version.isoPath=minikube/iso -X k8s.io/minikube/pkg/version.gitCommitID="1554d8e969608cb8995b57bef7805293451abcd0"" ./test.sh
= make lint =============================================================
golangci/golangci-lint info checking GitHub for tag 'v1.23.6'
golangci/golangci-lint info found version: 1.23.6 for v1.23.6/linux/amd64
golangci/golangci-lint info installed out/linters/golangci-lint
WARN [runner] Can't run linter goanalysis_metalinter: ST1003: failed prerequisites: config@k8s.io/minikube/cmd/drivers/kvm, isgenerated@k8s.io/minikube/cmd/drivers/kvm 
WARN [runner] Can't run linter unused: buildssa: analysis skipped: errors in package: [/home/sand/src/minikube/pkg/drivers/kvm/domain.go:28:10: could not import github.com/libvirt/libvirt-go (/home/sand/go/pkg/mod/github.com/libvirt/libvirt-go@v3.4.0+incompatible/callbacks.go:63:8: could not import C (cgo preprocessing failed)) -: could not load export data: no export data for "k8s.io/minikube/pkg/drivers/kvm"] 
ERRO Running error: buildssa: analysis skipped: errors in package: [/home/sand/src/minikube/pkg/drivers/kvm/domain.go:28:10: could not import github.com/libvirt/libvirt-go (/home/sand/go/pkg/mod/github.com/libvirt/libvirt-go@v3.4.0+incompatible/callbacks.go:63:8: could not import C (cgo preprocessing failed)) -: could not load export data: no export data for "k8s.io/minikube/pkg/drivers/kvm"] 
make[1]: *** [Makefile:383: lint-ci] Error 3
= go mod ================================================================
ok
= boilerplate ===========================================================
ok
= schema_check ==========================================================
ok
= go test ===============================================================
# pkg-config --cflags  -- libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt libvirt
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found
pkg-config: exit status 1
ERROR: logging before flag.Parse: I0415 03:34:48.902683  186245 translate.go:106] Setting Language to en-US ...
--- FAIL: TestDeleteAllProfiles (0.19s)
    delete_test.go:203: ListProfiles length = 9, expected 8
        valid: []
        invalid: [0xc0003a5260 0xc0003a5290 0xc0000fc8d0 0xc0000fc900 0xc0000fcab0 0xc0000fcb10 0xc0000fcb70 0xc0000fccc0 0xc0000fd290]
E0415 03:34:55.160124  186245 out.go:102] [unset errFile]: ! Not passing HTTP_PROXY=127.0.0.1:3128 to docker env.
E0415 03:34:56.198847  186245 out.go:102] [unset errFile]: ! Not passing HTTP_PROXY=localhost:3128 to docker env.
FAIL
coverage: 21.7% of statements
FAIL    k8s.io/minikube/cmd/minikube/cmd        9.221s
ok      k8s.io/minikube/cmd/minikube/cmd/config 0.117s  coverage: 20.3% of statements
ok      k8s.io/minikube/pkg/addons      0.030s  coverage: 58.3% of statements
ok      k8s.io/minikube/pkg/drivers     0.007s  coverage: 19.6% of statements
ok      k8s.io/minikube/pkg/drivers/hyperkit    0.017s  coverage: 77.3% of statements
FAIL    k8s.io/minikube/pkg/drivers/kvm [build failed]
ok      k8s.io/minikube/pkg/minikube/bootstrapper       1.424s  coverage: 72.9% of statements
ok      k8s.io/minikube/pkg/minikube/bootstrapper/bsutil        0.242s  coverage: 63.2% of statements
ok      k8s.io/minikube/pkg/minikube/bootstrapper/bsutil/ktmpl  0.011s  coverage: 100.0% of statements
ok      k8s.io/minikube/pkg/minikube/bootstrapper/images        0.003s  coverage: 98.1% of statements
ok      k8s.io/minikube/pkg/minikube/cluster    0.051s  coverage: 20.6% of statements
ok      k8s.io/minikube/pkg/minikube/command    0.021s  coverage: 3.9% of statements
ok      k8s.io/minikube/pkg/minikube/config     0.280s  coverage: 72.8% of statements
ok      k8s.io/minikube/pkg/minikube/cruntime   0.053s  coverage: 45.9% of statements
ok      k8s.io/minikube/pkg/minikube/docker     0.014s  coverage: 20.8% of statements
ok      k8s.io/minikube/pkg/minikube/download   14.443s coverage: 21.8% of statements
ok      k8s.io/minikube/pkg/minikube/driver     0.018s  coverage: 38.0% of statements
ok      k8s.io/minikube/pkg/minikube/extract    0.035s  coverage: 57.1% of statements
ok      k8s.io/minikube/pkg/minikube/kubeconfig 0.091s  coverage: 79.3% of statements
ok      k8s.io/minikube/pkg/minikube/localpath  0.005s  coverage: 51.9% of statements
ok      k8s.io/minikube/pkg/minikube/logs       0.019s  coverage: 1.3% of statements
ok      k8s.io/minikube/pkg/minikube/machine    37.968s coverage: 39.1% of statements
ok      k8s.io/minikube/pkg/minikube/notify     0.012s  coverage: 92.9% of statements
ok      k8s.io/minikube/pkg/minikube/out        0.008s  coverage: 67.4% of statements
ok      k8s.io/minikube/pkg/minikube/perf       0.002s  coverage: 54.5% of statements
ok      k8s.io/minikube/pkg/minikube/problem    0.008s  coverage: 91.7% of statements
ok      k8s.io/minikube/pkg/minikube/proxy      0.007s  coverage: 98.3% of statements
ok      k8s.io/minikube/pkg/minikube/registry   0.008s  coverage: 75.5% of statements
ok      k8s.io/minikube/pkg/minikube/service    0.032s  coverage: 84.9% of statements
ok      k8s.io/minikube/pkg/minikube/sshutil    2.692s  coverage: 100.0% of statements
ok      k8s.io/minikube/pkg/minikube/storageclass       0.013s  coverage: 97.2% of statements
ok      k8s.io/minikube/pkg/minikube/translate  0.004s  coverage: 10.9% of statements
ok      k8s.io/minikube/pkg/minikube/tunnel     2.242s  coverage: 64.2% of statements
ok      k8s.io/minikube/pkg/util        0.502s  coverage: 63.5% of statements
ok      k8s.io/minikube/pkg/util/lock   0.005s  coverage: 18.2% of statements
ok      k8s.io/minikube/pkg/util/retry  0.002s  coverage: 0.0% of statements
FAIL
make: *** [Makefile:271: test] Error 36

Full output of minikube start command used, if not already included:

n/a

Optional: Full output of minikube logs command:

n/a
@afbjorklund
Copy link
Collaborator

Due to the integrated kvm2 driver, you need to install libvirt-dev to build.

You might have seen it mentioned in the logs:

Package libvirt was not found in the pkg-config search path.
Perhaps you should add the directory containing `libvirt.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libvirt' found

It seems to be missing from the new documentation, as a requirement.

Was lost in 7559952

$ sudo apt install libvirt-dev

@afbjorklund afbjorklund added co/kvm2-driver KVM2 driver related issues kind/documentation Categorizes issue or PR as related to documentation. needs-solution-message Issues where where offering a solution for an error would be helpful os/linux labels Apr 15, 2020
@andk
Copy link
Author

andk commented Apr 15, 2020

Thanks a lot, I think I can close this issue.

Thank you!

@andk andk closed this as completed Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/kvm2-driver KVM2 driver related issues kind/documentation Categorizes issue or PR as related to documentation. needs-solution-message Issues where where offering a solution for an error would be helpful os/linux
Projects
None yet
Development

No branches or pull requests

2 participants