From: Joerg Vehlow <lkml@jv-coder.de>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] memcg/stat_test: Use more memory for tests
Date: Tue, 16 Feb 2021 13:38:41 +0100 [thread overview]
Message-ID: <20210216123841.3424969-1-lkml@jv-coder.de> (raw)
From: Joerg Vehlow <joerg.vehlow@aox-tech.de>
f0b9d187d increased the memory used by a lot of
memcg tests to 33*pagesize, because some counters in
memory.stat are only updated in batches of 32.
With kernel commit 766a4c19d this batching is also applied
to some more counters.
Use 33 * pagesize for all test now should make them pass
before and after this commit.
Fixes: #780
This should also fix part of #93 and #783
Signed-off-by: Joerg Vehlow <joerg.vehlow@aox-tech.de>
---
.../memcg/functional/memcg_stat_test.sh | 40 +++++++++----------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/testcases/kernel/controllers/memcg/functional/memcg_stat_test.sh b/testcases/kernel/controllers/memcg/functional/memcg_stat_test.sh
index 3a6239134..cc4550cb6 100755
--- a/testcases/kernel/controllers/memcg/functional/memcg_stat_test.sh
+++ b/testcases/kernel/controllers/memcg/functional/memcg_stat_test.sh
@@ -27,15 +27,15 @@ test2()
test3()
{
tst_res TINFO "Test unevictable with MAP_LOCKED"
- test_mem_stat "--mmap-lock1" $PAGESIZE $PAGESIZE \
- "unevictable" $PAGESIZE false
+ test_mem_stat "--mmap-lock1" $PAGESIZES $PAGESIZES \
+ "unevictable" $PAGESIZES false
}
test4()
{
tst_res TINFO "Test unevictable with mlock"
- test_mem_stat "--mmap-lock2" $PAGESIZE $PAGESIZE \
- "unevictable" $PAGESIZE false
+ test_mem_stat "--mmap-lock2" $PAGESIZES $PAGESIZES \
+ "unevictable" $PAGESIZES false
}
test5()
@@ -44,11 +44,11 @@ test5()
echo 1 > memory.use_hierarchy
mkdir subgroup
- echo $PAGESIZE > memory.limit_in_bytes
- echo $((PAGESIZE*2)) > subgroup/memory.limit_in_bytes
+ echo $PAGESIZES > memory.limit_in_bytes
+ echo $((PAGESIZES * 2)) > subgroup/memory.limit_in_bytes
cd subgroup
- check_mem_stat "hierarchical_memory_limit" $PAGESIZE
+ check_mem_stat "hierarchical_memory_limit" $PAGESIZES
cd ..
rmdir subgroup
@@ -62,11 +62,11 @@ test6()
echo 0 > memory.use_hierarchy
mkdir subgroup
- echo $PAGESIZE > memory.limit_in_bytes
- echo $((PAGESIZE * 2)) > subgroup/memory.limit_in_bytes
+ echo $PAGESIZES > memory.limit_in_bytes
+ echo $((PAGESIZES * 2)) > subgroup/memory.limit_in_bytes
cd subgroup
- check_mem_stat "hierarchical_memory_limit" $((PAGESIZE * 2))
+ check_mem_stat "hierarchical_memory_limit" $((PAGESIZES * 2))
cd ..
rmdir subgroup
@@ -80,13 +80,13 @@ test7()
ROD echo 1 \> memory.use_hierarchy
mkdir subgroup
- echo $PAGESIZE > memory.limit_in_bytes
- echo $PAGESIZE > memory.memsw.limit_in_bytes
- echo $((PAGESIZE*2)) > subgroup/memory.limit_in_bytes
- echo $((PAGESIZE*2)) > subgroup/memory.memsw.limit_in_bytes
+ echo $PAGESIZES > memory.limit_in_bytes
+ echo $PAGESIZES > memory.memsw.limit_in_bytes
+ echo $((PAGESIZES * 2)) > subgroup/memory.limit_in_bytes
+ echo $((PAGESIZES * 2)) > subgroup/memory.memsw.limit_in_bytes
cd subgroup
- check_mem_stat "hierarchical_memsw_limit" $PAGESIZE
+ check_mem_stat "hierarchical_memsw_limit" $PAGESIZES
cd ..
rmdir subgroup
@@ -101,13 +101,13 @@ test8()
ROD echo 0 \> memory.use_hierarchy
mkdir subgroup
- echo $PAGESIZE > memory.limit_in_bytes
- echo $PAGESIZE > memory.memsw.limit_in_bytes
- echo $((PAGESIZE*2)) > subgroup/memory.limit_in_bytes
- echo $((PAGESIZE*2)) > subgroup/memory.memsw.limit_in_bytes
+ echo $PAGESIZES > memory.limit_in_bytes
+ echo $PAGESIZES > memory.memsw.limit_in_bytes
+ echo $((PAGESIZES * 2)) > subgroup/memory.limit_in_bytes
+ echo $((PAGESIZES * 2)) > subgroup/memory.memsw.limit_in_bytes
cd subgroup
- check_mem_stat "hierarchical_memsw_limit" $((PAGESIZE*2))
+ check_mem_stat "hierarchical_memsw_limit" $((PAGESIZES * 2))
cd .
rmdir subgroup
--
2.25.1
next reply other threads:[~2021-02-16 12:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-16 12:38 Joerg Vehlow [this message]
2021-02-24 14:10 ` [LTP] [PATCH] memcg/stat_test: Use more memory for tests Joerg Vehlow
2021-02-26 16:29 ` Petr Vorel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210216123841.3424969-1-lkml@jv-coder.de \
--to=lkml@jv-coder.de \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox