summaryrefslogtreecommitdiffstats
path: root/test/051-thread
Commit message (Collapse)AuthorAgeFilesLines
* Fix build.Narayan Kamath2014-11-071-2/+6
| | | | | | This is due to CFLAGS differences between branches. Change-Id: I170ac59401c10b394dd6b2c9eac167869d926fdc
* Fix thread priorities for unstarted threads.Narayan Kamath2014-11-073-0/+90
| | | | | | | | | | | | | | | | | | | | | | | Calls to Thread.setPriority for unstarted threads now behave similar to dalvik. Note that there's still some inconsistent behaviour carried over from dalvik. - high priority threads from bg_non_interactive processes are not always moved to the SP_FOREGROUND cgroup. - we do not attempt to adjust the cgroup of a native thread that's attaching. Note that on android, the system_server will change the cgroups for all running threads in a process when it moves into the foreground and background. It's by design that threads in a background process can request to be moved to the foreground by setting a higher priority. bug: 17893086 (cherry picked from commit 1bd326a5e2aaff06a5bcae9cb2c42a4e8de31401) Change-Id: Iad362f7c5c8697c349f2b6d7fcba69a4e141883e
* Fix issue with Thread.setName hanging after Thread.startBrian Carlstrom2014-08-282-0/+24
| | | | | | | | | | | | | When suspending a thread by peer the invariant that only attached threads are suspended must be maintained. Add a ThreadList::Contains check which requires making this method non-static. Add some extra thread logging. Bug: 17302037 (cherry picked from commit 37c16453a92bbf1a47f042000318a1b60381017d) Change-Id: I51832785d4b4b431e035318e75635f442e89a1fb
* Add regression test for Thread.interruptedBrian Carlstrom2014-02-102-49/+64
| | | | | Bug: 12929305 Change-Id: Ic896e164da0f67babdd423d5adb6e84aaa80cab2
* Fixes to make all run-tests except 051-thread work.jeffhao2012-11-261-0/+4
| | | | | | | | | | | | - Moved exception delivery into common method DeliverException - Renamed old DeliverException to QuickDeliverException since it is only used by quick - Fixed null checks for arrays returned by GetReference - Standardized ArrayStoreException error message - Added additional sleeps to ensure threads stay alive long enough in 051-thread, and that <clinit> is complete for 084-class-init Change-Id: I9ca306896a4bd10f453150fcf3965d9750fa0cbd
* Fix copyright headers.Elliott Hughes2012-01-301-1/+15
| | | | Change-Id: I5b7bc76a370238d810d78522bd5531600746700f
* Fix the thread test to not be racy.Elliott Hughes2011-10-062-522/+19
| | | | | | | | We shouldn't assume we know what order threads will be started in. Running a debug build, it sometimes takes > 1ms to start the next thread. Change-Id: Icb7792f83809ad414cfcdf0828cdc198698deaf1
* Fix the 051-thread test.Elliott Hughes2011-10-022-0/+3
| | | | | | | | | | | | This changes Thread::Create to clean up the requested stack size before passing it to pthread_attr_setstacksize. I modified the test to work around the inherent raciness in the test, which currently causes us trouble because with all the debug logging, the thread that initializes System.out takes longer than 1ms, so the first 40 or so threads all get woken in non-numeric order. Change-Id: I8047bf00330aaf4210dcb53a4437b1fe0562179e
* Adding old unit tests to test suite.jeffhao2011-09-293-0/+597
These tests are copied straight over. They'll still run, but they're using the old system. Change-Id: If494519e52ddf858a9febfc55bdae830468cb3c8