lxd.spec: %gotest github.com/lxc/lxd/lxc-to-lxd fails with "main_migrate_test.go:228: creating the container failed"
ganto opened this issue · 0 comments
ganto commented
Running the test suite for github.com/lxc/lxd/lxc-to-lxd
fails when trying to build the RPM via mock
:
+ go test -buildmode pie -compiler gc -ldflags ' -extldflags '\''-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '\''' github.com/lxc/lxd/lxc-to-lxd
2018/08/10 17:51:25 Running test #0: container migrated
Checking whether container has already been migrated
2018/08/10 17:51:25 Running test #1: container name missmatch (1)
Checking whether container has already been migrated
2018/08/10 17:51:25 Running test #2: container name missmatch (2)
Checking whether container has already been migrated
2018/08/10 17:51:25 Running test #3: incomplete AppArmor support (1)
Checking whether container has already been migrated
Validating whether incomplete AppArmor support is enabled
2018/08/10 17:51:25 Running test #4: incomplete AppArmor support (2)
Checking whether container has already been migrated
Validating whether incomplete AppArmor support is enabled
2018/08/10 17:51:25 Running test #5: missing minimal /dev filesystem
Checking whether container has already been migrated
Validating whether incomplete AppArmor support is enabled
Validating whether mounting a minimal /dev is enabled
2018/08/10 17:51:25 Running test #6: missing lxc.rootfs key
Checking whether container has already been migrated
Validating whether incomplete AppArmor support is enabled
Validating whether mounting a minimal /dev is enabled
Validating container rootfs
2018/08/10 17:51:25 Running test #7: invalid lxc.rootfs key
Checking whether container has already been migrated
Validating whether incomplete AppArmor support is enabled
Validating whether mounting a minimal /dev is enabled
Validating container rootfs
2018/08/10 17:51:25 Running test #8: non-existent rootfs path
Checking whether container has already been migrated
Validating whether incomplete AppArmor support is enabled
Validating whether mounting a minimal /dev is enabled
Validating container rootfs
2018/08/10 17:51:25 Running test #0: loopback only
--- FAIL: TestConvertNetworkConfig (0.00s)
require.go:794:
Error Trace: main_migrate_test.go:228
Error: Received unexpected error:
creating the container failed
Test: TestConvertNetworkConfig
2018/08/10 17:51:25 Running test #0: invalid path
Processing storage configuration
2018/08/10 17:51:25 Running test #1: invalid rootfs
Processing storage configuration
2018/08/10 17:51:25 Running test #2: ignored default mounts
Processing storage configuration
2018/08/10 17:51:25 Running test #3: ignored mounts
Processing storage configuration
2018/08/10 17:51:25 Running test #4: valid mount configuration
Processing storage configuration
--- FAIL: TestConvertStorageConfig (0.00s)
require.go:157:
Error Trace: main_migrate_test.go:355
Error: Not equal:
expected: types.Devices{"convert_mount1":map[string]string{"type":"disk", "readonly":"true", "source":"/usr/lib", "path":"/usr/lib
"}, "convert_mount2":map[string]string{"source":"/lib64", "path":"/lib64", "type":"disk", "readonly":"true"}, "convert_mount3":map[string]string{"source":"/sys/kernel/sec
urity", "path":"/sys/kernel/security", "type":"disk", "readonly":"true", "optional":"true"}, "convert_mount4":map[string]string{"readonly":"true", "source":"/mnt", "path"
:"/mnt", "type":"disk"}, "convert_mount0":map[string]string{"source":"/lib", "path":"/lib", "type":"disk", "readonly":"true"}}
actual : types.Devices{"mount4":map[string]string{"type":"disk", "readonly":"true", "source":"/mnt", "path":"/mnt"}, "mount0":map
[string]string{"type":"disk", "readonly":"true", "source":"/lib", "path":"/lib"}, "mount1":map[string]string{"readonly":"true", "source":"/usr/lib", "path":"/usr/lib", "t
ype":"disk"}, "mount2":map[string]string{"source":"/lib64", "path":"/lib64", "type":"disk", "readonly":"true"}, "mount3":map[string]string{"source":"/sys/kernel/security"
, "path":"/sys/kernel/security", "type":"disk", "readonly":"true", "optional":"true"}}
Diff:
--- Expected
+++ Actual
@@ -1,3 +1,3 @@
(types.Devices) (len=5) {
- (string) (len=14) "convert_mount0": (map[string]string) (len=4) {
+ (string) (len=6) "mount0": (map[string]string) (len=4) {
(string) (len=4) "path": (string) (len=4) "/lib",
@@ -7,3 +7,3 @@
},
- (string) (len=14) "convert_mount1": (map[string]string) (len=4) {
+ (string) (len=6) "mount1": (map[string]string) (len=4) {
(string) (len=4) "path": (string) (len=8) "/usr/lib",
@@ -13,3 +13,3 @@
},
- (string) (len=14) "convert_mount2": (map[string]string) (len=4) {
+ (string) (len=6) "mount2": (map[string]string) (len=4) {
(string) (len=4) "path": (string) (len=6) "/lib64",
@@ -19,3 +19,3 @@
},
- (string) (len=14) "convert_mount3": (map[string]string) (len=5) {
+ (string) (len=6) "mount3": (map[string]string) (len=5) {
(string) (len=8) "optional": (string) (len=4) "true",
@@ -26,3 +26,3 @@
},
- (string) (len=14) "convert_mount4": (map[string]string) (len=4) {
+ (string) (len=6) "mount4": (map[string]string) (len=4) {
(string) (len=4) "path": (string) (len=4) "/mnt",
Test: TestConvertStorageConfig
2018/08/10 17:51:25 Running test #0: missing lxc.rootfs key
2018/08/10 17:51:25 Running test #1: invalid lxc.rootfs key
2018/08/10 17:51:25 Running test #2: valid lxc.rootfs key
FAIL
FAIL github.com/lxc/lxd/lxc-to-lxd 0.012s