Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions tests/testsuite/cache_lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ fn multiple_shared() {
a_b_nested(CacheLockMode::Shared, CacheLockMode::Shared);
}

#[cfg_attr(
target_os = "aix",
ignore = "Test fails on AIX due to unsupported flock behaviour"
)]
#[cargo_test]
fn multiple_shared_separate() {
// Test that two independent shared locks are safe to acquire at the same time.
Expand Down Expand Up @@ -213,6 +217,10 @@ fn readonly() {
}
}

#[cfg_attr(
target_os = "aix",
ignore = "Test fails on AIX due to unsupported flock behaviour"
)]
#[cargo_test]
fn download_then_shared_separate() {
a_then_b_separate_not_blocked(
Expand All @@ -222,6 +230,10 @@ fn download_then_shared_separate() {
);
}

#[cfg_attr(
target_os = "aix",
ignore = "Test fails on AIX due to unsupported flock behaviour"
)]
#[cargo_test]
fn shared_then_download_separate() {
a_then_b_separate_not_blocked(
Expand All @@ -231,6 +243,10 @@ fn shared_then_download_separate() {
);
}

#[cfg_attr(
target_os = "aix",
ignore = "Test fails on AIX due to unsupported flock behaviour"
)]
#[cargo_test]
fn multiple_download_separate() {
// Test that with two independent download locks, the second blocks until
Expand All @@ -241,6 +257,10 @@ fn multiple_download_separate() {
);
}

#[cfg_attr(
target_os = "aix",
ignore = "Test fails on AIX due to unsupported flock behaviour"
)]
#[cargo_test]
fn multiple_mutate_separate() {
// Test that with two independent mutate locks, the second blocks until
Expand All @@ -251,11 +271,19 @@ fn multiple_mutate_separate() {
);
}

#[cfg_attr(
target_os = "aix",
ignore = "Test fails on AIX due to unsupported flock behaviour"
)]
#[cargo_test]
fn shared_then_mutate_separate() {
a_then_b_separate_blocked(CacheLockMode::Shared, CacheLockMode::MutateExclusive);
}

#[cfg_attr(
target_os = "aix",
ignore = "Test fails on AIX due to unsupported flock behaviour"
)]
#[cargo_test]
fn download_then_mutate_separate() {
a_then_b_separate_blocked(
Expand All @@ -264,6 +292,10 @@ fn download_then_mutate_separate() {
);
}

#[cfg_attr(
target_os = "aix",
ignore = "Test fails on AIX due to unsupported flock behaviour"
)]
#[cargo_test]
fn mutate_then_download_separate() {
a_then_b_separate_blocked(
Expand All @@ -272,6 +304,10 @@ fn mutate_then_download_separate() {
);
}

#[cfg_attr(
target_os = "aix",
ignore = "Test fails on AIX due to unsupported flock behaviour"
)]
#[cargo_test]
fn mutate_then_shared_separate() {
a_then_b_separate_blocked(CacheLockMode::MutateExclusive, CacheLockMode::Shared);
Expand Down