Skip to content

Commit

Permalink
tests: resolve: rework macros
Browse files Browse the repository at this point in the history
The resolve_tests! macro is pretty gnarly, but we can improve it a bit.
This will be needed for when we add partial resolution support.

We can also remove the resolve_tests boolean by opening /proc/self/sched
(which is a no-op writable procfs file) and thus doing the re-open tests
for procfs as well.

We also don't need the dedicated resolver::*::resolve() tests. The
Root::resolve tests are functionally identical, and doing both in the
same macro just makes the macro even uglier.

Signed-off-by: Aleksa Sarai <[email protected]>
  • Loading branch information
cyphar committed Aug 9, 2024
1 parent 1405db2 commit 0dc182e
Show file tree
Hide file tree
Showing 2 changed files with 311 additions and 408 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ clap = { version = "^4", features = ["cargo"] }
errno = "^0.3"
tempfile = "^3"
paste = "^1"
pretty_assertions = "^1"

[lints.rust]
# We have special handling for coverage runs (which set cfg(coverage)).
Expand Down
Loading

0 comments on commit 0dc182e

Please sign in to comment.