Merge commit 'ea7d6e8e6568b777693c52183e9abf973786a6b5' into gingerbread-plus-aosp
* commit 'ea7d6e8e6568b777693c52183e9abf973786a6b5':
Add the new option for the device sleep time. This is only for the scripted monkey.
The monkey writes to System.out which is effectively a file and is
caught by StrictMode.
BUG=2947447
Change-Id: Iab38917f18baa319dad34d0c788bc9a10a041796
Merge commit '27d0ec1e87dcf41960f87f203c1822e88f99ea38' into gingerbread-plus-aosp
* commit '27d0ec1e87dcf41960f87f203c1822e88f99ea38':
Add the new option for the scripted monkey profile testing.
Merge commit '3307fdcce1f322ed72cc3d3a8d9da87aae856531' into gingerbread-plus-aosp
* commit '3307fdcce1f322ed72cc3d3a8d9da87aae856531':
Added the new keyword tap for the scripted monkey.
Merge commit 'b409cf9ca1251df1145139580f6809364fb3881f' into gingerbread-plus-aosp
* commit 'b409cf9ca1251df1145139580f6809364fb3881f':
Add the monkey event which allows the scripted monkey to execute the shell command.
Merge commit '4388d2c333c164ce67db6d4a59cded8dfea9fc9a' into gingerbread-plus-aosp
* commit '4388d2c333c164ce67db6d4a59cded8dfea9fc9a':
Monkey: Set the name of the process to distinguish from generic name (app_process)
Merge commit '688e62cd116d0bc17ad162915908764c67dd6045' into gingerbread-plus-aosp
* commit '688e62cd116d0bc17ad162915908764c67dd6045':
Monkey: Changes to release lock before reporting ANR and meminfo
Report ANR, dumpsys after releasing lock on Monkey.this.
This ensures the availability of the lock to Activity controller's
appNotResponding.
Reporting dumpsys while holding the lock on this causes a cyclic
deadlock, when twoANRs are reported (one after the other).
Monkey's ActivityController is registered to ActivityManagerService
for handling ANR.The first ANR caused by either service timeout or
broadcast timeout is reported byActivityManagerService to Monkey's
ActivityController via Binder. Meanwhile, the lock on
ActivityManagerService is held by serviceTimeout or broadcastTimeout.
appNotResponding corresponding to first ANR reports procrank and
acquires a lock onMonkey.this and sets few bool variables like
mRequestAnrTraces and mRequestDumpsysMemInfoand returns the control
to ActivityManagerService's service/broadcast timeout.
VM executing monkey process switches the control to main monkey
thread and it acquires thelock on Monkey.this and proceeds to report
ANR traces.
Meanwhile, a second ANR occurs and Activity Manager Service invokes
ActivityController's appNotResponding (via binder). appNotResponding
reports the procrank and waits to acquire the lock on Monkey.this
which is being held by Monkey's main thread(busy reporting first ANR).
This results in a blocking wait for ActivityManagerService's
appNotRespondingLocked() (corresponding to second ANR).
Meanwhile, the monkey's main thread (holding lock on Monkey.this)
tries to report the meminfo for first ANR, invokes
reportDumpsysMemInfo(), which in turn causes the android runtime to
launch dumpsys process. The dumpsys process queries service manager
to get a reference to meminfo service and invoke dump() on the same.
The meminfo service is created by ActivityManagerService's
setSystemProcess(). The dump() method tries to acquire a lock on
ActivityManagerService which is held by ActivityManagerService's
service/broadcasttimeout (awaiting the response from
ActivityController for the second ANR).
This cyclic deadlock continues for a minute after which WatchDog
thread of system_server kills system_server as it hasn't got the
response from ActivityManagerService's monitor(). The monitor()
of ActivityManagerService too tries to acquire lock on this and is
invoked once in every minute.
DEADLOCK:
--------
ActivityManager --> ActivityController --> Monkey Main --> MemInfo
--> ActivityManager
Change-Id: I7718eff332e5551b1950ab1c45395bf1ff4b1bda
Merge commit '34ca4b646b20cc209b06fec482e6c77dbc92d220' into gingerbread
* commit '34ca4b646b20cc209b06fec482e6c77dbc92d220':
Add the support for the alarmManager and force the device to wake up.
Merge commit '1a132581a5ce6188989d8522d227392c05cb42f6' into froyo-plus-aosp
* commit '1a132581a5ce6188989d8522d227392c05cb42f6':
Add the AUTOTEST_TEST_BEGIN_DELAY keyword to the scripted monkey which allow the power log to start 10 seconds after the event was send out.
Merge commit '1a132581a5ce6188989d8522d227392c05cb42f6' into gingerbread
* commit '1a132581a5ce6188989d8522d227392c05cb42f6':
Add the AUTOTEST_TEST_BEGIN_DELAY keyword to the scripted monkey which allow the power log to start 10 seconds after the event was send out.
Merge commit '39d7a7451b7e43dc1d71ac983821e76c88775a81' into froyo-plus-aosp
* commit '39d7a7451b7e43dc1d71ac983821e76c88775a81':
Added the instrumentation and power log monkey events fro the new power framework.
According to the developer guidelines
http://developer.android.com/guide/developing/tools/monkey.html
it should be possible to run monkey with option --pct-syskeys <percent>
to adjust percentage of "system" key events. (These are keys that are
generally reserved for use by the system, such as Home, Back,
Start Call, End Call, or Volume controls.) However, when trying
to run monkey with that option it fails with:
** Error: Unknown option: --pct-syskeys
The function processOptions in file Monkey.java was missing the
option --pct-syskeys.
Change-Id: I5d328fc93dfe67ed7a905735d6762c7f91c69838
http://b/viewIssue?id=2497953
before this CL, call to reportProcRank() in the controller waited for the
procrank process to finish, which potentially would block the activity
manager and cause deadlock between the activity manager and the window manager.
Change-Id: Ie5a6aae7c8dbe43ac725abdb04f2426f54dd6740
http://b/issue?id=2359586
with this CL, if --monitor-native-crashes is set and --ignore-native-crashes
is not set, monkey will exit when a native crash occurs.
Change-Id: I07ab17b5430ed090d8fb6286fdc793bac1b2caa9
By giving multiple -f arguments, the monkey will randomly choose between the
scripts. Also, add the --setup argument which will run a setup script before
starting to play the other scripts in random order.
Instead of the monkey counting up to the count times the number of events in the
script, the monkey will now only increment the count when the script reaches the
end of the file. This allows us to have multiple script files with differing
event counts in each.
Conflicts:
cmds/monkey/src/com/android/commands/monkey/Monkey.java
Fix javadoc comment in MonkeySourceRandom.java and combine raw events and user
events in MonkeySourceScript.java. Also, fix bug where too few arguments in
the script causes a RuntimeException.
now eliminated checkin database crash storage functionality).
Add a new test app to Dev Tools, "Bad Behavior", which has
buttons to crash and generate an ANR on command.
Update the Monkey to follow changed APIs.
With this CL, you can specify a package whitelist file or a package blacklist file,
but not both. You can not specify both individual packages via -p and blacklist file,
either. But you can specify both whitelist file and individual packages via -p and they
will be summed up.
By giving multiple -f arguments, the monkey will randomly choose between the
scripts. Also, add the --setup argument which will run a setup script before
starting to play the other scripts in random order.
Instead of the monkey counting up to the count times the number of events in the
script, the monkey will now only increment the count when the script reaches the
end of the file. This allows us to have multiple script files with differing
event counts in each.
Fix javadoc comment in MonkeySourceRandom.java and combine raw events and user
events in MonkeySourceScript.java. Also, fix bug where too few arguments in
the script causes a RuntimeException.