am eae61cca: Merge "VoldExploitTest: verify PIDs exist when calling getPids()" into gingerbread
* commit 'eae61ccad3d68af259089ad8eaeffc5d70f50688':
VoldExploitTest: verify PIDs exist when calling getPids()
diff --git a/tests/tests/security/src/android/security/cts/VoldExploitTest.java b/tests/tests/security/src/android/security/cts/VoldExploitTest.java
index 12b4392..1f0929f 100644
--- a/tests/tests/security/src/android/security/cts/VoldExploitTest.java
+++ b/tests/tests/security/src/android/security/cts/VoldExploitTest.java
@@ -56,12 +56,6 @@
return;
}
- // Verify that all processes listening for netlink messages
- // currently exist.
- for (int i : pids) {
- assertTrue(new File("/proc/" + i + "/cmdline").exists());
- }
-
NetlinkSocket ns = NetlinkSocket.create();
for (int i : pids) {
for (String j : devices) {
@@ -175,7 +169,7 @@
for (List<String> i : netlink) {
// The PID is in column 3
int pid = Integer.decode(i.get(2));
- if (pid > 0) {
+ if (new File("/proc/" + pid + "/cmdline").exists()) {
retval.add(pid);
}
}