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

From: Mike Rapoport

Date: Fri Apr 24 2026 - 05:18:21 EST


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@xxxxxxxxxx>
> >
> > Convert hugetlb-shm test to use kselftest framework for reporting and
> > tracking successful and failing runs.
> >
> > Reviewed-by: Mark Brown <broonie@xxxxxxxxxx>
> > Reviewed by: Donet Tom <donettom@xxxxxxxxxxxxx>
> > Signed-off-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
> > ---
> > 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@xxxxxxx>

Thanks!

--
Sincerely yours,
Mike.