Merge pi-qpr1-release PQ1A.181105.017.A1 to pi-platform-release

Change-Id: Ic3aabfb0964522bda9a4ba1c1b19fe2c84ac28e0
diff --git a/api/netd/AndroidTest.xml b/api/netd/AndroidTest.xml
index 4785f5f..d31bf6f 100644
--- a/api/netd/AndroidTest.xml
+++ b/api/netd/AndroidTest.xml
@@ -16,6 +16,7 @@
 <configuration description="Config for CTS-on-GSI CtsOnGsiKernelNetdTest.">
     <option name="test-suite-tag" value="cts" />
     <option name="config-descriptor:metadata" key="component" value="kernel" />
+    <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer" />
     <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
         <option name="abort-on-push-failure" value="false"/>
         <option name="push" value="DATA/nativetest/netd_integration_test/netd_integration_test->/data/nativetest/CtsOnGsiKernelNetdTest"/>
diff --git a/api/proc/AndroidTest.xml b/api/proc/AndroidTest.xml
index 0802dbe..7908102 100644
--- a/api/proc/AndroidTest.xml
+++ b/api/proc/AndroidTest.xml
@@ -25,5 +25,7 @@
     <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
         <option name="test-module-name" value="VtsKernelProcFileApi" />
         <option name="test-case-path" value="vts/testcases/kernel/api/proc/VtsKernelProcFileApiTest" />
+        <option name="test-timeout" value="10m" />
+        <option name="runtime-hint" value="3m"/>
     </test>
 </configuration>
diff --git a/api/proc/KernelProcFileTestBase.py b/api/proc/KernelProcFileTestBase.py
index cc909f2..5a3501b 100644
--- a/api/proc/KernelProcFileTestBase.py
+++ b/api/proc/KernelProcFileTestBase.py
@@ -94,6 +94,7 @@
     t_COLON = r':'
     t_EQUALS = r'='
     t_COMMA = r','
+    t_PERIOD = r'.'
     t_STRING = r'[a-zA-Z\(\)_0-9\-@]+'
 
     t_TAB = r'\t'
diff --git a/api/proc/ProcAsoundTests.py b/api/proc/ProcAsoundTests.py
index 67a00e1..8a2c883 100644
--- a/api/proc/ProcAsoundTests.py
+++ b/api/proc/ProcAsoundTests.py
@@ -27,9 +27,17 @@
     t_LBRACKET = literal_token(r'\[')
     t_RBRACKET = literal_token(r'\]')
 
+    t_NO = literal_token(r'no')
+    t_SOUNDCARDS = literal_token(r'soundcards')
+
     t_ignore = ' '
 
-    start = 'drivers'
+    start = 'soundcards'
+
+    def p_soundcards(self, p):
+        '''soundcards : DASH DASH DASH NO SOUNDCARDS DASH DASH DASH NEWLINE
+                      | drivers'''
+        p[0] = [p[4], p[5]] if len(p) == 10 else p[1]
 
     p_drivers = repeat_rule('driver')
 
@@ -38,9 +46,17 @@
         p[0] = [p[1], p[2], p[4], p[6], p[8]]
 
     def p_description(self, p):
-        '''description : description STRING
-                       | STRING'''
-        p[0] = [p[1]] if len(p) == 2 else p[1].append(p[2])
+        '''description : description word
+                       | word'''
+        p[0] = [p[1]] if len(p) == 2 else p[1] + [p[2]]
+
+    def p_word(self, p):
+        '''word : NUMBER
+                | STRING
+                | COMMA
+                | PERIOD
+                | HEX_LITERAL'''
+        p[0] = p[1]
 
     def p_id(self, p):
         'id : LBRACKET STRING RBRACKET'
diff --git a/api/proc/ProcModulesTest.py b/api/proc/ProcModulesTest.py
index 69149ae..f7dbf32 100644
--- a/api/proc/ProcModulesTest.py
+++ b/api/proc/ProcModulesTest.py
@@ -40,7 +40,7 @@
         # STATE is either Unloading, Loading, or Live
         # BASE_ADDRESS is a memory address
         # TAINT_FLAG is optional and if present, has characters between ( and )
-        test_re = re.compile(r"^\w+ \d+ (\d+|-) (((\w+,)+(\[permanent\],)?)|-) (Unloading|Loading|Live) 0x[0-9a-f]+( \(\w+\))?")
+        test_re = re.compile(r"^\w+ \d+ (\d+|-) (((\w+,)*(\[permanent\],)?)|-) (Unloading|Loading|Live) 0x[0-9a-f]+( \(\w+\))?")
         for line in contents.splitlines():
             if not re.match(test_re, line):
                 raise SyntaxError("Malformed entry in /proc/modules: %s" % line)
diff --git a/api/proc/ProcZoneInfoTest.py b/api/proc/ProcZoneInfoTest.py
index 4062f37..dda233d 100644
--- a/api/proc/ProcZoneInfoTest.py
+++ b/api/proc/ProcZoneInfoTest.py
@@ -36,7 +36,7 @@
 
     t_ignore = ' '
 
