From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: Richard Palethorpe <rpalethorpe@suse.com>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 2/2] madvise06: Move oom_score_adj initialization to struct tst_path_val
Date: Fri, 11 Mar 2022 13:37:43 +0100 [thread overview]
Message-ID: <YitCl4v9NSpnbyYH@yuki> (raw)
In-Reply-To: <20220311120151.601-2-pvorel@suse.cz>
Hi!
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> Is it ok to define it earlier? i.e. before calling sync() ?
>
> testcases/kernel/syscalls/madvise/madvise06.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/testcases/kernel/syscalls/madvise/madvise06.c b/testcases/kernel/syscalls/madvise/madvise06.c
> index b21f2cc7de..15171442cb 100644
> --- a/testcases/kernel/syscalls/madvise/madvise06.c
> +++ b/testcases/kernel/syscalls/madvise/madvise06.c
> @@ -55,6 +55,7 @@
> #define PASS_THRESHOLD (CHUNK_SZ / 4)
> #define PASS_THRESHOLD_KB (PASS_THRESHOLD / 1024)
> #define SWAPPINESS "60"
> +#define OOM_SCORE_ADJ "-1000"
>
> static const char drop_caches_fname[] = "/proc/sys/vm/drop_caches";
> static int pg_sz, stat_refresh_sup;
> @@ -116,9 +117,6 @@ static void setup(void)
> 2 * CHUNK_SZ);
> }
>
> - check_path("/proc/self/oom_score_adj");
> - SAFE_FILE_PRINTF("/proc/self/oom_score_adj", "%d", -1000);
> -
> SAFE_CG_PRINTF(tst_cg, "memory.max", "%ld", MEM_LIMIT);
> if (SAFE_CG_HAS(tst_cg, "memory.swap.max"))
> SAFE_CG_PRINTF(tst_cg, "memory.swap.max", "%ld", MEMSW_LIMIT);
> @@ -231,6 +229,7 @@ static struct tst_test test = {
> .needs_root = 1,
> .save_restore = (const struct tst_path_val const[]) {
> {"?/proc/sys/vm/swappiness", SWAPPINESS},
> + {"/proc/self/oom_score_adj", OOM_SCORE_ADJ},
I do not think that this is even correct, after this change the file is
being written to by the test library and the 'self' points to a
different process as far as I can tell.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2022-03-11 12:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-11 12:01 [LTP] [PATCH 1/2] madvise06: Fix segfault Petr Vorel
2022-03-11 12:01 ` [LTP] [PATCH 2/2] madvise06: Move oom_score_adj initialization to struct tst_path_val Petr Vorel
2022-03-11 12:37 ` Cyril Hrubis [this message]
2022-03-14 3:37 ` Li Wang
2022-03-11 12:28 ` [LTP] [PATCH 1/2] madvise06: Fix segfault Cyril Hrubis
2022-03-11 14:46 ` Petr Vorel
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=YitCl4v9NSpnbyYH@yuki \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
--cc=pvorel@suse.cz \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox