Commit f32920f3 authored by Satoshi Niwa's avatar Satoshi Niwa Committed by Chromium LUCI CQ

arc_vm_client_adapter: Set ro.boot.vshd_service_override prop

Context : http://ag/c/device/google/bertha/+/13240391/3/init.bertha.rc#77

BUG=b:13240391
TEST=manually test android-sh

Change-Id: I99f367d95b24ed7c2c752ecb393ff619e5d1c87b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2597525Reviewed-by: default avatarRyo Hashimoto <hashimoto@chromium.org>
Reviewed-by: default avatarYusuke Sato <yusukes@chromium.org>
Commit-Queue: Satoshi Niwa <niwa@chromium.org>
Auto-Submit: Satoshi Niwa <niwa@chromium.org>
Cr-Commit-Position: refs/heads/master@{#839067}
parent a5e4417b
...@@ -229,6 +229,12 @@ std::vector<std::string> GenerateKernelCmdline( ...@@ -229,6 +229,12 @@ std::vector<std::string> GenerateKernelCmdline(
"androidboot.chromeos_channel=" + channel, "androidboot.chromeos_channel=" + channel,
"androidboot.boottime_offset=" + MonotonicTimestamp(), "androidboot.boottime_offset=" + MonotonicTimestamp(),
}; };
// We run vshd under a restricted domain on non-test images.
// (go/arcvm-android-sh-restricted)
if (channel == "testimage")
result.push_back("androidboot.vshd_service_override=vshd_for_test");
// Since we don't do mini VM yet, set not only |start_params| but also // Since we don't do mini VM yet, set not only |start_params| but also
// |upgrade_params| here for now. // |upgrade_params| here for now.
const std::vector<std::string> upgrade_props = const std::vector<std::string> upgrade_props =
......
...@@ -1286,6 +1286,45 @@ TEST_F(ArcVmClientAdapterTest, ChromeOsChannelUnknown) { ...@@ -1286,6 +1286,45 @@ TEST_F(ArcVmClientAdapterTest, ChromeOsChannelUnknown) {
"androidboot.chromeos_channel=unknown")); "androidboot.chromeos_channel=unknown"));
} }
TEST_F(ArcVmClientAdapterTest, VshdForTest) {
base::test::ScopedChromeOSVersionInfo info(
"CHROMEOS_RELEASE_TRACK=testimage-channel", base::Time::Now());
StartParams start_params(GetPopulatedStartParams());
SetValidUserInfo();
StartMiniArcWithParams(true, std::move(start_params));
UpgradeArc(true);
EXPECT_TRUE(
base::Contains(GetTestConciergeClient()->start_arc_vm_request().params(),
"androidboot.vshd_service_override=vshd_for_test"));
}
TEST_F(ArcVmClientAdapterTest, VshdForRelease) {
base::test::ScopedChromeOSVersionInfo info(
"CHROMEOS_RELEASE_TRACK=stable-channel", base::Time::Now());
StartParams start_params(GetPopulatedStartParams());
SetValidUserInfo();
StartMiniArcWithParams(true, std::move(start_params));
UpgradeArc(true);
EXPECT_FALSE(
base::Contains(GetTestConciergeClient()->start_arc_vm_request().params(),
"androidboot.vshd_service_override=vshd_for_test"));
}
TEST_F(ArcVmClientAdapterTest, VshdForUnknownChannel) {
base::test::ScopedChromeOSVersionInfo info("CHROMEOS_RELEASE_TRACK=unknown",
base::Time::Now());
StartParams start_params(GetPopulatedStartParams());
SetValidUserInfo();
StartMiniArcWithParams(true, std::move(start_params));
UpgradeArc(true);
EXPECT_FALSE(
base::Contains(GetTestConciergeClient()->start_arc_vm_request().params(),
"androidboot.vshd_service_override=vshd_for_test"));
}
// Tests that the binary translation type is set to None when no library is // Tests that the binary translation type is set to None when no library is
// enabled by USE flags. // enabled by USE flags.
TEST_F(ArcVmClientAdapterTest, BintaryTranslationTypeNone) { TEST_F(ArcVmClientAdapterTest, BintaryTranslationTypeNone) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment