From: linuxtestproject.agent@gmail.com
To: Pavithra <pavrampu@linux.ibm.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] syscalls/shmget: Add shmget07 to test SHM_HUGETLB with raw device read
Date: Sat, 19 Sep 2026 17:56:19 +0000 [thread overview]
Message-ID: <20260919175620.10016-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260919151602.1039825-1-pavrampu@linux.ibm.com>
Hi Pavithra,
On Sat Sep 19 20:46:02 2026 +0530, Pavithra <pavrampu@linux.ibm.com> wrote:
> syscalls/shmget: Add shmget07 to test SHM_HUGETLB with raw device read
This test exercises hugetlb shared memory functionality rather than the
shmget syscall itself. Move this test to
testcases/kernel/mem/hugetlb/hugeshmget/ and rename it (e.g. hugeshmget07).
Also, replace "raw device" with /dev/zero as /dev/zero is a character
device, not a raw device.
> diff --git a/runtest/syscalls b/runtest/syscalls
> --- a/runtest/syscalls
> +++ b/runtest/syscalls
> @@ -1596,3 +1596,4 @@ shmget06 shmget06
> +shmget07 shmget07
Move this entry to runtest/hugetlb alongside the other hugeshmget tests
instead of runtest/syscalls.
> + * from :file:`/dev/zero` directly into the shared memory region,
Replace :file:`/dev/zero` with ``/dev/zero``. :file: is not a supported
documentation role in LTP.
> +#include "tst_test.h"
> +#include "tst_hugepage.h"
Remove "tst_hugepage.h" as it is already included by "tst_test.h".
> + shmid = SAFE_SHMGET(IPC_PRIVATE, size, SHM_HUGETLB|SHM_R|SHM_W);
Add spaces around the '|' operators to follow kernel coding style.
> + for (i = 0; i < size; i += hpage_size) {
> + TEST(read(raw_fd, shmaddr + i, hpage_size));
> + if (TST_RET != hpage_size) {
> + tst_res(TFAIL | TERRNO, "Can't read full page from raw device!");
> + break;
> + }
> + tst_res(TPASS, "Read full page from raw device");
> + }
Replace manual TEST() and if/else reporting with:
TST_EXP_VAL(read(raw_fd, shmaddr + i, hpage_size), (ssize_t)hpage_size);
Also, update the message to refer to /dev/zero instead of "raw device".
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-09-19 17:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-19 15:16 [LTP] [PATCH v7] syscalls/shmget: Add shmget07 to test SHM_HUGETLB with raw device read Pavithra
2026-09-19 17:56 ` 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=20260919175620.10016-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