[lxc-devel] [lxd/master] test

stgraber on Github lxc-bot at linuxcontainers.org
Wed Oct 10 00:54:50 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 301 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20181010/160a2e6d/attachment.bin>
-------------- next part --------------
From 9c912a17710b7b5b6812a4ac5ce56aadebf4d811 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Tue, 9 Oct 2018 20:39:04 -0400
Subject: [PATCH 1/2] lxc/import: Fix error handling
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 lxc/import.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxc/import.go b/lxc/import.go
index 4f86e854be..74d4bc0d19 100644
--- a/lxc/import.go
+++ b/lxc/import.go
@@ -55,7 +55,7 @@ func (c *cmdImport) Run(cmd *cobra.Command, args []string) error {
 
 	file, err := os.Open(shared.HostPath(args[len(args)-1]))
 	if err != nil {
-		return nil
+		return err
 	}
 	defer file.Close()
 

From cad7a42d7cd2e022c15b10f7779f0c209405dcce Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Tue, 9 Oct 2018 20:42:28 -0400
Subject: [PATCH 2/2] DEBUG
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 lxc/utils/progress.go |   1 +
 test/main.sh          | 122 +++++++++++++++++++++---------------------
 2 files changed, 62 insertions(+), 61 deletions(-)

diff --git a/lxc/utils/progress.go b/lxc/utils/progress.go
index 13f1eef689..2bee39c515 100644
--- a/lxc/utils/progress.go
+++ b/lxc/utils/progress.go
@@ -29,6 +29,7 @@ func (p *ProgressRenderer) truncate(msg string) string {
 	if err != nil {
 		return msg
 	}
+	fmt.Fprintf(os.Stderr, "%d=%d\n", width, len(msg))
 
 	newSize := len(msg)
 	if width < newSize {
diff --git a/test/main.sh b/test/main.sh
index 6259f1d6ef..00b4ae3f44 100755
--- a/test/main.sh
+++ b/test/main.sh
@@ -154,68 +154,68 @@ if [ "$#" -gt 0 ]; then
   exit
 fi
 
-run_test test_check_deps "checking dependencies"
-run_test test_static_analysis "static analysis"
-run_test test_database_update "database schema updates"
-run_test test_database_restore "database restore"
-run_test test_sql "lxd sql"
-run_test test_remote_url "remote url handling"
-run_test test_remote_admin "remote administration"
-run_test test_remote_usage "remote usage"
-run_test test_basic_usage "basic usage"
-run_test test_security "security features"
-run_test test_security_protection "container protection"
-run_test test_image_expiry "image expiry"
-run_test test_image_list_all_aliases "image list all aliases"
-run_test test_image_auto_update "image auto-update"
-run_test test_image_prefer_cached "image prefer cached"
-run_test test_image_import_dir "import image from directory"
-run_test test_concurrent_exec "concurrent exec"
-run_test test_concurrent "concurrent startup"
-run_test test_snapshots "container snapshots"
-run_test test_snap_restore "snapshot restores"
-run_test test_config_profiles "profiles and configuration"
-run_test test_config_edit "container configuration edit"
-run_test test_config_edit_container_snapshot_pool_config "container and snapshot volume configuration edit"
-run_test test_container_metadata "manage container metadata and templates"
-run_test test_server_config "server configuration"
-run_test test_filemanip "file manipulations"
-run_test test_network "network management"
-run_test test_idmap "id mapping"
-run_test test_template "file templating"
-run_test test_pki "PKI mode"
-run_test test_devlxd "/dev/lxd"
-run_test test_fuidshift "fuidshift"
-run_test test_migration "migration"
-run_test test_fdleak "fd leak"
-run_test test_storage "storage"
-run_test test_storage_volume_snapshots "storage volume snapshots"
-run_test test_init_auto "lxd init auto"
-run_test test_init_interactive "lxd init interactive"
-run_test test_init_preseed "lxd init preseed"
-run_test test_storage_profiles "storage profiles"
-run_test test_container_import "container import"
-run_test test_storage_volume_attach "attaching storage volumes"
-run_test test_storage_driver_ceph "ceph storage driver"
-run_test test_resources "resources"
-run_test test_kernel_limits "kernel limits"
-run_test test_macaroon_auth "macaroon authentication"
-run_test test_console "console"
-run_test test_query "query"
-run_test test_proxy_device "proxy device"
-run_test test_storage_local_volume_handling "storage local volume handling"
+###run_test test_check_deps "checking dependencies"
+###run_test test_static_analysis "static analysis"
+###run_test test_database_update "database schema updates"
+###run_test test_database_restore "database restore"
+###run_test test_sql "lxd sql"
+###run_test test_remote_url "remote url handling"
+###run_test test_remote_admin "remote administration"
+###run_test test_remote_usage "remote usage"
+###run_test test_basic_usage "basic usage"
+###run_test test_security "security features"
+###run_test test_security_protection "container protection"
+###run_test test_image_expiry "image expiry"
+###run_test test_image_list_all_aliases "image list all aliases"
+###run_test test_image_auto_update "image auto-update"
+###run_test test_image_prefer_cached "image prefer cached"
+###run_test test_image_import_dir "import image from directory"
+###run_test test_concurrent_exec "concurrent exec"
+###run_test test_concurrent "concurrent startup"
+###run_test test_snapshots "container snapshots"
+###run_test test_snap_restore "snapshot restores"
+###run_test test_config_profiles "profiles and configuration"
+###run_test test_config_edit "container configuration edit"
+###run_test test_config_edit_container_snapshot_pool_config "container and snapshot volume configuration edit"
+###run_test test_container_metadata "manage container metadata and templates"
+###run_test test_server_config "server configuration"
+###run_test test_filemanip "file manipulations"
+###run_test test_network "network management"
+###run_test test_idmap "id mapping"
+###run_test test_template "file templating"
+###run_test test_pki "PKI mode"
+###run_test test_devlxd "/dev/lxd"
+###run_test test_fuidshift "fuidshift"
+###run_test test_migration "migration"
+###run_test test_fdleak "fd leak"
+###run_test test_storage "storage"
+###run_test test_storage_volume_snapshots "storage volume snapshots"
+###run_test test_init_auto "lxd init auto"
+###run_test test_init_interactive "lxd init interactive"
+###run_test test_init_preseed "lxd init preseed"
+###run_test test_storage_profiles "storage profiles"
+###run_test test_container_import "container import"
+###run_test test_storage_volume_attach "attaching storage volumes"
+###run_test test_storage_driver_ceph "ceph storage driver"
+###run_test test_resources "resources"
+###run_test test_kernel_limits "kernel limits"
+###run_test test_macaroon_auth "macaroon authentication"
+###run_test test_console "console"
+###run_test test_query "query"
+###run_test test_proxy_device "proxy device"
+###run_test test_storage_local_volume_handling "storage local volume handling"
 run_test test_backup_import "backup import"
-run_test test_backup_export "backup export"
-run_test test_container_local_cross_pool_handling "container local cross pool handling"
-run_test test_clustering_enable "clustering enable"
-run_test test_clustering_membership "clustering membership"
-run_test test_clustering_containers "clustering containers"
-run_test test_clustering_storage "clustering storage"
-run_test test_clustering_network "clustering network"
-run_test test_clustering_publish "clustering publish"
-run_test test_clustering_profiles "clustering profiles"
-run_test test_clustering_join_api "clustering join api"
-run_test test_clustering_shutdown_nodes "clustering shutdown"
+###run_test test_backup_export "backup export"
+###run_test test_container_local_cross_pool_handling "container local cross pool handling"
+###run_test test_clustering_enable "clustering enable"
+###run_test test_clustering_membership "clustering membership"
+###run_test test_clustering_containers "clustering containers"
+###run_test test_clustering_storage "clustering storage"
+###run_test test_clustering_network "clustering network"
+###run_test test_clustering_publish "clustering publish"
+###run_test test_clustering_profiles "clustering profiles"
+###run_test test_clustering_join_api "clustering join api"
+###run_test test_clustering_shutdown_nodes "clustering shutdown"
 #run_test test_clustering_upgrade "clustering upgrade"
 
 # shellcheck disable=SC2034


More information about the lxc-devel mailing list