Hi,

I am trying to run memcg control testcase using script memcg_control_test.sh. 
This script calls a memory hog process 'mem_process'. 
The condition for this testcase to pass is 'when the memory hog process is 
killed on crossing boundary'. please check the below function.

<taken from memcg_control_test.sh>
-----------------------------
# Check if the test process is killed on crossing boundary
test_proc_kill()
{
    ( cd $TMP && mem_process -m $PROC_MEM & )
    sleep 1
    echo $! > tasks

    #Instruct the test process to start acquiring memory
    echo m > $STATUS_PIPE 
    sleep 5

    #Check if killed
    ps -p $! > /dev/null 2> /dev/null    ----> at this point the process 
'mem_process' must have terminated so that last return value ($?) can be 
non-zero.
    if [ $? -eq 0 ]; then
        echo m > $STATUS_PIPE
        echo x > $STATUS_PIPE
    else
        : $((KILLED_CNT += 1))
    fi
}
-------------------------
In my case: 'mem_process' does not terminate until we pass 'x' to it, but the 
expected behaviour according to testcase  that the memory hog process 
must be killed on crossing bounday. 
Inputs taken by testcase are : "./memcg_control_test.sh 4096 4096 8192"
If I change the inputs from 8192 to other (1024,10MB,100MB etc) . In all 
situation memory hog process does not terminate.
So what is the ideal condition for this process to terminate to make whole 
testcase pass. ?

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

Reply via email to