Skip to content
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

test with coyote #2988

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

test with coyote #2988

wants to merge 3 commits into from

Conversation

bruno-garcia
Copy link
Member

@bruno-garcia bruno-garcia commented Dec 22, 2023

Resolves: #1006

https://microsoft.github.io/coyote/#get-started/using-coyote/

Second attempt to:

Output are a few files:
Sentry.Coyote.Tests_2.coverage.dgml Sentry.Coyote.Tests_2.trace.dgml Sentry.Coyote.Tests_2.uncontrolled.json Sentry.Coyote.Tests_2.trace Sentry.Coyote.Tests_2.txt

This is the txt:

[coyote::test] Runtime '8435ca89-4167-49eb-a249-802f57df9f05' started 'Sentry.Coyote.Tests.BackgroundWorkerTests.EnqueueFlushAndDisposeAsync' on thread '4' using the 'random' strategy.
[coyote::warning] Invoking 'System.Guid.NewGuid' introduces data non-determinism that is not intercepted and controlled during testing, so it can interfere with the ability to reproduce bug traces.
[coyote::warning] Invoking 'System.Threading.ManualResetEventSlim..ctor' is not intercepted and controlled during testing, so it can interfere with the ability to reproduce bug traces.
[coyote::warning] Invoking 'System.Threading.ManualResetEventSlim..ctor' is not intercepted and controlled during testing, so it can interfere with the ability to reproduce bug traces.
[coyote::warning] Invoking 'System.Threading.ManualResetEventSlim.Wait' is not intercepted and controlled during testing, so it can interfere with the ability to reproduce bug traces.
[coyote::error] Potential deadlock or hang detected. The periodic deadlock detection monitor was used, so Coyote cannot accurately determine if this is a deadlock, hang or false positive. If you believe that this is a false positive, you can try increase the deadlock detection timeout by setting '--deadlock-timeout N' or 'Configuration.WithDeadlockTimeout(N)'. Alternatively, you can disable reporting potential deadlocks or hangs as bugs by setting '--skip-potential-deadlocks' or 'Configuration.WithPotentialDeadlocksReportedAsBugs(false)'.
[coyote::test] Exploration finished in runtime '8435ca89-4167-49eb-a249-802f57df9f05' [found a bug using the 'random' strategy].
[coyote::report] Testing statistics:
[coyote::report] Found 1 bug.
[coyote::report] Found 3 uncontrolled invocations.
[coyote::report] Exploration statistics:
[coyote::report] Explored 1 execution path: 1 fair, 0 unfair, 1 unique.
[coyote::report] Found 100.00% buggy execution paths.
[coyote::report] Visited 1 unique state.
[coyote::report] Controlled 2 operations: 2 (min), 2 (avg), 2 (max).
[coyote::report] Degree of concurrency: 2 (min), 2 (avg), 2 (max).
[coyote::report] Degree of operation grouping: 2 (min), 2 (avg), 2 (max).
[coyote::report] Number of scheduling decisions in fair terminating execution paths: 4 (min), 4 (avg), 4 (max).

The warning on ManualResetEventSlim is odd since that's how we control the threads, how is it going to check for errors then?

Copy link
Member Author

@bruno-garcia bruno-garcia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forgot the comment

<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider concurrency testing with coyote
2 participants