VoldExploitTest: Don't timeout on slow netlink receivers

Impose a maximum timeout of approximately 10 seconds for
confirmNetlinkMsgReceived(). This timeout is needed to
deal with processes which may be slow to process incoming
netlink messages.

See http://code.google.com/p/android/issues/detail?id=25099
for details.

Change-Id: I8252436e4db570f169e04ee1b8c471a558639e98
diff --git a/tests/tests/security/src/android/security/cts/VoldExploitTest.java b/tests/tests/security/src/android/security/cts/VoldExploitTest.java
index 3957bbe..282ba68 100644
--- a/tests/tests/security/src/android/security/cts/VoldExploitTest.java
+++ b/tests/tests/security/src/android/security/cts/VoldExploitTest.java
@@ -255,12 +255,18 @@
 
     /**
      * Poll /proc/net/netlink until all the "Rmem" fields contain
-     * "0".  This indicates that there are no outstanding unreceived
-     * netlink messages.
+     * "0" or approximately 10 seconds have passed.
+     *
+     * This indicates that either the netlink message was received,
+     * or the process took too long to process the incoming netlink
+     * message.
+     *
+     * See http://code.google.com/p/android/issues/detail?id=25099
+     * for information on why the timeout is needed.
      */
     private static void confirmNetlinkMsgReceived() {
         try {
-            while(true) {
+            for (int ct = 0; ct < 200; ct++) {
                 boolean foundAllZeros = true;
                 for (List<String> i : parseNetlink()) {
                     // Column 5 is the "Rmem" field, which is the