All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Palethorpe via ltp <ltp@lists.linux.it>
To: ltp@lists.linux.it
Cc: Richard Palethorpe <rpalethorpe@suse.com>
Subject: [LTP] [PATCH v2 2/3] memcontrol02: Fix anon memory comparison
Date: Tue, 25 Jan 2022 14:49:22 +0000	[thread overview]
Message-ID: <20220125144923.5849-2-rpalethorpe@suse.com> (raw)
In-Reply-To: <20220125144923.5849-1-rpalethorpe@suse.com>

All memory is being compared with the size malloc'ed instead of just
anon.

Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
---
 testcases/kernel/controllers/memcg/memcontrol02.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testcases/kernel/controllers/memcg/memcontrol02.c b/testcases/kernel/controllers/memcg/memcontrol02.c
index 411f5aea6..75ae5f56c 100644
--- a/testcases/kernel/controllers/memcg/memcontrol02.c
+++ b/testcases/kernel/controllers/memcg/memcontrol02.c
@@ -67,8 +67,8 @@ static void alloc_anon_50M_check(void)
 	SAFE_CGROUP_LINES_SCANF(cg_child, "memory.stat", anon_key_fmt, &anon);
 
 	TST_EXP_EXPR(anon > 0, "(memory.stat.anon=%zd) > 0", anon);
-	TST_EXP_EXPR(values_close(size, current, 3),
-		     "(size=%zd) ~= (memory.stat.anon=%zd)", size, current);
+	TST_EXP_EXPR(values_close(size, anon, 3),
+		     "(size=%zd) ~= (memory.stat.anon=%zd)", size, anon);
 	TST_EXP_EXPR(values_close(anon, current, 3),
 		     "(memory.current=%zd) ~= (memory.stat.anon=%zd)",
 		     current, anon);
-- 
2.34.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2022-01-25 14:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-24 17:36 [LTP] [PATCH 1/3] memcontrol02: Add VFAT/MSDOS magic and set error to 50% for it also Richard Palethorpe via ltp
2022-01-24 17:36 ` [LTP] [PATCH 2/3] memcontrol02: Fix anon memory comparison Richard Palethorpe via ltp
2022-01-25 11:53   ` Cyril Hrubis
2022-01-25 11:54     ` Cyril Hrubis
2022-01-25 14:19       ` Richard Palethorpe
2022-01-24 17:36 ` [LTP] [PATCH 3/3] memcontrol02: Increase expected error with increase in pagesize Richard Palethorpe via ltp
2022-01-25 14:58   ` Cyril Hrubis
2022-01-25 11:46 ` [LTP] [PATCH 1/3] memcontrol02: Add VFAT/MSDOS magic and set error to 50% for it also Cyril Hrubis
2022-01-25 14:49 ` [LTP] [PATCH v2 " Richard Palethorpe via ltp
2022-01-25 14:49   ` Richard Palethorpe via ltp [this message]
2022-01-25 15:31     ` [LTP] [PATCH v2 2/3] memcontrol02: Fix anon memory comparison Cyril Hrubis
2022-01-25 14:49   ` [LTP] [PATCH v2 3/3] memcontrol02: Increase expected error with increase in pagesize Richard Palethorpe via ltp

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=20220125144923.5849-2-rpalethorpe@suse.com \
    --to=ltp@lists.linux.it \
    --cc=rpalethorpe@suse.com \
    /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.