From: linuxtestproject.agent@gmail.com
To: Pavithra <pavrampu@linux.ibm.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] hugetlb/hugefallocate: Add hugefallocate03 to stress test fallocate on hugetlbfs
Date: Sun, 20 Sep 2026 14:43:13 +0000 [thread overview]
Message-ID: <20260920144313.11003-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260920113519.1138936-1-pavrampu@linux.ibm.com>
Hi Pavithra,
On Sun Sep 20 17:05:19 2026 +0530, Pavithra wrote:
> hugetlb/hugefallocate: Add hugefallocate03 to stress test fallocate on hugetlbfs
> +#define _GNU_SOURCE
> +#include <stdio.h>
> +#include <sys/mount.h>
> +#include <limits.h>
> +#include <sys/param.h>
> +#include <sys/types.h>
> +#include <pthread.h>
> +#include <signal.h>
> +#include <setjmp.h>
Add missing #include <time.h> for time().
> + if (err) {
> + tst_res(TFAIL | TERRNO, "fallocate(PUNCH_HOLE) failed at page %ld:", tpage);
> + thread_err = 1;
> + }
> + err = fallocate(fd, 0, tpage * hpage_size, hpage_size);
> + if (err) {
> + tst_res(TFAIL | TERRNO, "fallocate(fill) failed at page %ld:", tpage);
> + thread_err = 1;
> + }
Drop the trailing colons in the format strings; TERRNO automatically appends
": <errno>". Remove thread_err as tst_res() already records the failure.
Break the loop or return early on failure to avoid flooding the test log
with thousands of failure messages.
> +static void thread_fault_cleanup(void *arg)
> +{
> + (void)arg;
> +
> + if (fault_mmap_addr) {
> + munmap(fault_mmap_addr, max_hpages * hpage_size);
> + fault_mmap_addr = NULL;
> + }
> +}
Use SAFE_MUNMAP() instead of munmap().
> + nr_hpages_free = SAFE_READ_MEMINFO(MEMINFO_HPAGE_FREE);
> + max_hpages = MIN(nr_hpages_free, MAX_PAGES_TO_USE);
> + free_before = SAFE_READ_MEMINFO(MEMINFO_HPAGE_FREE);
Assign free_before = nr_hpages_free instead of reading /proc/meminfo
twice in consecutive lines.
> + if (thread_err)
> + tst_res(TFAIL, "fallocate() failed during stress, see above");
Remove this check; tst_res() in thread_fallocate() already marks the test
as failed.
> + .hugepages = {MAX_PAGES_TO_USE, TST_NEEDS},
Using TST_NEEDS with MAX_PAGES_TO_USE (100) causes unnecessary TCONF on
systems where hugepages are large (e.g. 16MB on ppc64le, 512MB on arm64)
or where memory is limited. Use TST_REQUEST, or require a smaller minimum
in .hugepages to keep the test portable.
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-09-20 14:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-20 11:35 [LTP] [PATCH v8] hugetlb/hugefallocate: Add hugefallocate03 to stress test fallocate on hugetlbfs Pavithra
2026-09-20 14:43 ` linuxtestproject.agent [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-09-23 8:01 [LTP] [PATCH v9] " Pavithra
2026-09-23 10:00 ` [LTP] " linuxtestproject.agent
2026-09-19 17:49 [LTP] [PATCH v7] " Pavithra
2026-09-19 20:14 ` [LTP] " linuxtestproject.agent
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=20260920144313.11003-1-linuxtestproject.agent@gmail.com \
--to=linuxtestproject.agent@gmail.com \
--cc=ltp@lists.linux.it \
--cc=pavrampu@linux.ibm.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