[libvirt] [PATCH Rust v2 1/6] ci workaround when running integration tests

Due to an issue fixed in libvirt master we should not consider running integration tests in parallel. https://www.redhat.com/archives/libvir-list/2019-July/msg00287.html Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com> --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c52f745..54f3c24 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,4 +41,7 @@ install: script: - cargo test --verbose - - cargo test --verbose -- --ignored + # Due to an issue fixed in master we should not consider running + # integration tests in parallel. + # see: https://www.redhat.com/archives/libvir-list/2019-July/msg00287.html + - cargo test --verbose -- --ignored --test-threads=1 -- 2.17.1

Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com> --- tests/domain.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/domain.rs b/tests/domain.rs index 5a64a75..dcf7dd9 100644 --- a/tests/domain.rs +++ b/tests/domain.rs @@ -91,14 +91,13 @@ fn test_get_vcpus_flags() { #[test] fn test_lookup_domain_by_id() { let c = common::conn(); - let v = c.list_domains().unwrap_or(vec![]); - assert!(0 < v.len(), "At least one domain should exist"); - for domid in v { - match Domain::lookup_by_id(&c, domid) { - Ok(mut dom) => dom.free().unwrap_or(()), - Err(e) => panic!("failed with code {}, message: {}", e.code, e.message), - } + let d = common::build_test_domain(&c, "by_id", true); + let id = d.get_id().unwrap_or(0); + match Domain::lookup_by_id(&c, id) { + Ok(mut r) => r.free().unwrap_or(()), + Err(e) => panic!("failed with code {}, message: {}", e.code, e.message), } + common::clean(d); common::close(c); } -- 2.17.1

On Tue, Jul 09, 2019 at 07:42:03AM +0000, Sahid Orentino Ferdjaoui wrote:
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com> --- tests/domain.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com> --- .travis.yml | 7 +++---- README.md | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 54f3c24..ebefca8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,11 +13,10 @@ matrix: - rust: nightly env: - - LIBVIRT=1.2.0 EXT=gz - - LIBVIRT=1.2.10 EXT=gz - - LIBVIRT=1.2.20 EXT=gz - LIBVIRT=2.5.0 EXT=xz - - LIBVIRT=3.3.0 EXT=xz + - LIBVIRT=3.10.0 EXT=xz + - LIBVIRT=4.10.0 EXT=xz + - LIBVIRT=5.5.0 EXT=xz install: - sudo apt-get -qqy build-dep libvirt diff --git a/README.md b/README.md index 5643f74..a359574 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ The bindings use standard errors handling from Rust. Each method ## Tests/Exercises -CI is executing tests automatically from libvirt 1.2.0 to 3.3.0. Using +CI is executing tests automatically from libvirt 2.5.0 to 5.5.0. Using Rust from stable, beta to nightly. * https://travis-ci.org/libvirt/libvirt-rust -- 2.17.1

On Tue, Jul 09, 2019 at 07:42:04AM +0000, Sahid Orentino Ferdjaoui wrote:
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com> --- .travis.yml | 7 +++---- README.md | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

Also configure default mech used by sasl to 'digest-md5' since 'scram-sha-1' requires an encryption layer. Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com> --- .travis.yml | 3 ++- tests/libvirtd.sasl | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 tests/libvirtd.sasl diff --git a/.travis.yml b/.travis.yml index ebefca8..fc2c8f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: rust os: linux -dist: trusty +dist: bionic sudo: require rust: @@ -33,6 +33,7 @@ install: - make - sudo make install - popd + - sudo cp tests/libvirtd.sasl /etc/sasl2/libvirt.conf - sudo libvirtd -d -l -f tests/libvirtd.conf - sudo virtlogd -d || true - sudo chmod a+rwx /var/run/libvirt/libvirt-sock* diff --git a/tests/libvirtd.sasl b/tests/libvirtd.sasl new file mode 100644 index 0000000..ab609e0 --- /dev/null +++ b/tests/libvirtd.sasl @@ -0,0 +1,2 @@ +mech_list: digest-md5 +sasldb_path: /etc/libvirt/passwd.db \ No newline at end of file -- 2.17.1

On Tue, Jul 09, 2019 at 07:42:05AM +0000, Sahid Orentino Ferdjaoui wrote:
Also configure default mech used by sasl to 'digest-md5' since 'scram-sha-1' requires an encryption layer.
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com> --- .travis.yml | 3 ++- tests/libvirtd.sasl | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 tests/libvirtd.sasl
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com> --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index a359574..6e1ad64 100644 --- a/README.md +++ b/README.md @@ -76,14 +76,18 @@ at any time. The preferred submission method is to use git send-email to submit patches to the libvir-list@redhat.com mailing list. eg. to send a single patch +``` git send-email --to libvir-list@redhat.com --subject-prefix "PATCH rust" \ --smtp-server=$HOSTNAME -1 +``` Or to send all patches on the current branch, against master +``` git send-email --to libvir-list@redhat.com --subject-prefix "PATCH rust" \ --smtp-server=$HOSTNAME --no-chain-reply-to --cover-letter --annotate \ master.. +``` Note the master GIT repository is at -- 2.17.1

On Tue, Jul 09, 2019 at 07:42:06AM +0000, Sahid Orentino Ferdjaoui wrote:
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com> --- README.md | 4 ++++ 1 file changed, 4 insertions(+)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

We passed the 0.2.9 since that one has been sent to crates.io but the code was never merged. To avoid that in future, new version will be sent to crates.io only when accepted by upstream. Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com> --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index d75693f..25538f0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "virt" -version = "0.2.8" +version = "0.2.10" authors = ["Sahid Orentino Ferdjaoui <sahid.ferdjaoui@redhat.com>",] license = "LGPL-2.1" readme = "README.md" -- 2.17.1

On Tue, Jul 09, 2019 at 07:42:07AM +0000, Sahid Orentino Ferdjaoui wrote:
We passed the 0.2.9 since that one has been sent to crates.io but the code was never merged. To avoid that in future, new version will be sent to crates.io only when accepted by upstream.
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com> --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Tue, Jul 09, 2019 at 07:42:02AM +0000, Sahid Orentino Ferdjaoui wrote:
Due to an issue fixed in libvirt master we should not consider running integration tests in parallel.
https://www.redhat.com/archives/libvir-list/2019-July/msg00287.html
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com> --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml index c52f745..54f3c24 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,4 +41,7 @@ install:
script: - cargo test --verbose - - cargo test --verbose -- --ignored + # Due to an issue fixed in master we should not consider running + # integration tests in parallel. + # see: https://www.redhat.com/archives/libvir-list/2019-July/msg00287.html + - cargo test --verbose -- --ignored --test-threads=1
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
participants (2)
-
Daniel P. Berrangé
-
Sahid Orentino Ferdjaoui