Patch StackWalker tests to pass on Android
Many tests are modified because
1. Android desugars lambda
2. libcore has different internal hidden implementation
for java reflection API.
3. CtsLibcoreOjTestCases uses TestNG to invoke the tests,
but the upstream environment starts a java process to
call the main functions. Thus, the caller and stacks
are different.
TODOs:
1. Two tests are diabled and need further triages
because they need to match the exact stacks
and package names:
a. DumpStackTest
b. VerifyStackTrace
2. Add more tests for StackFrame.getByteCodeIndex()
The upstream uses .class files, and we should add tests
for dex codes on Android.
3. Add more tests for StackWalker.Option.SHOW_REFLECT_FRAMES.
Bug: 191862780
Test: atest CtsLibcoreOjTestCases:test.java.lang
Change-Id: I077f5317b6bc5b062799a040a114eb41875ea3b5
18 files changed