• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/core


Commit MetaInfo

修訂1e30c33a1a364d5064e3b916d34f0d480516d790 (tree)
時間2019-04-09 07:31:25
作者Hridya Valsaraju <hridya@goog...>
CommiterHridya Valsaraju

Log Message

Test is-logical command for vendor and boot partitions.

Vendor must be a logical partition and boot must not be a logical
partition.

Test: fuzzy_fastboot --gtest_filter=*Logical*
Bug: 117220134
Change-Id: Ifc6f2f715ca92cd1fe779e8fce2d6a10a1f140b9
Merged-In: Ifc6f2f715ca92cd1fe779e8fce2d6a10a1f140b9
(cherry picked from commit 61a5bc6cf4cf22186505d87db31a449ed960818e)

Change Summary

差異

--- a/fastboot/fuzzy_fastboot/main.cpp
+++ b/fastboot/fuzzy_fastboot/main.cpp
@@ -201,18 +201,28 @@ TEST_F(LogicalPartitionCompliance, GetVarIsLogical) {
201201 ASSERT_TRUE(UserSpaceFastboot());
202202 std::string has_slot;
203203 EXPECT_EQ(fb->GetVar("has-slot:system", &has_slot), SUCCESS) << "getvar has-slot:system failed";
204- std::string is_logical_cmd;
204+ std::string is_logical_cmd_system = "is-logical:system";
205+ std::string is_logical_cmd_vendor = "is-logical:vendor";
206+ std::string is_logical_cmd_boot = "is-logical:boot";
205207 if (has_slot == "yes") {
206208 std::string current_slot;
207- EXPECT_EQ(fb->GetVar("current-slot", &current_slot), SUCCESS)
209+ ASSERT_EQ(fb->GetVar("current-slot", &current_slot), SUCCESS)
208210 << "getvar current-slot failed";
209- is_logical_cmd = "is-logical:system_" + current_slot;
210- } else {
211- is_logical_cmd = "is-logical:system";
211+ std::string slot_suffix = "_" + current_slot;
212+ is_logical_cmd_system += slot_suffix;
213+ is_logical_cmd_vendor += slot_suffix;
214+ is_logical_cmd_boot += slot_suffix;
212215 }
213216 std::string is_logical;
214- EXPECT_EQ(fb->GetVar(is_logical_cmd, &is_logical), SUCCESS) << "getvar is-logical failed";
215- ASSERT_EQ(is_logical, "yes");
217+ EXPECT_EQ(fb->GetVar(is_logical_cmd_system, &is_logical), SUCCESS)
218+ << "system must be a logical partition";
219+ EXPECT_EQ(is_logical, "yes");
220+ EXPECT_EQ(fb->GetVar(is_logical_cmd_vendor, &is_logical), SUCCESS)
221+ << "vendor must be a logical partition";
222+ EXPECT_EQ(is_logical, "yes");
223+ EXPECT_EQ(fb->GetVar(is_logical_cmd_boot, &is_logical), SUCCESS)
224+ << "boot must not be logical partition";
225+ EXPECT_EQ(is_logical, "no");
216226 }
217227
218228 TEST_F(LogicalPartitionCompliance, FastbootRebootTest) {