Skip to content

Commit

Permalink
Merge fix-up
Browse files Browse the repository at this point in the history
  • Loading branch information
DLochmelis33 committed Sep 4, 2024
1 parent 5695b4c commit 9ee0105
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class IntegrationTest {
var x = 0
}
}) {
// TODO: reset
thread {
x = 1
}
Expand All @@ -27,13 +26,18 @@ class IntegrationTest {
accept(1, 2)
accept(0, 1) // r1 = 0; x = 2; x = 1 (t1); r2 = 1
}
reset {
x = 0
}
}

@Test
fun testBasic() {
val runner = PthreadRunner()

@Suppress("UNCHECKED_CAST")
val result = runner.runTests(
tests = listOf(sampleLitmusTest),
tests = listOf(sampleLitmusTest) as List<LitmusTest<Any>>,
params = LitmusRunParams(
batchSize = 1_000_000,
syncPeriod = 10,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ object UnsafePublication {
interesting(0)
accept(-1)
}
reset {
arr = null
}
}

val PlainIntArray = litmusTest({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,8 @@ object UnsafePublicationJvm {
forbid(0)
accept(-1)
}
reset {
arr = null
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,8 @@ object UnsafePublicationNative {
interesting(0)
accept(-1)
}
reset {
arr = null
}
}
}

0 comments on commit 9ee0105

Please sign in to comment.