-
Notifications
You must be signed in to change notification settings - Fork 34
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
Support time and random native calls in trace debugger #541
base: develop
Are you sure you want to change the base?
Conversation
5f3b23e
to
f9ed737
Compare
src/jvm/main/org/jetbrains/kotlinx/lincheck/strategy/managed/ManagedStrategy.kt
Show resolved
Hide resolved
src/jvm/main/org/jetbrains/kotlinx/lincheck/strategy/managed/ManagedStrategy.kt
Show resolved
Hide resolved
src/jvm/main/org/jetbrains/kotlinx/lincheck/strategy/managed/ManagedStrategy.kt
Outdated
Show resolved
Hide resolved
src/jvm/main/org/jetbrains/kotlinx/lincheck/strategy/managed/ManagedStrategy.kt
Outdated
Show resolved
Hide resolved
src/jvm/main/org/jetbrains/kotlinx/lincheck/strategy/managed/NativeCallsUtils.kt
Outdated
Show resolved
Hide resolved
src/jvm/test/org/jetbrains/kotlinx/lincheck_test/trace_debugger/RandomTests.kt
Show resolved
Hide resolved
...m/main/org/jetbrains/kotlinx/lincheck/transformation/transformers/DeterminismTransformers.kt
Outdated
Show resolved
Hide resolved
0386148
to
7438d15
Compare
src/jvm/main/org/jetbrains/kotlinx/lincheck/strategy/managed/ManagedStrategy.kt
Outdated
Show resolved
Hide resolved
src/jvm/main/org/jetbrains/kotlinx/lincheck/strategy/managed/ManagedStrategy.kt
Outdated
Show resolved
Hide resolved
src/jvm/main/org/jetbrains/kotlinx/lincheck/strategy/managed/MethodCallResultsTracker.kt
Outdated
Show resolved
Hide resolved
...vm/test/org/jetbrains/kotlinx/lincheck_test/representation/KotlinRandomRepresentationTest.kt
Show resolved
Hide resolved
src/jvm/test/org/jetbrains/kotlinx/lincheck_test/trace_debugger/RandomTests.kt
Outdated
Show resolved
Hide resolved
src/jvm/test/org/jetbrains/kotlinx/lincheck_test/trace_debugger/RandomTests.kt
Outdated
Show resolved
Hide resolved
src/jvm/test/org/jetbrains/kotlinx/lincheck_test/util/TestUtils.kt
Outdated
Show resolved
Hide resolved
src/jvm/test/org/jetbrains/kotlinx/lincheck_test/AbstractLincheckTest.kt
Show resolved
Hide resolved
…ts for deterministic randomness and fix found bugs
9076cbe
to
f442e36
Compare
…of the instrumentation side. Also, combine native calls handling with `beforeMethodCall`
f442e36
to
98421d4
Compare
405a114
to
f1c3a34
Compare
src/jvm/main/org/jetbrains/kotlinx/lincheck/strategy/managed/ManagedStrategy.kt
Outdated
Show resolved
Hide resolved
src/jvm/main/org/jetbrains/kotlinx/lincheck/strategy/managed/ManagedStrategy.kt
Outdated
Show resolved
Hide resolved
src/jvm/main/org/jetbrains/kotlinx/lincheck/strategy/managed/ManagedStrategy.kt
Outdated
Show resolved
Hide resolved
src/jvm/main/org/jetbrains/kotlinx/lincheck/strategy/managed/MethodCallResultsTracker.kt
Outdated
Show resolved
Hide resolved
src/jvm/main/org/jetbrains/kotlinx/lincheck/util/native_calls/DeterministicMethodDescriptor.kt
Outdated
Show resolved
Hide resolved
...main/org/jetbrains/kotlinx/lincheck/util/native_calls/DeterministicRandomMethodDescriptor.kt
Show resolved
Hide resolved
...main/org/jetbrains/kotlinx/lincheck/util/native_calls/DeterministicRandomMethodDescriptor.kt
Outdated
Show resolved
Hide resolved
...m/main/org/jetbrains/kotlinx/lincheck/util/native_calls/PureDeterministicMethodDescriptor.kt
Outdated
Show resolved
Hide resolved
|
||
internal fun getDeterministicMethodDescriptorOrNull(methodCallInfo: MethodCallInfo) = | ||
getDeterministicTimeMethodDescriptorOrNull(methodCallInfo) | ||
?: getDeterministicRandomMethodDescriptorOrNull(methodCallInfo) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use when
here. It would also make it easier to extend this method for other trackers in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when {
isTimeMehod(...) -> getDeterministicTimeMethodDescriptor(...)
isRandomMethod(...) -> getDeterministicRandomMethodDescriptor(...)
// we will add more cases here ...
else -> null
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want me to duplicate the checks inside the methods?
src/jvm/test-jdk11/org/jetbrains/kotlinx/lincheck_test/trace_debugger/SecureRandomTest.kt
Show resolved
Hide resolved
4c3be80
to
b5fc67e
Compare
b5fc67e
to
4a564d5
Compare
d1e0cf1
to
7855194
Compare
No description provided.