Make test more robust.
Otherwise we get:
+dalvikvm32 F 09-22 01:46:59 250213 250213 stack_inspect.cc:165] Check failed: Java_Main_isManaged(env, cls)
+Runtime aborting...
+Dumping all threads without appropriate locks held: thread list lock mutator lock
+All threads:
+DALVIK THREADS (7):
+"main" prio=5 tid=1 Runnable
+ | group="" sCount=0 dsCount=0 flags=0 obj=0x12c11c20 self=0xf77ae4a0
+ | sysTid=250213 nice=10 cgrp=default sched=0/0 handle=0xf7390700
+ | state=R schedstat=( 1265754491 3436423342 240 ) utm=24 stm=102 core=22 HZ=100
+ | stack=0xff589000-0xff58b000 stackSize=8MB
+ | held mutexes= "abort lock" "mutator lock"(shared held)
+ native: #00 pc 004db1dd /usr/local/google/buildbot/src/googleplex-android/master-art-host/out/host/linux-x86/lib/libartd.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, int, BacktraceMap*, char const*, art::ArtMethod*, void*)+189)
+ native: #01 pc 005c4bb7 /usr/local/google/buildbot/src/googleplex-android/master-art-host/out/host/linux-x86/lib/libartd.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool, BacktraceMap*, bool) const+359)
+ native: #02 pc 005e007f /usr/local/google/buildbot/src/googleplex-android/master-art-host/out/host/linux-x86/lib/libartd.so (art::DumpCheckpoint::Run(art::Thread*)+575)
+ native: #03 pc 005d75df /usr/local/google/buildbot/src/googleplex-android/master-art-host/out/host/linux-x86/lib/libartd.so (art::ThreadList::RunCheckpoint(art::Closure*, art::Closure*)+1071)
+ native: #04 pc 005d6ef6 /usr/local/google/buildbot/src/googleplex-android/master-art-host/out/host/linux-x86/lib/libartd.so (art::ThreadList::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool)+390)
+ native: #05 pc 005ac5c2 /usr/local/google/buildbot/src/googleplex-android/master-art-host/out/host/linux-x86/lib/libartd.so (art::AbortState::DumpAllThreads(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, art::Thread*) const+274)
+ native: #06 pc 005ac398 /usr/local/google/buildbot/src/googleplex-android/master-art-host/out/host/linux-x86/lib/libartd.so (art::AbortState::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char>>&) const+184)
+ native: #07 pc 0059b380 /usr/local/google/buildbot/src/googleplex-android/master-art-host/out/host/linux-x86/lib/libartd.so (art::Runtime::Abort(char const*)+112)
+ native: #08 pc 00158a0e /usr/local/google/buildbot/src/googleplex-android/master-art-host/out/host/linux-x86/lib/libartd.so (_ZNSt3__110__function6__funcIPFvPKcENS_9allocatorIS5_EES4_EclEOS3_+30)
+ native: #09 pc 000081c8 /usr/local/google/buildbot/src/googleplex-android/master-art-host/out/host/linux-x86/lib/libbase.so (android::base::LogMessage::~LogMessage()+936)
+ native: std::__1::function<void (char const*)>::operator()(char const*) const
+ native: external/libcxx/include/functional:1915
+ native: ~LogMessage
+ native: system/core/base/logging.cpp:433
+ native: #10 pc 00038320 /usr/local/google/buildbot/src/googleplex-android/master-art-host/out/host/linux-x86/nativetest/libarttestd.so (Java_Main_assertIsManaged+320)
+ native: #11 pc 000000aa /usr/local/google/buildbot/tmp/test-art-d5bij2eh/tmpgvin3l57/oat/x86/088-monitor-verification.odex (Java_Main_assertIsManaged__+138)
+ at Main.assertIsManaged(Native method)
+ at OK.runNoMonitors(unavailable:-1)
+ at OK.run(unavailable:-1)
+ at java.lang.reflect.Method.invoke(Native method)
+ at Main.runTest(Main.java:256)
+ at Main.runSmaliTests(Main.java:223)
+ at Main.main(Main.java:72)
Test: 088-monitor-verification
Change-Id: Iaa986f706bcd6ea42885cac6cb7b8dc087df0312
1 file changed