From: Sarthak Sharma <sarthak.sharma@arm.com>
To: "Mike Rapoport (Microsoft)" <rppt@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@kernel.org>
Cc: "Liam R. Howlett" <liam@infradead.org>,
Lorenzo Stoakes <ljs@kernel.org>, Michal Hocko <mhocko@suse.com>,
Shuah Khan <shuah@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Vlastimil Babka <vbabka@kernel.org>,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [PATCH] selftests/mm: thuge-gen: fix test_shmget() for PAGE_SIZE check
Date: Wed, 12 Aug 2026 11:05:12 +0530 [thread overview]
Message-ID: <11e2f110-21b6-4436-92e2-b998d4d45de5@arm.com> (raw)
In-Reply-To: <20260809-selftests-thuge-gen-fix-v1-1-1919f4b3d12f@kernel.org>
Hi Mike!
On 8/9/26 1:33 PM, Mike Rapoport (Microsoft) wrote:
> Commit 49a4e7186b08 ("selftests/mm: thuge-gen: add setup of HugeTLB pages")
> changed thuge-gen test to use common functions for reading hugetlb
> attributes from sysfs, but it missed that the original read_free() function
> special cased PAGE_SIZE tests.
>
> For PAGE_SIZE tests, failure to read sysfs was ignored and read_free()
> returned 0.>
> This allowed test_shmget() to essentially skip the check of how many huge
> pages was consumed when it ran with PAGE_SIZE.
>
> Commit 3199b0c09efa ("selftests/mm: fix read_file() return value check")
> fixed the common read_file() to actually return error on failure and this
This commit does not make read_file return an error, it just fixes a
"read_file() < 0" check, which can never happen since currently
read_file() never returns a negative number.
The patch from my series, "selftests/mm: make file helpers return
errors" [1], is the one that changes read_file() to return a negative
errno on failure. It also exposed the same test_shmget() issue and
caused the CI failure [2]. I also debugged the failure and traced it to
test_shmget() [3].
I was planning to fix this in my next revision, but I will drop that
change now. :)
Rest the change looks good, so:
Reviewed-by: Sarthak Sharma <sarthak.sharma@arm.com>
[1]
https://lore.kernel.org/all/20260730140825.238130-2-sarthak.sharma@arm.com/
[2]
https://github.com/linux-mm/linux-mm/actions/runs/30553882784/job/90909219578
[3]
https://lore.kernel.org/all/9eb7852a-c14f-4bbc-86dc-4775f882fe27@arm.com/
next prev parent reply other threads:[~2026-08-12 5:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-09 8:03 [PATCH] selftests/mm: thuge-gen: fix test_shmget() for PAGE_SIZE check Mike Rapoport (Microsoft)
2026-08-11 15:43 ` David Hildenbrand (Arm)
2026-08-11 16:20 ` Andrew Morton
2026-08-12 5:35 ` Sarthak Sharma [this message]
2026-08-12 7:19 ` Lorenzo Stoakes (ARM)
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=11e2f110-21b6-4436-92e2-b998d4d45de5@arm.com \
--to=sarthak.sharma@arm.com \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=rppt@kernel.org \
--cc=shuah@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
/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