Commit 81a33e8e authored by Sonny Rao's avatar Sonny Rao Committed by Commit Bot

Change meminfo test to expect sum of active and inactive to be non-zero

The test assumes both Active and Inactive file and Anon fields will
both be non-zero but this may not be the case.  We see this especially
when running kstaled on CrOS.

Bug: 1048073
Change-Id: I7532d92f4cd69718aab01d263992b20054a621e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2042544Reviewed-by: default avatarBrian Geffon <bgeffon@chromium.org>
Reviewed-by: default avatarkylechar <kylechar@chromium.org>
Auto-Submit: Sonny Rao <sonnyrao@chromium.org>
Commit-Queue: Sonny Rao <sonnyrao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#741158}
parent 05bdb317
......@@ -417,13 +417,7 @@ TEST_F(SystemMetricsTest, ParseZramStat) {
#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \
defined(OS_ANDROID)
// Failing on ChromeOS, crbug.com/1048073
#if defined(OS_CHROMEOS)
#define MAYBE_GetSystemMemoryInfo DISABLED_GetSystemMemoryInfo
#else
#define MAYBE_GetSystemMemoryInfo GetSystemMemoryInfo
#endif
TEST(SystemMetrics2Test, MAYBE_GetSystemMemoryInfo) {
TEST(SystemMetrics2Test, GetSystemMemoryInfo) {
SystemMemoryInfoKB info;
EXPECT_TRUE(GetSystemMemoryInfo(&info));
......@@ -437,10 +431,8 @@ TEST(SystemMetrics2Test, MAYBE_GetSystemMemoryInfo) {
#if defined(OS_LINUX) || defined(OS_ANDROID)
EXPECT_GT(info.buffers, 0);
EXPECT_GT(info.cached, 0);
EXPECT_GT(info.active_anon, 0);
EXPECT_GT(info.inactive_anon, 0);
EXPECT_GT(info.active_file, 0);
EXPECT_GT(info.inactive_file, 0);
EXPECT_GT(info.active_anon + info.inactive_anon, 0);
EXPECT_GT(info.active_file + info.inactive_file, 0);
#endif // defined(OS_LINUX) || defined(OS_ANDROID)
// All the values should be less than the total amount of memory.
......
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