The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/go-lxc/pull/73

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===

From ebde4d3006ab0a9a4b719ad3efcde0f12c74b2f7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com>
Date: Sat, 26 Nov 2016 15:06:30 -0500
Subject: [PATCH 1/3] tests: Skip architecture test on !x86
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
---
 lxc_test.go | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/lxc_test.go b/lxc_test.go
index bb60a06..a155d6e 100644
--- a/lxc_test.go
+++ b/lxc_test.go
@@ -14,6 +14,7 @@ import (
        "strconv"
        "strings"
        "sync"
+       "syscall"
        "testing"
        "time"
 )
@@ -1104,6 +1105,23 @@ func TestCommandWithUIDGID(t *testing.T) {
 }
 
 func TestCommandWithArch(t *testing.T) {
+       uname := syscall.Utsname{}
+       if err := syscall.Uname(&uname); err != nil {
+               t.Errorf(err.Error())
+       }
+
+       arch := ""
+       for _, c := range uname.Machine {
+               if c == 0 {
+                       break
+               }
+               arch += string(byte(c))
+       }
+
+       if arch != "x86_64" && arch != "i686" {
+               t.Skip("skipping architecture test, not on x86")
+       }
+
        c, err := NewContainer(ContainerName)
        if err != nil {
                t.Errorf(err.Error())

From 2205ca977a780f6d0757989fd439235fcfb216f9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com>
Date: Sat, 26 Nov 2016 15:10:33 -0500
Subject: [PATCH 2/3] tests: Make skip messages consistent
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
---
 lxc_test.go | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lxc_test.go b/lxc_test.go
index a155d6e..800bf9b 100644
--- a/lxc_test.go
+++ b/lxc_test.go
@@ -1242,7 +1242,9 @@ func TestIPv4Addresses(t *testing.T) {
 }
 
 func TestIPv6Addresses(t *testing.T) {
-       t.Skip("skipping test")
+       if !unprivileged() {
+               t.Skip("skipping test in privileged mode.")
+       }
 
        c, err := NewContainer(ContainerName)
        if err != nil {

From 9c271de13d0a7118278fe4ae48ad69df10b107bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com>
Date: Sat, 26 Nov 2016 15:11:44 -0500
Subject: [PATCH 3/3] Run "go fmt"
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
---
 container.go | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/container.go b/container.go
index 6872ce4..ae09abc 100644
--- a/container.go
+++ b/container.go
@@ -1556,13 +1556,12 @@ func (c *Container) Migrate(cmd uint, opts 
MigrateOptions) error {
                return err
        }
 
-       if (cmd != MIGRATE_RESTORE) {
+       if cmd != MIGRATE_RESTORE {
                if err := c.makeSure(isRunning); err != nil {
                        return err
                }
        }
 
-
        cdirectory := C.CString(opts.Directory)
        defer C.free(unsafe.Pointer(cdirectory))
 
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to