diff options
author | Dongwoo Lee <dwoo08.lee@samsung.com> | 2020-07-29 16:53:10 +0900 |
---|---|---|
committer | Dongwoo Lee <dwoo08.lee@samsung.com> | 2020-08-05 19:52:37 +0900 |
commit | 10b83145c35a7209b2f3c761414a1be658444449 (patch) | |
tree | 05774fed1d99b0c53879f6e1666406643bd27dea /tests/lowmem-system-env.cpp | |
parent | b193516a6cd857aafa32e1697c30fdd9b6a2191a (diff) | |
download | resourced-sandbox/dwlee08/dev/zramswap.tar.gz resourced-sandbox/dwlee08/dev/zramswap.tar.bz2 resourced-sandbox/dwlee08/dev/zramswap.zip |
tests: Add 64bit API for lowmem-limit testsandbox/dwlee08/dev/zramswap
Since commit ce2ca6fb6301 ('memory: lowmem-limit: Fix to read precise
cgroup limit value'), lowmem-limit uses 64bit api. This also adds 64bit
API for test.
Change-Id: I4e80814f99792f137d2ae2468a57b881f405eac1
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
Diffstat (limited to 'tests/lowmem-system-env.cpp')
-rw-r--r-- | tests/lowmem-system-env.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/lowmem-system-env.cpp b/tests/lowmem-system-env.cpp index b2ed8411..f76ec4d7 100644 --- a/tests/lowmem-system-env.cpp +++ b/tests/lowmem-system-env.cpp @@ -77,6 +77,16 @@ int LowmemSystemEnv::cgroup_read_node_uint32(const char *cgroup_name, const char return RESOURCED_ERROR_NONE; } +int LowmemSystemEnv::cgroup_read_node_uint64(const char *cgroup_name, const char *file_name, uint64_t *value) +{ + std::cerr << " cgroup_name=" << cgroup_name << ", file_name=" << file_name << std::endl; + check_expected(cgroup_name); + check_expected(file_name); + *value = static_cast<uint64_t>(mock()); + std::cerr << " -> " << *value << std::endl; + return RESOURCED_ERROR_NONE; +} + void LowmemSystemEnv::g_source_destroy(GSource *source) { delete source; |