All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 6/6] memcg_control_test.sh: Simplify runtest file
Date: Thu, 8 Sep 2016 12:20:54 +0300	[thread overview]
Message-ID: <57D12D76.10501@oracle.com> (raw)
In-Reply-To: <1473089055-17782-6-git-send-email-chrubis@suse.cz>

Hi!

The entire series looks good, except that issue with the numbering
scheme in memcg_subgroup_charge.sh (patch V2 4/6)

On 09/05/2016 06:24 PM, Cyril Hrubis wrote:
> This commit makes use of $(getconf PAGESIZE) instead of the mem_process
> and also moves the parameters to the test itself as there is no need to
> keep these outside the script.
> 
> Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
> ---
>  runtest/controllers                                              | 2 +-
>  testcases/kernel/controllers/memcg/control/mem_process.c         | 3 ---
>  testcases/kernel/controllers/memcg/control/memcg_control_test.sh | 8 +++++---
>  3 files changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/runtest/controllers b/runtest/controllers
> index d14d81e..b904e05 100644
> --- a/runtest/controllers
> +++ b/runtest/controllers
> @@ -13,7 +13,7 @@ memcg_stat	memcg_stat_test.sh
>  memcg_use_hierarchy	memcg_use_hierarchy_test.sh
>  memcg_usage_in_bytes	memcg_usage_in_bytes_test.sh
>  memcg_stress		memcg_stress_test.sh
> -memcg_control		PAGESIZE=$(mem_process -p);memcg_control_test.sh $PAGESIZE $PAGESIZE $((PAGESIZE * 2))
> +memcg_control		memcg_control_test.sh
>  
>  cgroup_fj_function_debug cgroup_fj_function.sh debug
>  cgroup_fj_function_cpuset cgroup_fj_function.sh cpuset
> diff --git a/testcases/kernel/controllers/memcg/control/mem_process.c b/testcases/kernel/controllers/memcg/control/mem_process.c
> index 48cdea8..9007c2c 100644
> --- a/testcases/kernel/controllers/memcg/control/mem_process.c
> +++ b/testcases/kernel/controllers/memcg/control/mem_process.c
> @@ -60,9 +60,6 @@ void process_options(int argc, char **argv)
>  			if (*end != '\0')
>  				errx(2, "invalid -m usage");
>  			break;
> -		case 'p':
> -			printf("%d\n", getpagesize());
> -			exit(0);
>  		default:
>  			errx(2, "invalid option specifed");
>  		}
> diff --git a/testcases/kernel/controllers/memcg/control/memcg_control_test.sh b/testcases/kernel/controllers/memcg/control/memcg_control_test.sh
> index 168efe3..1d15872 100644
> --- a/testcases/kernel/controllers/memcg/control/memcg_control_test.sh
> +++ b/testcases/kernel/controllers/memcg/control/memcg_control_test.sh
> @@ -41,9 +41,11 @@ export TST_COUNT=0
>  export TMP=${TMP:-/tmp}
>  cd $TMP
>  
> -TOT_MEM_LIMIT=$1
> -ACTIVE_MEM_LIMIT=$2
> -PROC_MEM=$3
> +PAGE_SIZE=$(getconf PAGESIZE)
> +
> +TOT_MEM_LIMIT=$PAGE_SIZE
> +ACTIVE_MEM_LIMIT=$PAGE_SIZE
> +PROC_MEM=$((PAGE_SIZE * 2))
>  
>  TST_PATH=$PWD
>  STATUS_PIPE="$TMP/status_pipe"
> 

  reply	other threads:[~2016-09-08  9:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-05 15:24 [LTP] [PATCH V2 1/6] memcg_lib.sh: Print test number at test start Cyril Hrubis
2016-09-05 15:24 ` [LTP] [PATCH V2 2/6] memcg_lib.sh: Move all the kill -s XXX to functions Cyril Hrubis
2016-09-05 15:24 ` [LTP] [PATCH V2 3/6] memcg_lib.sh: Get rid of sleep 1 in signal_memcg_process Cyril Hrubis
2016-09-05 15:24 ` [LTP] [PATCH V2 4/6] memcg_function_test.sh: Split Cyril Hrubis
2016-09-08  9:10   ` Stanislav Kholmanskikh
2016-09-08  9:16     ` Cyril Hrubis
2016-09-05 15:24 ` [LTP] [PATCH 5/6] memcg_lib.sh: Remove subdirectories in cleanup Cyril Hrubis
2016-09-05 15:24 ` [LTP] [PATCH 6/6] memcg_control_test.sh: Simplify runtest file Cyril Hrubis
2016-09-08  9:20   ` Stanislav Kholmanskikh [this message]
2016-09-08  9:17     ` Cyril Hrubis

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=57D12D76.10501@oracle.com \
    --to=stanislav.kholmanskikh@oracle.com \
    --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 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.