From: linuxtestproject.agent@gmail.com
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] syscalls/madvise: Make use of .min_swap_avail and .min_mem_avail
Date: Tue, 9 Jun 2026 15:59:44 +0000 [thread overview]
Message-ID: <20260609155944.4024-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260609152305.1248443-1-chrubis@suse.cz>
Hi Cyril,
On Tue, 9 Jun 2026 17:23:05 +0200, Cyril Hrubis wrote:
> syscalls/madvise: Make use of .min_swap_avail and .min_mem_avail
> - SAFE_FILE_LINES_SCANF("/proc/meminfo", "SwapTotal: %ld", &swap_total);
> - if (swap_total <= 0)
> - tst_brk(TCONF, "MADV_FREE does not work without swap");
> [...]
> + .min_swap_avail = SWAP_LIMIT / TST_MB,
The commit message describes this as moving the existing runtime
checks into the tst_test structure, but the madvise09 change is
not an equivalent transformation.
The old code checked SwapTotal > 0, i.e. whether any swap is
configured at all. The new .min_swap_avail check uses SwapFree
and requires at least SWAP_LIMIT / TST_MB = 16 MB of available
swap. This tightens the requirement in two ways: it looks at
free swap rather than total, and it raises the threshold from
"any swap" to 16 MB.
If this is intentional (which seems reasonable since the test
does need swap space), could the commit message mention the
semantic change for madvise09?
Verdict: Needs revision
---
Note:
The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-06-09 16:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-09 15:23 [LTP] [PATCH] syscalls/madvise: Make use of .min_swap_avail and .min_mem_avail Cyril Hrubis
2026-06-09 15:59 ` linuxtestproject.agent [this message]
2026-06-10 1:18 ` 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=20260609155944.4024-1-linuxtestproject.agent@gmail.com \
--to=linuxtestproject.agent@gmail.com \
--cc=chrubis@suse.cz \
--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.