All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] memcg/stat_test: Use more memory for tests
@ 2021-02-16 12:38 Joerg Vehlow
  2021-02-24 14:10 ` Joerg Vehlow
  0 siblings, 1 reply; 3+ messages in thread
From: Joerg Vehlow @ 2021-02-16 12:38 UTC (permalink / raw)
  To: ltp

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [LTP] [PATCH] memcg/stat_test: Use more memory for tests
  2021-02-16 12:38 [LTP] [PATCH] memcg/stat_test: Use more memory for tests Joerg Vehlow
@ 2021-02-24 14:10 ` Joerg Vehlow
  2021-02-26 16:29   ` Petr Vorel
  0 siblings, 1 reply; 3+ messages in thread
From: Joerg Vehlow @ 2021-02-24 14:10 UTC (permalink / raw)
  To: ltp

A friendly ping ;)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [LTP] [PATCH] memcg/stat_test: Use more memory for tests
  2021-02-24 14:10 ` Joerg Vehlow
@ 2021-02-26 16:29   ` Petr Vorel
  0 siblings, 0 replies; 3+ messages in thread
From: Petr Vorel @ 2021-02-26 16:29 UTC (permalink / raw)
  To: ltp

Hi Joerg,

> A friendly ping ;)
Thanks, merged!

Kind regards,
Petr

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-02-26 16:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-16 12:38 [LTP] [PATCH] memcg/stat_test: Use more memory for tests Joerg Vehlow
2021-02-24 14:10 ` Joerg Vehlow
2021-02-26 16:29   ` Petr Vorel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.