Skip to content

Commit c32f535

Browse files
authored
[runtime/iobuf/freelist] add loom model (#3692)
1 parent de6ecda commit c32f535

6 files changed

Lines changed: 1071 additions & 32 deletions

File tree

.github/workflows/loom.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Loom
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
merge_group:
8+
9+
permissions:
10+
contents: read
11+
12+
concurrency:
13+
group: tests-loom-${{ github.head_ref || github.ref_name || github.run_id }}
14+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
15+
16+
env:
17+
CARGO_TERM_COLOR: always
18+
19+
jobs:
20+
Tests:
21+
name: "Loom Tests"
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 60
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
27+
- name: Clear disk space
28+
uses: ./.github/actions/disk
29+
- name: Run setup
30+
uses: ./.github/actions/setup
31+
with:
32+
additional-cache-key: loom
33+
- name: Install just & nextest
34+
uses: taiki-e/install-action@0c5db7f7f897c03b771660e91d065338615679f4 # v2.60.0
35+
with:
36+
tool: just@1.43.0,cargo-nextest@0.9.129
37+
- name: Run loom tests
38+
run: just test-loom --verbose

Cargo.lock

Lines changed: 35 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ hashbrown = { version = "0.16.1", default-features = false, features = ["default
133133
io-uring = "0.7.4"
134134
libc = "0.2.172"
135135
libfuzzer-sys = "0.4.9"
136+
loom = "0.7.2"
136137
num-bigint = { version = "0.4.6", default-features = false }
137138
num-integer = "0.1.46"
138139
num-rational = { version = "0.4.2", features = ["num-bigint"] }

justfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ test-benches crate test_flags='' lint_flags='':
6060
test *args='':
6161
cargo nextest run $@
6262

63+
# Run loom tests
64+
test-loom *args='':
65+
cargo nextest run --release --features loom --lib {{ args }} ::loom_tests::
66+
6367
# Test the Rust documentation
6468
test-docs *args='--all':
6569
cargo test --doc --locked $@

runtime/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ futures.workspace = true
3030
governor.workspace = true
3131
io-uring = { workspace = true, optional = true }
3232
libc.workspace = true
33+
loom = { workspace = true, optional = true }
3334
opentelemetry.workspace = true
3435
pin-project = { workspace = true, optional = true }
3536
prometheus-client.workspace = true
@@ -73,6 +74,7 @@ arbitrary = [
7374
]
7475
bench = [ "dep:crossbeam-queue" ]
7576
external = [ "pin-project" ]
77+
loom = [ "dep:loom" ]
7678
test-utils = []
7779
iouring = [ "iouring-network", "iouring-storage" ]
7880
iouring-network = [ "io-uring" ]

0 commit comments

Comments
 (0)