From: Cyril Hrubis <chrubis@suse.cz>
To: Li Wang <liwang@redhat.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 4/4] ksm: cleanup work and make use of .save_restore
Date: Tue, 8 Mar 2022 14:20:18 +0100 [thread overview]
Message-ID: <YidYEvHfXOGiLVw8@yuki> (raw)
In-Reply-To: <20220308073709.4125677-5-liwang@redhat.com>
Hi!
> diff --git a/testcases/kernel/mem/ksm/ksm01.c b/testcases/kernel/mem/ksm/ksm01.c
> index 0a81e2016..301c4d3c2 100644
> --- a/testcases/kernel/mem/ksm/ksm01.c
> +++ b/testcases/kernel/mem/ksm/ksm01.c
> @@ -66,30 +66,7 @@ static void verify_ksm(void)
>
> static void setup(void)
> {
> - if (access(PATH_KSM, F_OK) == -1)
> - tst_brk(TCONF, "KSM configuration is not enabled");
> -
> parse_ksm_options(opt_sizestr, &size, opt_numstr, &num, opt_unitstr, &unit);
> -
> - /*
> - * kernel commit 90bd6fd introduced a new KSM sysfs knob
> - * /sys/kernel/mm/ksm/merge_across_nodes, setting it to '0'
> - * will prevent KSM pages being merged across numa nodes,
> - * which will cause the case fail, so we need to make sure
> - * it is enabled before testing.
> - */
> - if (access(PATH_KSM "merge_across_nodes", F_OK) == 0) {
> - SAFE_FILE_SCANF(PATH_KSM "merge_across_nodes",
> - "%d", &merge_across_nodes);
> - SAFE_FILE_PRINTF(PATH_KSM "merge_across_nodes", "1");
> - }
> -}
> -
> -static void cleanup(void)
> -{
> - if (access(PATH_KSM "merge_across_nodes", F_OK) == 0)
> - FILE_PRINTF(PATH_KSM "merge_across_nodes",
> - "%d", merge_across_nodes);
> }
>
> static struct tst_test test = {
> @@ -102,11 +79,24 @@ static struct tst_test test = {
> {}
> },
> .setup = setup,
> - .cleanup = cleanup,
> .save_restore = (const struct tst_path_val const[]) {
> + {"!/sys/kernel/mm/ksm/run", NULL},
> + {"!/sys/kernel/mm/ksm/sleep_millisecs", NULL},
> {"?/sys/kernel/mm/ksm/max_page_sharing", NULL},
> + /*
> + * kernel commit 90bd6fd introduced a new KSM sysfs knob
> + * /sys/kernel/mm/ksm/merge_across_nodes, setting it to '0'
> + * will prevent KSM pages being merged across numa nodes,
> + * which will cause the case fail, so we need to make sure
> + * it is enabled before testing.
> + */
I would have removed this comment, it's not in the rest of the tests
either way...
Otherwise:
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2022-03-08 13:18 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-08 7:37 [LTP] [PATCH 0/4] enhance .save_restore to support set value Li Wang
2022-03-08 7:37 ` [LTP] [PATCH 1/4] lib: move struct tst_sys_conf to internal Li Wang
2022-03-08 12:25 ` Cyril Hrubis
2022-03-08 7:37 ` [LTP] [PATCH 2/4] lib: enhance .save_restore to support set expected value Li Wang
2022-03-08 13:02 ` Cyril Hrubis
2022-03-09 2:27 ` Li Wang
2022-03-08 7:37 ` [LTP] [PATCH 3/4] testcase: switch to the new .save_restore Li Wang
2022-03-08 13:05 ` Cyril Hrubis
2022-03-08 7:37 ` [LTP] [PATCH 4/4] ksm: cleanup work and make use of .save_restore Li Wang
2022-03-08 13:20 ` Cyril Hrubis [this message]
2022-03-09 3:04 ` [LTP] [PATCH v2 1/3] lib: move struct tst_sys_conf to internal Li Wang
2022-03-09 3:04 ` [LTP] [PATCH v2 2/3] lib: enhance .save_restore to support set expected value Li Wang
2022-03-09 10:00 ` Cyril Hrubis
2022-03-10 1:26 ` Li Wang
2022-03-10 7:43 ` xuyang2018.jy
2022-03-10 7:53 ` Li Wang
2022-03-10 8:01 ` xuyang2018.jy
2022-03-09 3:04 ` [LTP] [PATCH v2 3/3] ksm: cleanup work and make use of .save_restore Li Wang
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=YidYEvHfXOGiLVw8@yuki \
--to=chrubis@suse.cz \
--cc=liwang@redhat.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.