Closed joshlf closed 10 months ago
@joshlf by running cargo +nightly test --features memoffset/unstable_offset_of
in the root dir all the tests pass.
Thanks! Does that have the effect of testing crates/virtio-queue
too?
@joshlf yes:
% cargo +nightly test --features memoffset/unstable_offset_of --all-features -p virtio-queue
warning: some crates are on edition 2021 which defaults to `resolver = "2"`, but virtual workspaces default to `resolver = "1"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest
Finished test [unoptimized + debuginfo] target(s) in 0.03s
Running unittests src/lib.rs (target/debug/deps/virtio_queue-8509e32f1dbdbfd7)
running 29 tests
test chain::tests::test_checked_new_descriptor_chain ... ok
test chain::tests::test_indirect_descriptor_address_noaligned ... ok
test chain::tests::test_ttl_wrap_around ... ok
test descriptor::tests::test_descriptor_copy ... ok
test descriptor::tests::test_descriptor_getter_setter ... ok
test chain::tests::test_indirect_descriptor_err ... ok
test chain::tests::test_new_from_indirect_descriptor ... ok
test descriptor::tests::test_descriptor_offset ... ok
test descriptor::tests::test_used_elem_copy ... ok
test descriptor::tests::test_used_elem_offset ... ok
test queue::tests::test_add_used ... ok
test queue::tests::test_descriptor_and_iterator ... ok
test queue::tests::test_consume_chains_with_notif ... ok
test queue::tests::test_invalid_avail_idx ... ok
test queue::tests::test_enable_disable_notification ... ok
test queue::tests::test_iterator ... ok
test queue::tests::test_iterator_and_avail_idx ... ok
test queue::tests::test_queue_is_valid ... ok
test queue::tests::test_regression_iterator_division ... ok
test queue::tests::test_reset_queue ... ok
test queue::tests::test_regression_timeout_after_reset ... ok
test queue::tests::test_setters_error_cases ... ok
test queue_sync::tests::test_enable_disable_notification ... ok
test state::tests::test_invalid_queue_state ... ok
test queue_sync::tests::test_queue_state_sync ... ok
test state::tests::test_empty_queue_state ... ok
test queue_sync::tests::test_state_sync_add_used ... ok
test queue_sync::tests::test_sync_state_reset_queue ... ok
test queue::tests::test_needs_notification ... ok
test result: ok. 29 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
Doc-tests virtio-queue
running 4 tests
test crates/virtio-queue/src/queue_sync.rs - queue_sync::QueueSync (line 19) ... ok
test crates/virtio-queue/src/queue.rs - queue::Queue (line 35) ... ok
test crates/virtio-queue/src/descriptor.rs - descriptor::Descriptor (line 23) ... ok
test crates/virtio-queue/src/queue.rs - queue::AvailIter (line 634) ... ok
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.20s
Great, thanks so much!
As part of https://github.com/rust-lang/rust/issues/111839, we're working to ensure that crates in the ecosystem such as yours work with the
offset_of!
macro before it's stabilized. I tried to run your tests locally, but ran into issues with my setup, and tried putting up a PR so that your CI tests would run, but it appears that your tests only run on stable, and the test I'm trying to run requires the nightly compiler.Would someone who already has a local setup configured be able to run the following command (or a variant of it as needed) and confirm that the tests pass?
See this comment for more details on what we're trying to test. Thanks!