Extend <sys/sysinfo.h> tests slightly.
We know game developers (and the Games SDK) look at this stuff, so make
a bit more of an effort to ensure it's not completely broken.
Test: treehugger
Change-Id: I20b1c167faa1d9f4f39a94a723dabb848ce34269
diff --git a/tests/sys_sysinfo_test.cpp b/tests/sys_sysinfo_test.cpp
index ea35b4e..cca2f44 100644
--- a/tests/sys_sysinfo_test.cpp
+++ b/tests/sys_sysinfo_test.cpp
@@ -42,4 +42,10 @@
struct sysinfo si;
memset(&si, 0, sizeof(si));
ASSERT_EQ(0, sysinfo(&si));
+
+ ASSERT_GT(si.uptime, 10); // You're not running CTS within 10s of booting!
+ ASSERT_GT(uint64_t(si.totalram) * si.mem_unit, uint64_t(512 * 1024 * 1024));
+ ASSERT_GE(si.totalram, si.freeram);
+ ASSERT_GE(si.totalswap, si.freeswap);
+ ASSERT_GT(si.procs, 2); // There's at least this test and init running!
}