-    start = 'newnode'
+    start = 'nodes'
 
     p_nodes = repeat_rule('node')
     p_lines = repeat_rule('line')
@@ -44,22 +44,20 @@
     p_colonlines = repeat_rule('colonline')
     p_numcommas = repeat_rule('numcomma')
 
-    def p_newnode(self, p):
-        'newnode : nodes unpopulated'
-        p[0] = p[1:]
-
     def p_node(self, p):
-        '''node : heading pernode APAGES lines protection PAGESETS NEWLINE cpus colonlines
-                | heading pernode APAGES lines protection lines PAGESETS NEWLINE cpus colonlines'''
-        if len(p) == 11:
-            p[0] = [p[1], p[3], p[4] + p[6], p[8], p[9]]
-        else:
-            p[0] = [p[1], p[3], p[4], p[7], p[8]]
+        '''node : heading pernode APAGES lines protection populated'''
+        p[0] = [p[1], p[2], p[4], p[5], p[6]]
 
-    def p_unpopulated(self, p):
-        '''unpopulated : heading pernode APAGES lines protection
-                   | empty'''
-        p[0] = [] if len(p) == 2 else [p[1], p[3], p[4]]
+    def p_populated(self, p):
+        '''populated : PAGESETS NEWLINE cpus colonlines
+                | lines PAGESETS NEWLINE cpus colonlines
+                | empty'''
+        if len(p) == 2:
+            p[0] = []
+        elif len(p) == 6:
+            p[0] = [p[1], p[4], p[5]]
+        else:
+            p[0] = [p[3], p[4]]
 
     def p_pernode(self, p):
         '''pernode : PERNODE STATS NEWLINE lines
diff --git a/linux_kselftest/kselftest_config.py b/linux_kselftest/kselftest_config.py
index 029236c..ad7b5b0 100644
--- a/linux_kselftest/kselftest_config.py
+++ b/linux_kselftest/kselftest_config.py
@@ -57,7 +57,7 @@
     ("timers", "set-timer-lat", ["arm", "x86"], [32, 64]),
     ("timers", "threadtest", ["arm", "x86"], [32, 64]),
     ("timers", "valid-adjtimex", ["arm", "x86"], [64]),
-    ("vDSO", "kselftest_vdso_test", ["arm", "x86"], [32, 64]),
+    ("vDSO", "kselftest_vdso_test", ["arm", "x86"], [64]),
     ("x86", "single_step_syscall", ["x86"], [32, 64]),
     ("x86", "sysret_ss_attrs", ["x86"], [32]),
     ("x86", "syscall_nt", ["x86"], [32, 64]),
diff --git a/linux_kselftest/presubmit/AndroidTest.xml b/linux_kselftest/presubmit/AndroidTest.xml
index abcd177..184c48a 100644
--- a/linux_kselftest/presubmit/AndroidTest.xml
+++ b/linux_kselftest/presubmit/AndroidTest.xml
@@ -23,5 +23,7 @@
         <option name="test-module-name" value="VtsKernelLinuxKselftestPresubmit" />
         <option name="test-case-path" value="vts/testcases/kernel/linux_kselftest/LinuxKselftestTest" />
         <option name="test-config-path" value="vts/testcases/kernel/linux_kselftest/presubmit/LinuxKselftestTestPresubmit.runner_conf" />
+        <option name="test-timeout" value="3m" />
+        <option name="runtime-hint" value="1m"/>
     </test>
 </configuration>
diff --git a/linux_kselftest/stable/AndroidTest.xml b/linux_kselftest/stable/AndroidTest.xml
index e1dae06..e84d4de 100644
--- a/linux_kselftest/stable/AndroidTest.xml
+++ b/linux_kselftest/stable/AndroidTest.xml
@@ -23,6 +23,7 @@
         <option name="test-module-name" value="VtsKernelLinuxKselftest" />
         <option name="test-case-path" value="vts/testcases/kernel/linux_kselftest/LinuxKselftestTest" />
         <option name="test-config-path" value="vts/testcases/kernel/linux_kselftest/stable/LinuxKselftestTest.runner_conf" />
+        <option name="test-timeout" value="15m" />
         <option name="runtime-hint" value="8m"/>
     </test>
 </configuration>
diff --git a/linux_kselftest/staging/AndroidTest.xml b/linux_kselftest/staging/AndroidTest.xml
index a1c4f6d..98ac7a3 100644
--- a/linux_kselftest/staging/AndroidTest.xml
+++ b/linux_kselftest/staging/AndroidTest.xml
@@ -23,5 +23,7 @@
         <option name="test-module-name" value="VtsKernelLinuxKselftestStaging" />
         <option name="test-case-path" value="vts/testcases/kernel/linux_kselftest/LinuxKselftestTest" />
         <option name="test-config-path" value="vts/testcases/kernel/linux_kselftest/staging/LinuxKselftestTestStaging.runner_conf" />
+        <option name="test-timeout" value="3m" />
+        <option name="runtime-hint" value="1m"/>
     </test>
 </configuration>