On Wed, May 20, 2026 at 03:45:53PM +0530, Sarthak Sharma wrote: > On 5/20/26 2:25 PM, Mike Rapoport wrote:
> > It seems that we need to better share the common code in > > tools/testing/selftest. > > And adding another copy of the hugetlb detection and setup code does not > > seem like a great idea. > Agreed, but that was the least disruptive approach I could think of. > I am thinking of doing this now: should I move the > hugepage_settings.[ch] to tools/lib/ and move the read_num(), > write_num(), read_file() and write_file() helpers to a separate file in > tools/lib/ itself without any ksft dependency? Then both > tools/testing/selftests/* and tools/mm/ could share the same code. Using tools/lib sounds sensible to me - as well as the sharing it makes it clear that it's a library used by multiple things so avoids the issues we sometimes have with selftest directories referencing each other.
signature.asc
Description: PGP signature

