From: linuxtestproject.agent@gmail.com
To: Pavithra <pavrampu@linux.ibm.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] hugemmap36: Migrating the libhugetlbfs/testcases/truncate_above_4GB.c test v6
Date: Thu, 2 Jul 2026 12:41:46 +0000 [thread overview]
Message-ID: <20260702124146.4086-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260404165346.1689061-1-pavrampu@linux.ibm.com>
Hi Pavithra,
On Sat, 04 Apr 2026, Pavithra <pavrampu@linux.ibm.com> wrote:
> hugemmap36: Migrating the libhugetlbfs/testcases/truncate_above_4GB.c test v6
The "v6" revision tag belongs in the email subject only, not in the
committed subject line. The subject should also use imperative mood:
hugemmap36: Migrate the libhugetlbfs/testcases/truncate_above_4GB.c test
> +static void sigbus_handler_fail(int signum LTP_ATTRIBUTE_UNUSED,
> + siginfo_t *si LTP_ATTRIBUTE_UNUSED,
> + void *uc LTP_ATTRIBUTE_UNUSED)
> +{
> + siglongjmp(sig_escape, 17);
> +}
This handler does not record the unexpected SIGBUS in any way. The
caller uses it here:
> + SAFE_SIGACTION(SIGBUS, &sa_fail, NULL);
> + if (sigsetjmp(sig_escape, 1) == 0)
> + if (*pi != 1) {
> + tst_res(TFAIL, "Data 1 has changed!");
> + goto cleanup;
> + }
If SIGBUS fires on `*pi` - which is exactly the kernel bug being tested
(the low-offset page was incorrectly truncated) - siglongjmp returns 17,
so `sigsetjmp(...) == 0` is false, the TFAIL block is skipped entirely,
and execution falls through.
The code then reaches the sa_pass / `*qi` block, `*qi` triggers SIGBUS,
test_pass is set to 1, and the test reports TPASS. The test passes when
the kernel bug is present.
sigbus_handler_fail needs to set a flag (e.g. test_pass = -1) so that
after the first sigsetjmp block the caller can detect the unexpected
SIGBUS and report TFAIL before proceeding.
> + * Test for a bug where truncating hugepage files at offsets >= 4GB on
> + * 32-bit systems could incorrectly truncate lower pages due to a
> + * misconversion of hugetlb_vmtruncate_list to a prio_tree.
...
> + .needs_root = 1,
The doc-comment block does not explain why root is required. Ground
Rule 4 requires that the reason be stated there.
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
prev parent reply other threads:[~2026-07-02 12:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-04 16:53 [LTP] [PATCH] hugemmap36: Migrating the libhugetlbfs/testcases/truncate_above_4GB.c test v6 Pavithra
2026-07-02 12:41 ` linuxtestproject.agent [this message]
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=20260702124146.4086-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 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.