Since commit 3e32cb2e0a12b6915056ff04601cf1bb9b44f967, case 22-24 in
memcg_function_test.sh will fail for unaligned PAGESIZE input.

We need update the test more smoothly.

Signed-off-by: Li Jinyue <lijin...@huawei.com>
---
 .../memcg/functional/memcg_function_test.sh         | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git 
a/testcases/kernel/controllers/memcg/functional/memcg_function_test.sh 
b/testcases/kernel/controllers/memcg/functional/memcg_function_test.sh
index f555939..24439f7 100755
--- a/testcases/kernel/controllers/memcg/functional/memcg_function_test.sh
+++ b/testcases/kernel/controllers/memcg/functional/memcg_function_test.sh
@@ -158,17 +158,32 @@ testcase_21()
 # Case 22 - 24: Test limit_in_bytes will be aligned to PAGESIZE
 testcase_22()
 {
-       test_limit_in_bytes $((PAGESIZE-1)) $PAGESIZE 0
+       tst_kvercmp 3 19 0
+       if [ $? -eq 0 ]; then
+               test_limit_in_bytes $((PAGESIZE-1)) $PAGESIZE 0
+       else
+               test_limit_in_bytes $((PAGESIZE-1)) 0 0
+       fi
 }
 
 testcase_23()
 {
-       test_limit_in_bytes $((PAGESIZE+1)) $((PAGESIZE*2)) 0
+       tst_kvercmp 3 19 0
+       if [ $? -eq 0 ]; then
+               test_limit_in_bytes $((PAGESIZE+1)) $((PAGESIZE*2)) 0
+       else
+               test_limit_in_bytes $((PAGESIZE+1)) $((PAGESIZE)) 0
+       fi
 }
 
 testcase_24()
 {
-       test_limit_in_bytes 1 $PAGESIZE 0
+       tst_kvercmp 3 19 0
+       if [ $? -eq 0 ]; then
+               test_limit_in_bytes 1 $PAGESIZE 0
+       else
+               test_limit_in_bytes 1 0 0
+       fi
 }
 
 # Case 25 - 28: Test invaild memory.limit_in_bytes
-- 
1.8.2.2


------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to