Fix the stackoverflow test output checks (#35914)
authorJan Vorlicek <janvorli@microsoft.com>
Thu, 7 May 2020 17:26:42 +0000 (19:26 +0200)
committerGitHub <noreply@github.com>
Thu, 7 May 2020 17:26:42 +0000 (19:26 +0200)
commit6985ce6107465dd9c46e96de87bc67c8a1c45a67
treeb4da085736e35aeca9a83058aadab824c639d822
parent5199a8c92315272fe87c7fce898bee583abe9af3
Fix the stackoverflow test output checks (#35914)

* Fix the stackoverflow test output checks

The System.Threading.ThreadHelper.ThreadStart can tail call the
System.Threading.ExecutionContext.RunInternal (and some other methods in
the runtime as well) and thus it would not be visible on the stack
trace. So the fix is to not to look at the System.Threading.ThreadHelper.ThreadStart
in the stack trace and use a method in the test itself instead. Since
the test is compiled with optimizations disabled, JIT should not do any
"interesting" things.

* Add NoInlining attribute and do a little unification
src/coreclr/tests/src/baseservices/exceptions/stackoverflow/stackoverflow.cs
src/coreclr/tests/src/baseservices/exceptions/stackoverflow/stackoverflowtester.cs