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

lxd-3.8-0.1 test fails with: parse_test.go:25 "Expected value not to be nil." #13

Open
ganto opened this issue Dec 27, 2018 · 0 comments

Comments

@ganto
Copy link
Owner

ganto commented Dec 27, 2018

When building lxd.spec with release 3.6 or later, the go test of github.com/lxc/lxd/shared/generate/db aborts with:

+ go test -buildmode pie -compiler gc -v -tags libsqlite3 -ldflags ' -extldflags '\''-Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '\''' github.com/lxc/lxd/shared/generate/db
=== RUN   TestPackages
--- FAIL: TestPackages (0.00s)
        parse_test.go:25: 
                        Error Trace:    parse_test.go:25
                        Error:          Expected value not to be nil.
                        Test:           TestPackages
=== RUN   TestParse
--- PASS: TestParse (0.00s)
FAIL
FAIL    github.com/lxc/lxd/shared/generate/db   0.008s

Error happens on Fedora 28 (golang-1.10.5-1.fc28.x86_64) and CentOS 7 (golang-1.11.2-3.el7.x86_64). Issue originally mentioned in #11 (comment)

When running the test against the release tarball with manually compiled bundled libraries, the error cannot be reproduced:

[vagrant@localhost ~]$ export GOPATH=/home/vagrant/lxd-3.8/dist
[vagrant@localhost ~]$ export CGO_CFLAGS="-I/home/vagrant/lxd-3.8/dist/sqlite/ -I/home/vagrant/lxd-3.8/dist/dqlite/include/"
[vagrant@localhost ~]$ export CGO_LDFLAGS="-L/home/vagrant/lxd-3.8/dist/sqlite/.libs/ -L/home/vagrant/lxd-3.8/dist/dqlite/.libs/"
[vagrant@localhost ~]$ export LD_LIBRARY_PATH="/home/vagrant/lxd-3.8/dist/sqlite/.libs/:/home/vagrant/lxd-3.8/dist/dqlite/.libs/"
[vagrant@localhost ~]$ go test -v github.com/lxc/lxd/shared/generate/db
=== RUN   TestPackages
--- PASS: TestPackages (0.04s)
=== RUN   TestParse
--- PASS: TestParse (0.00s)
PASS
ok      github.com/lxc/lxd/shared/generate/db   0.060s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant