Closed santwana closed 1 year ago
Well, I don't think you're right.
1) memcg_testfunc()
is able to work with non-numeric function
2) MEMCG_TESTFUNC=test
will point to nonexisting function if you rename it to test1
NOTE: we prefer patches sent over mailing list: https://github.com/linux-test-project/ltp/wiki#developers-corner
Well, I don't think you're right.
1. `memcg_testfunc()` is able to work with non-numeric function
1. `MEMCG_TESTFUNC=test` will point to nonexisting function if you rename it to `test1`
NOTE: we prefer patches sent over mailing list: https://github.com/linux-test-project/ltp/wiki#developers-corner
Hi Petr,
Thank you for your time to review the commit. I agree with your comments.
Below is my analysis: Even though , memcg_testfunc() is able to work with non-numeric function, the execution of "memcg_failcnt.sh" is getting TBROK in my test-environment. memcg_failcnt 1 TBROK: Test didn't report any results
The reason is, "type test1" is pre-existing. type test1 test1 is /tools/setup.d/test1
Hence, in this scenario , the test-execution of memcg_failcnt.sh is not able to work with the non numeric function.
There might be certain environments, where this condition would be existing.
The approach to fix this would be, changing the memcg_testfunc() in memcg_lib.sh, as below:
Post which it is working fine: memcg_failcnt 1 TPASS: memory.failcnt is 21, > 0 as expected memcg_failcnt 2 TPASS: memory.failcnt is 21, > 0 as expected memcg_failcnt 3 TPASS: memory.failcnt is 21, > 0 as expected
I will close this PR , and suggest a new one with the above fix, incase you concur with the above approach.
memcg_failcnt.sh: Append numerical suffix to the test func
Currently the execution of the testcase "memcg_failcnt.sh" is reporting TBROK, since the "memcg_testfunc" function in "memcg_lib.sh" is expecting a numerical suffix.
This patch fixes the issue, post which the testcase execution is "TPASS".
Signed-off-by: santwana santwana@linux.vnet.ibm.com