Hello Stratis developers!
I attempted to run the `make test-real` on a virtual machine of Fedora 26-1.5 Server. One of the tests failed, and I'm wondering if that is important enough to post as an issue.
To be more specific, when I try to run `real_test_empty_pool,` it fails at one of the `unwrap()`s:
make test-real sudo env "PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/jsalzberg/.cargo/bin:/home/jsalzberg/Programming/stratisd/target/debug:/home/jsalzberg/.local/bin:/home/jsalzberg/bin" RUSTFLAGS='-D warnings' RUST_BACKTRACE=1 cargo test -- --test real_test_empty_pool Compiling libstratis v0.1.1 (file:///home/jsalzberg/Programming/stratisd) Finished dev [unoptimized + debuginfo] target(s) in 4.55 secs Running target/debug/deps/libstratis-a40f09f70f597433
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 56 filtered out
Running target/debug/deps/stratisd-29c4deddc9023466
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
Running target/debug/deps/loopbacked_tests-3d242529a0f13830
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 17 filtered out
Running target/debug/deps/real_tests-aea58de6898d93b0
running 1 test test real_test_empty_pool ... FAILED
failures:
---- real_test_empty_pool stdout ---- thread 'real_test_empty_pool' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Os { code: 2, message: "No such file or directory" } }', src/libcore/result.rs:860:4 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. stack backtrace: 0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace 1: std::sys_common::backtrace::_print 2: std::panicking::default_hook::{{closure}} 3: std::panicking::default_hook 4: std::panicking::rust_panic_with_hook 5: std::panicking::begin_panic_new 6: std::panicking::begin_panic_fmt 7: rust_begin_unwind 8: core::panicking::panic_fmt 9: core::result::unwrap_failed at /builddir/build/BUILD/rustc-1.20.0-src/src/libcore/ macros.rs:41 10: <core::result::Result<T, E>>::unwrap at /builddir/build/BUILD/rustc-1.20.0-src/src/libcore/ result.rs:738 11: real_tests::test_with_spec at tests/real_tests.rs:116 12: real_tests::real_test_empty_pool at tests/real_tests.rs:196 13: <F as test::FnBox<T>>::call_box 14: __rust_maybe_catch_panic
failures: real_test_empty_pool
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 16 filtered out
PS: That test is written with a lot of `unwrap()`s, and it is hard to tell which of the `unwrap()`s causes the error. Should they all be changed to `expect("")`s?
Mea culpa, I forgot in that instance to add a block device to the list of okay to destroy. Here is the original error with the XFS block device (/dev/sda1) included in the list:
test real_test_linear_device ... FAILED
failures:
---- real_test_linear_device stdout ---- thread 'real_test_linear_device' panicked at 'called `Result::unwrap()` on an `Err` value: Io(Error { repr: Os { code: 16, message: "Device or resource busy" } })', src/libcore/result.rs:860:4 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. stack backtrace: 0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace 1: std::sys_common::backtrace::_print 2: std::panicking::default_hook::{{closure}} 3: std::panicking::default_hook 4: std::panicking::rust_panic_with_hook 5: std::panicking::begin_panic_new 6: std::panicking::begin_panic_fmt 7: rust_begin_unwind 8: core::panicking::panic_fmt 9: core::result::unwrap_failed at /builddir/build/BUILD/rustc-1.20.0-src/src/libcore/ macros.rs:41 10: <core::result::Result<T, E>>::unwrap at /builddir/build/BUILD/rustc-1.20.0-src/src/libcore/ result.rs:738 11: real_tests::util::dm_tests::test_linear_device at tests/util/dm_tests.rs:51 12: core::ops::function::Fn::call at /builddir/build/BUILD/rustc-1.20.0-src/src/libcore/ops/ function.rs:48 13: real_tests::test_with_spec at tests/real_tests.rs:142 14: real_tests::real_test_linear_device at tests/real_tests.rs:155 15: <F as test::FnBox<T>>::call_box 16: __rust_maybe_catch_panic
failures: real_test_linear_device
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 16 filtered out
error: test failed, to rerun pass '--test real_tests'
Thanks for your report!
As a matter of procedure, we would be happy for you to file a GitHub Issue for _any_ issue you run into.
This situation emphasizes how very important it is for us to incorporate the use of the error_chain crate, both into devicemapper and into stratisd. Once this is in place we would have much better information about that failure.
Regarding the specific error, the real tests get run as part of our CI, and this particular test isn't one of the ones that is usually problematic. My guess is that there is something hanging around from a previous test that you ran that is causing a problem, but it is hard to figure out from here what that could be.
- mulhern
----- Original Message -----
From: "Jacob Salzberg" jssalzbe@ncsu.edu To: stratis-devel@lists.fedorahosted.org Sent: Saturday, September 30, 2017 9:14:40 PM Subject: [stratis-devel] Re: `real_test_empty_pool` test fails
Mea culpa, I forgot in that instance to add a block device to the list of okay to destroy. Here is the original error with the XFS block device (/dev/sda1) included in the list:
test real_test_linear_device ... FAILED
failures:
---- real_test_linear_device stdout ---- thread 'real_test_linear_device' panicked at 'called `Result::unwrap()` on an `Err` value: Io(Error { repr: Os { code: 16, message: "Device or resource busy" } })', src/libcore/result.rs:860:4 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. stack backtrace: 0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace 1: std::sys_common::backtrace::_print 2: std::panicking::default_hook::{{closure}} 3: std::panicking::default_hook 4: std::panicking::rust_panic_with_hook 5: std::panicking::begin_panic_new 6: std::panicking::begin_panic_fmt 7: rust_begin_unwind 8: core::panicking::panic_fmt 9: core::result::unwrap_failed at /builddir/build/BUILD/rustc-1.20.0-src/src/libcore/ macros.rs:41 10: <core::result::Result<T, E>>::unwrap at /builddir/build/BUILD/rustc-1.20.0-src/src/libcore/ result.rs:738 11: real_tests::util::dm_tests::test_linear_device at tests/util/ dm_tests.rs:51 12: core::ops::function::Fn::call at /builddir/build/BUILD/rustc-1.20.0-src/src/libcore/ops/ function.rs:48 13: real_tests::test_with_spec at tests/ real_tests.rs:142 14: real_tests::real_test_linear_device at tests/ real_tests.rs:155 15: <F as test::FnBox<T>>::call_box 16: __rust_maybe_catch_panic
failures: real_test_linear_device
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 16 filtered out
error: test failed, to rerun pass '--test real_tests'
stratis-devel mailing list -- stratis-devel@lists.fedorahosted.org To unsubscribe send an email to stratis-devel-leave@lists.fedorahosted.org
stratis-devel@lists.stg.fedorahosted.org