Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(371)

Unified Diff: src/platform/update_engine/utils_unittest.cc

Issue 1694025: AU: Update Downloader to support our image formats. (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: fixes for review Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/platform/update_engine/utils.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/update_engine/utils_unittest.cc
diff --git a/src/platform/update_engine/utils_unittest.cc b/src/platform/update_engine/utils_unittest.cc
index 74f349db1ebe4cc4689b604ed4903b0c6afad17a..5ab78cd228ea5a64cc54bc2caba0a835ea5bcc3a 100644
--- a/src/platform/update_engine/utils_unittest.cc
+++ b/src/platform/update_engine/utils_unittest.cc
@@ -88,6 +88,20 @@ TEST(UtilsTest, BootDeviceTest) {
EXPECT_FALSE(utils::BootDevice().empty());
}
+TEST(UtilsTest, BootKernelDeviceTest) {
+ EXPECT_EQ("", utils::BootKernelDevice("foo"));
+ EXPECT_EQ("", utils::BootKernelDevice("/dev/sda0"));
+ EXPECT_EQ("", utils::BootKernelDevice("/dev/sda1"));
+ EXPECT_EQ("", utils::BootKernelDevice("/dev/sda2"));
+ EXPECT_EQ("/dev/sda2", utils::BootKernelDevice("/dev/sda3"));
+ EXPECT_EQ("", utils::BootKernelDevice("/dev/sda4"));
+ EXPECT_EQ("/dev/sda4", utils::BootKernelDevice("/dev/sda5"));
+ EXPECT_EQ("", utils::BootKernelDevice("/dev/sda6"));
+ EXPECT_EQ("/dev/sda6", utils::BootKernelDevice("/dev/sda7"));
+ EXPECT_EQ("", utils::BootKernelDevice("/dev/sda8"));
+ EXPECT_EQ("", utils::BootKernelDevice("/dev/sda9"));
+}
+
TEST(UtilsTest, RecursiveUnlinkDirTest) {
EXPECT_EQ(0, mkdir("RecursiveUnlinkDirTest-a", 0755));
EXPECT_EQ(0, mkdir("RecursiveUnlinkDirTest-b", 0755));
« no previous file with comments | « src/platform/update_engine/utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698