Skip to content

Request: Help test native offset_of! macro #269

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
joshlf opened this issue Oct 24, 2023 · 4 comments
Closed

Request: Help test native offset_of! macro #269

joshlf opened this issue Oct 24, 2023 · 4 comments

Comments

@joshlf
Copy link

joshlf commented Oct 24, 2023

As part of rust-lang/rust#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?

$ cd crates/virtio-queue
$ cargo +nightly test --features memoffset/unstable_offset_of

See this comment for more details on what we're trying to test. Thanks!

@epilys
Copy link
Member

epilys commented Oct 24, 2023

@joshlf by running cargo +nightly test --features memoffset/unstable_offset_of in the root dir all the tests pass.

@joshlf
Copy link
Author

joshlf commented Oct 24, 2023

Thanks! Does that have the effect of testing crates/virtio-queue too?

@epilys
Copy link
Member

epilys commented Oct 24, 2023

@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

@joshlf
Copy link
Author

joshlf commented Oct 24, 2023

Great, thanks so much!

@joshlf joshlf closed this as completed Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants