Re: [PATCH v2 07/53] selftests/mm: hugetlb-shm: use kselftest framework

Mike Rapoport
2026-04-24T09:14:03Z

Hi Sarthak,

On Wed, Apr 22, 2026 at 04:50:20PM +0530, Sarthak Sharma wrote:
> Hi Mike!
>
> On 4/18/26 4:24 PM, Mike Rapoport wrote:
> > From: "Mike Rapoport (Microsoft)" <rppt@kernel.org>
> >
> > Convert hugetlb-shm test to use kselftest framework for reporting and
> > tracking successful and failing runs.
> >
> > Reviewed-by: Mark Brown <broonie@kernel.org>
> > Reviewed by: Donet Tom <donettom@linux.ibm.com>
> > Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
> > ---
> > tools/testing/selftests/mm/hugetlb-shm.c | 46 ++++++++++++------------
> > 1 file changed, 23 insertions(+), 23 deletions(-)
> >
> >
> > - dprintf("Starting the Check...");
> > + ksft_print_msg("Starting the Check...");
> > for (i = 0; i < LENGTH; i++)
> > if (shmaddr[i] != (char)i) {
> > - printf("\nIndex %lu mismatched\n", i);
> > - exit(3);
> > + ksft_print_msg("Index %lu mismatched\n", i);
> > + shmctl(shmid, IPC_RMID, NULL);
> > + ksft_exit_fail_msg("Data mismatch at index %lu\n", i);
>
> ksft_print_msg() and ksft_exit_fail_msg() are printing the same thing
> here. Should we remove the ksft_print_msg() to avoid redundancy?

Yes, I'll drop the first print.

> I've run the test before and after applying the patch. The output has
> been correctly formatted into KTAP format with no change in results.
>
> Tested-by: Sarthak Sharma <sarthak.sharma@arm.com>

Thanks!

--
Sincerely yours,
Mike.