Snap for 6948038 from 98acb73ee6fc27428c65be3db02df9dcbc54269b to rvc-platform-release

Change-Id: I51ac626841b7ddde05570ff09692c20927173166
diff --git a/testcases/host/fastboot_test/src/com/android/tests/FastbootVerifyUserspaceTest.java b/testcases/host/fastboot_test/src/com/android/tests/FastbootVerifyUserspaceTest.java
index 74107bd..d21c315 100644
--- a/testcases/host/fastboot_test/src/com/android/tests/FastbootVerifyUserspaceTest.java
+++ b/testcases/host/fastboot_test/src/com/android/tests/FastbootVerifyUserspaceTest.java
@@ -92,7 +92,7 @@
     @Test
     public void testFastbootdSlotOperations() throws Exception {
         CommandResult result = mRunUtil.runTimedCmd(MAX_CMD_RUN_TIME, mFuzzyFastbootPath,
-                String.format("--serial=%s", mDevice.getSerialNumber()),
+                String.format("--serial=%s", mDevice.getFastbootSerialNumber()),
                 "--gtest_filter=Conformance.Slots:Conformance.SetActive");
         Assert.assertEquals(CommandStatus.SUCCESS, result.getStatus());
     }
@@ -101,7 +101,7 @@
     @Test
     public void testLogicalPartitionCommands() throws Exception {
         CommandResult result = mRunUtil.runTimedCmd(MAX_CMD_RUN_TIME, mFuzzyFastbootPath,
-                String.format("--serial=%s", mDevice.getSerialNumber()),
+                String.format("--serial=%s", mDevice.getFastbootSerialNumber()),
                 "--gtest_filter=LogicalPartitionCompliance.GetVarIsLogical:LogicalPartitionCompliance.SuperPartition");
         Assert.assertEquals(CommandStatus.SUCCESS, result.getStatus());
     }
@@ -117,7 +117,7 @@
     @Test
     public void testFastbootReboot() throws Exception {
         CommandResult result = mRunUtil.runTimedCmd(MAX_CMD_RUN_TIME, mFuzzyFastbootPath,
-                String.format("--serial=%s", mDevice.getSerialNumber()),
+                String.format("--serial=%s", mDevice.getFastbootSerialNumber()),
                 "--gtest_filter=LogicalPartitionCompliance.FastbootRebootTest");
         Assert.assertEquals(CommandStatus.SUCCESS, result.getStatus());
     }
@@ -126,7 +126,7 @@
     @Test
     public void testLogicalPartitionFlashing() throws Exception {
         CommandResult result = mRunUtil.runTimedCmd(MAX_CMD_RUN_TIME, mFuzzyFastbootPath,
-                String.format("--serial=%s", mDevice.getSerialNumber()),
+                String.format("--serial=%s", mDevice.getFastbootSerialNumber()),
                 "--gtest_filter=LogicalPartitionCompliance.CreateResizeDeleteLP");
         Assert.assertEquals(CommandStatus.SUCCESS, result.getStatus());
     }
diff --git a/testcases/host/firmware_dtbo_test/src/com/android/tests/firmwaredtbo/FirmwareDtboVerification.java b/testcases/host/firmware_dtbo_test/src/com/android/tests/firmwaredtbo/FirmwareDtboVerification.java
index 20729be..62a805e 100644
--- a/testcases/host/firmware_dtbo_test/src/com/android/tests/firmwaredtbo/FirmwareDtboVerification.java
+++ b/testcases/host/firmware_dtbo_test/src/com/android/tests/firmwaredtbo/FirmwareDtboVerification.java
@@ -214,16 +214,6 @@
         CLog.d("overlay_idx_string=%s", overlay_idx_string);
         Assert.assertNotEquals(
                 "Kernel command line missing androidboot.dtbo_idx", overlay_idx_string.length(), 0);
-        ArrayList<String> overlayArg = new ArrayList<>();
-        for (String overlay_idx : overlay_idx_string.split(",")) {
-            String overlayFileName = "dumped_dtbo." + overlay_idx.replaceAll("\\s+$", "");
-            File overlayFile = new File(mTemptFolder, overlayFileName);
-            File remoteOverLayFile = new File(mDeviceTestRoot, overlayFileName);
-            if (!mDevice.pushFile(overlayFile, remoteOverLayFile.getAbsolutePath())) {
-                Assert.fail("Push " + overlayFile + "fail!");
-            }
-            overlayArg.add(overlayFileName);
-        }
         String verificationTestPath = null;
         String ufdtVerifier = "ufdt_verify_overlay";
         ArrayList<String> matchedResults =
@@ -246,8 +236,20 @@
         cmdResult = mDevice.executeShellV2Command(String.format(copyCommand));
         Assert.assertEquals("Unable to copy to " + remoteFinalDTPath, cmdResult.getStatus(),
                 CommandStatus.SUCCESS);
+        ArrayList<String> overlayArg = new ArrayList<>();
+        for (String overlay_idx : overlay_idx_string.split(",")) {
+            String overlayFileName = "dumped_dtbo." + overlay_idx.replaceAll("\\s+$", "");
+            File overlayFile = new File(mTemptFolder, overlayFileName);
+            // Push the dumped overlay dtbo files to the same direcly of ufdt_verify_overlay
+            File remoteOverLayFile = new File(ufdtVerifierParent, overlayFileName);
+            CLog.d("Push remoteOverLayFile %s", remoteOverLayFile);
+            if (!mDevice.pushFile(overlayFile, remoteOverLayFile.getAbsolutePath())) {
+                Assert.fail("Push " + overlayFile + "fail!");
+            }
+            overlayArg.add(overlayFileName);
+        }
         String verifyCmd = String.format("cd %s && ./ufdt_verify_overlay final_dt %s",
-                ufdtVerifierParent, remoteFinalDTPath);
+                ufdtVerifierParent, String.join(" ", overlayArg));
         CLog.d(verifyCmd);
         cmdResult = mDevice.executeShellV2Command(verifyCmd);
         Assert.assertEquals("Incorrect Overlay Application:" + cmdResult.getStderr(),