[Linux-kernel-mentees] [PATCH v3] lib: Convert test_hexdump.c to KUnit

Andy Shevchenko andy.shevchenko at gmail.com
Wed Dec 2 09:44:08 UTC 2020


On Wed, Dec 02, 2020 at 09:51:19AM +0530, Arpitha Raghunandan wrote:
> On 01/12/20 4:36 pm, Andy Shevchenko wrote:
> > On Tue, Dec 1, 2020 at 9:21 AM Arpitha Raghunandan <98.arpi at gmail.com> wrote:

...

> >> I ran both the original and converted tests as is to produce the
> >> output for success of the test in the two cases. I also ran these
> >> tests with a small modification to show the difference in the output
> >> for failure of the test in both cases. The modification I made is:
> >>  static const char * const test_data_4_le[] __initconst = {
> >> -       "7bdb32be", "b293180a", "24c4ba70", "9b34837d",
> >> +       "7bdb32be", "b293180a", "24c4ba70", "9b3483d",
> >>
> >> The difference in outputs can be seen here:
> >> https://gist.github.com/arpi-r/38f53a3c65692bf684a6bf3453884b6e
> > 
> > Looks pretty much good, what I'm sad to see is the absence of the test
> > statistics. Any ideas if we can get it back?
> > 
> 
> I could again include variable total_tests as was in the original test.
> Would that be fine?

What I;m talking about is the output. How it will be implemented (using the
same variable or differently) is up to you. So the point is I want to see the
statistics of success/total at the end.

I think this should be done in KUNIT rather than in the individual test cases.

-- 
With Best Regards,
Andy Shevchenko




More information about the Linux-kernel-mentees mailing list