Skip to content

Commit

Permalink
crostini: Default to bookworm for new installs
Browse files Browse the repository at this point in the history
Switch the default container from Debian bullseye to bookworm. Also
update the os-release info used in unit tests to bookworm.

Bug: b:303757224
Cq-Include-Trybots: luci.chrome.try:chromeos-eve-chrome
Test: Install Crostini
Change-Id: I30e8268b3b90d4af6db2852df40ac074949cc4f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4974943
Commit-Queue: James Ye <jamesye@google.com>
Reviewed-by: Fergus Dall <sidereal@google.com>
Cr-Commit-Position: refs/heads/main@{#1216534}
  • Loading branch information
gnustomp authored and Chromium LUCI CQ committed Oct 28, 2023
1 parent 11fe199 commit 45b4e08
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions chrome/browser/ash/crostini/crostini_manager_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ class CrostiniManagerTest : public testing::Test {

vm_tools::cicerone::OsRelease os_release;
base::HistogramTester histogram_tester{};
os_release.set_pretty_name("Debian GNU/Linux 10 (bullseye)");
os_release.set_version_id("11");
os_release.set_pretty_name("Debian GNU/Linux 12 (bookworm)");
os_release.set_version_id("12");
os_release.set_id("debian");
fake_cicerone_client_->set_lxd_container_os_release(os_release);
}
Expand Down Expand Up @@ -1492,8 +1492,8 @@ TEST_F(CrostiniManagerRestartTest, InstallHistogramEntries) {
TEST_F(CrostiniManagerRestartTest, OsReleaseSetCorrectly) {
vm_tools::cicerone::OsRelease os_release;
base::HistogramTester histogram_tester{};
os_release.set_pretty_name("Debian GNU/Linux 10 (buster)");
os_release.set_version_id("10");
os_release.set_pretty_name("Debian GNU/Linux 12 (bookworm)");
os_release.set_version_id("12");
os_release.set_id("debian");
fake_cicerone_client_->set_lxd_container_os_release(os_release);

Expand All @@ -1509,14 +1509,14 @@ TEST_F(CrostiniManagerRestartTest, OsReleaseSetCorrectly) {
EXPECT_EQ(os_release.SerializeAsString(),
stored_os_release->SerializeAsString());
histogram_tester.ExpectUniqueSample("Crostini.ContainerOsVersion",
ContainerOsVersion::kDebianBuster, 1);
ContainerOsVersion::kDebianBookworm, 1);

// The data for this container should also be stored in prefs.
const base::Value* os_release_pref_value = GetContainerPrefValue(
profile(), container_id(), guest_os::prefs::kContainerOsVersionKey);
EXPECT_NE(os_release_pref_value, nullptr);
EXPECT_EQ(os_release_pref_value->GetInt(),
static_cast<int>(ContainerOsVersion::kDebianBuster));
static_cast<int>(ContainerOsVersion::kDebianBookworm));
}

TEST_F(CrostiniManagerRestartTest, RestartThenUninstall) {
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ash/crostini/crostini_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Profile;
namespace crostini {

inline constexpr char kCrostiniImageAliasPattern[] = "debian/%s";
inline constexpr char kCrostiniContainerDefaultVersion[] = "bullseye";
inline constexpr char kCrostiniContainerDefaultVersion[] = "bookworm";
inline constexpr char kCrostiniContainerFlag[] =
"crostini-container-install-version";

Expand Down

0 comments on commit 45b4e08

Please sign in to comment.