test baseservices/exceptions/unittests/EHPatternTests/EHPatternTests.sh failing on ubuntu
FAILED - baseservices/exceptions/unittests/EHPatternTests/EHPatternTests.sh
BEGIN EXECUTION
/mnt/j/workspace/dotnet_coreclr/x64_release_ubuntu_pri1_tst_prtest/bin/tests/Windows_NT.x64.Release/Tests/coreoverlay/corerun EHPatternTests.exe
-----------------------------
BaseClassTest
-----------------------------
System.IO.FileNotFoundException: 1
at BaseClassTest.f1()
System.IO.FileNotFoundException: 1
at BaseClassTest.f1()
at BaseClassTest.Run()
0121: PASS
-----------------------------
TryCatchInFinallyTest
-----------------------------
System.InvalidProgramException: Common Language Runtime detected an invalid program.
at TryCatchInFinallyTest.Run()
0123456: PASS
-----------------------------
RecurseTest
-----------------------------
System.Exception: 7
at RecurseTest.DoTest(Int32 level)
System.Exception: 5
at RecurseTest.DoTest(Int32 level)
System.Exception: 3
at RecurseTest.DoTest(Int32 level)
System.Exception: 1
at RecurseTest.DoTest(Int32 level)
876543210: PASS
-----------------------------
ThrowInFinallyNestedInTryTest
-----------------------------
System.ArgumentException: Value does not fall within the expected range.
at ThrowInFinallyNestedInTryTest.MiddleMethod()
at ThrowInFinallyNestedInTryTest.Run()
0123456789a: PASS
-----------------------------
GoryManagedPresentTest
-----------------------------
System.DivideByZeroException: Attempted to divide by zero.
at GoryManagedPresentTest.foo(Int32 dummy)
at GoryManagedPresentTest.Run()
0123456: PASS
-----------------------------
InnerFinallyAndCatchTest
-----------------------------
abcdefghijklm13: PASS
-----------------------------
InnerFinallyTest
-----------------------------
try 1
try 1.1
finally 1.1
try 1.1.1
Throwing an exception here!
finally 1.1.1
catch 1
finally 1
: FAIL: _actual=' try 1
try 1.1
finally 1.1
try 1.1.1
Throwing an exception here!
finally 1.1.1
catch 1
finally 1
'
_expected=' try 1
try 1.1
finally 1.1
try 1.1.1
Throwing an exception here!
finally 1.1.1
catch 1
finally 1
'
-----------------------------
ThrowInFinallyTest
-----------------------------
System.Exception: C
at ThrowInFinallyTest.Dumb()
at ThrowInFinallyTest.Run()
0123456789Ca: PASS
-----------------------------
RecursiveRethrow
-----------------------------
System.Exception: RecursionIsFun
at RecursiveRethrow.LoveToRecurse(Int32 i)
System.Exception: RecursionIsFun
at RecursiveRethrow.LoveToRecurse(Int32 i)
at RecursiveRethrow.LoveToRecurse(Int32 i)
System.Exception: RecursionIsFun
at RecursiveRethrow.LoveToRecurse(Int32 i)
at RecursiveRethrow.LoveToRecurse(Int32 i)
System.Exception: RecursionIsFun
at RecursiveRethrow.LoveToRecurse(Int32 i)
at RecursiveRethrow.Run()
210C0C1C2: PASS
-----------------------------
RecursiveThrowNew
-----------------------------
System.Exception: eX
at RecursiveThrowNew.LoveToRecurse(Int32 i)
System.Exception: e0
at RecursiveThrowNew.LoveToRecurse(Int32 i)
at RecursiveThrowNew.LoveToRecurse(Int32 i)
System.Exception: e1
at RecursiveThrowNew.LoveToRecurse(Int32 i)
at RecursiveThrowNew.LoveToRecurse(Int32 i)
System.Exception: e2
at RecursiveThrowNew.LoveToRecurse(Int32 i)
at RecursiveThrowNew.Run()
210C0(eX)C1(e0)C2(e1)CM(e2): PASS
-----------------------------
PendingTest
-----------------------------
System.Exception: Exception of type 'System.Exception' was thrown.
at PendingTest.f2()
System.Exception: Exception of type 'System.Exception' was thrown.
at PendingTest.f2()
at PendingTest.f1()
System.Exception: Exception of type 'System.Exception' was thrown.
at PendingTest.f1()
at PendingTest.Run()
System.Exception: Exception of type 'System.Exception' was thrown.
at PendingTest.f2()
System.Exception: Exception of type 'System.Exception' was thrown.
at PendingTest.f2()
at PendingTest.f1()
System.Exception: Exception of type 'System.Exception' was thrown.
at PendingTest.f1()
at PendingTest.Run()
0123401235: PASS
-----------------------------
CollidedUnwindTest
-----------------------------
CollidedUnwindTest+ExType2: Exception of type 'CollidedUnwindTest+ExType2' was thrown.
at CollidedUnwindTest.Bar()
at CollidedUnwindTest.FnBBB()
at CollidedUnwindTest.FnAAA()
at CollidedUnwindTest.Foo()
at CollidedUnwindTest.Run()
0123456789ABCDE: PASS
-----------------------------
BaadbaadTest
-----------------------------
System.Exception: Exception of type 'System.Exception' was thrown.
at BaadbaadTest.DoStuff()
System.Exception: Exception of type 'System.Exception' was thrown.
at BaadbaadTest.DoStuff()
System.Exception: Exception of type 'System.Exception' was thrown.
at BaadbaadTest.DoStuff()
System.Exception: Exception of type 'System.Exception' was thrown.
at BaadbaadTest.DoStuff()
at BaadbaadTest.Run()
1234: PASS
-----------------------------
GoryNativePastTest
-----------------------------
System.Exception: 6
at GoryNativePastTest.bar()
at GoryNativePastTest.foo()
at GoryNativePastTest.Run()
0123456: PASS
-----------------------------
ThrowInCatchTest
-----------------------------
System.Exception: .....
at ThrowInCatchTest.Run()
System.Exception: 5
at ThrowInCatchTest.Run()
0123456: PASS
-----------------------------
StrSwitchFinalTest
-----------------------------
s == one
In inner finally
In outer finally
s == two
After two
In inner finally
In outer finally
s == three
After three
Ok
After after three
In inner finally
Caught an exception
Ok
In outer finally
In four's finally
In inner finally
Caught an exception
Ok
In outer finally
s == five
Five's finally 0
Five's finally 1
Five's finally 2
In inner finally
In outer finally
Greater than five
in six's finally
In inner finally
In outer finally
: FAIL: _actual='s == one
In inner finally
In outer finally
s == two
After two
In inner finally
In outer finally
s == three
After three
Ok
After after three
In inner finally
Caught an exception
Ok
In outer finally
In four's finally
In inner finally
Caught an exception
Ok
In outer finally
s == five
Five's finally 0
Five's finally 1
Five's finally 2
In inner finally
In outer finally
Greater than five
in six's finally
In inner finally
In outer finally
'
_expected='s == one
In inner finally
In outer finally
s == two
After two
In inner finally
In outer finally
s == three
After three
Ok
After after three
In inner finally
Caught an exception
Ok
In outer finally
In four's finally
In inner finally
Caught an exception
Ok
In outer finally
s == five
Five's finally 0
Five's finally 1
Five's finally 2
In inner finally
In outer finally
Greater than five
in six's finally
In inner finally
In outer finally
'
-----------------------------
RethrowAndFinallysTest
-----------------------------
System.Exception: ex1
at RethrowAndFinallysTest.Run()
System.Exception: ex1
at RethrowAndFinallysTest.Run()
System.Exception: ex1
at RethrowAndFinallysTest.Run()
abcdefF3ED2CB1A[done]: PASS
OVERALL FAIL: 2 tests failed
Expected: 100
Actual: 231
END EXECUTION - FAILED
@rahku Both of the tests marked as failed in fact succeeded - comparing the traces manually shows they are equal, but the test considered them not to be equal. We already have had such problem before, with exactly the same test, but located in a different file - tests/src/baseservices/unittests/innerfinally.cs. It was fixed by @wtgodbe in dotnet/coreclr#1907, which fixed the problem in tests/src/baseservices/unittests/trace.cs. Is it possible that you have used an old trace.cs for the testing?
@rahku Can I close the issue?
I was still not able to resolve this. It does use a different tracer than in trace.cs . I looked at the code and made fixes as was made in trace.cs. But it still did not fix the issue for me. It will be helpful if you could look at it.
I've made the same change that was made in the trace.cs in the EHPatternTests.cs and the test started to pass ok on Ubuntu. I'll send a PR for it soon.
Fixed by dotnet/coreclr#3875