Re: About Drivers Testing

18 views
Skip to first unread message

Brendan Higgins

unread,
Feb 1, 2019, 4:32:18 PM2/1/19
to Mausam Yadav, kuni...@googlegroups.com

Hi, sorry for the delayed responses.

See my responses inline below.

On Fri, Feb 1, 2019 at 5:13 AM Mausam Yadav <mausamy...@gmail.com> wrote:
How enable PCI bus in your UML
by running kunit.py,,,,, Iam unable to enable it

Yeah, you need to add platform mock support for PCI. Basically, you will need to make a fake PCI bus device. I have a fake/mock I2C bus here: https://kunit.googlesource.com/linux/+/e10484ad2f9fc7926412ec84739fe105981b4771/drivers/i2c/busses/i2c-mock.c

Admittedly this is not one of the most well supported parts of KUnit. Right now I am primarily focussed on trying to get KUnit checked in upstream (I think this may have caused you some confusion, since the RFC branch has diverged from the kunit/alpha/master branch to a non-trivial extent, and I have been neglecting the kunit/alpha/master branch to focus on getting KUnit accepted upstream), and that stuff isn't ready for upstream review.

On Fri, Feb 1, 2019 at 10:58 AM Mausam Yadav <mausamy...@gmail.com> wrote:
Can I use your Kunit test for testing the hardware

To be clear you mean testing actual hardware? Or are you asking whether you can test drivers?

The answer to the latter question is an unambiguous yes.

As for the former question, it is a long term goal, and it should be possible to do with some massaging, but nobody has actually tried to do it. So this would require a lot more work. 

On Fri, Feb 1, 2019 at 10:14 AM Mausam Yadav <mausamy...@gmail.com> wrote:
For  independent module it is working fine, but for dependent drivers I am unable to integrate my drivers in vmlinux. I was able to create only some .o files...Not more than that...So, I want to ask you is that Is kunit testing is a generic testing tool ????
 
Sorry, I don't fully understand what you are asking. Are you having problems getting Kconfig to be turned on?

 I think the best place to start is getting the example working, did you get that working since your previous email?

Next thing, did you get your driver building under UML? KUnit has some facilities to help with that (see https://kunit.googlesource.com/linux/+/kunit/alpha/master/Documentation/test/usage.rst#460).

KUnit is indeed a generic testing tool, but you need to provide the appropriate mocks/fakes in order to test drivers that depend on hardware. This is pretty typical as far as unit testing libraries are concerned. Here are some examples: https://kunit.googlesource.com/linux/+/e10484ad2f9fc7926412ec84739fe105981b4771/drivers/i2c/busses/i2c-aspeed-test.c#65.

It might be easier for me to help you if you provide some description of what you are trying to do. Is there any chance you can share your code?


On Fri, Feb 1, 2019 at 10:12 AM Mausam Yadav <mausamy...@gmail.com> wrote:
Hiiii,  I have used your kunit test for driver testing. I have enabled all the dependency but still  I am facing problem except dependency do we need to enable more in menu configuration

Cheers 

Brendan Higgins

unread,
Feb 12, 2019, 9:12:57 PM2/12/19
to Mausam Yadav, kuni...@googlegroups.com
Hey,
I haven't heard from you. Have you resolved your issue?

Brendan Higgins

unread,
Jul 30, 2019, 1:58:11 PM7/30/19
to Mausam Yadav, kuni...@googlegroups.com
+kuni...@googlegroups.com 

Hey, it's been a long time!

Are you still using KUnit? How is it working out for you?

I remember previously you were interested in mocking PCIe devices, for device driver testing, is that correct?

I have some other users now interested in that and I would like to know if you have made any progress in that regard, and/or if you would like to be put in contact with other users trying to do PCIe device testing?

Hope all is well with you!

Cheers

On Wed, Feb 20, 2019 at 6:44 PM Brendan Higgins <brendan...@google.com> wrote:
Awesome, sounds good! Let me know how it goes!

On Tue, Feb 12, 2019 at 9:35 PM Mausam Yadav <mausamy...@gmail.com> wrote:
Yeah I am  able to test my drivers which are independent of hardware.. I am not expert in mocking and faking. I will be back after learning mocking and faking. 
 -Thanks for your support.
 -Mausam Yadav

Mausam Yadav

unread,
Aug 2, 2019, 2:25:19 AM8/2/19
to kuni...@googlegroups.com

+kuni...@googlegroups.com

---------- Forwarded message ---------
From: Mausam Yadav <mausamy...@gmail.com>
Date: Thu, Aug 1, 2019 at 10:49 AM
Subject: Re: About Drivers Testing
To: Brendan Higgins <brendan...@google.com>


Hi, sorry for the late reply,
Last week, I received job offer from Thinci semiconductor & currently working in " Linux Graphics Domain  "

I was able to test hardware independent module, but not hardware dependent drivers with your Kunit Framework. I tried but failed, then I switched to unit level testing in user space and designed one Unit Level Testing Framework(ULT) and successfully submitted to my company . My framework has very less impact on user space code and hence least chance of hung/ kernel panic.

But I am still curious in your Kunit framework, if you can help me then I can start from the point where I left earlier (i.e., testing hardware dependent modules ). And I am comfortable to communicate with the new users working on your framework

Thanks & Regards,
Mausam Yadav

Brendan Higgins

unread,
Aug 26, 2019, 6:54:25 PM8/26/19
to Mausam Yadav, kuni...@googlegroups.com
On Thu, Aug 1, 2019 at 11:25 PM Mausam Yadav <mausamy...@gmail.com> wrote:

+kuni...@googlegroups.com

---------- Forwarded message ---------
From: Mausam Yadav <mausamy...@gmail.com>
Date: Thu, Aug 1, 2019 at 10:49 AM
Subject: Re: About Drivers Testing
To: Brendan Higgins <brendan...@google.com>


Hi, sorry for the late reply,
Last week, I received job offer from Thinci semiconductor & currently working in " Linux Graphics Domain  "

I was able to test hardware independent module, but not hardware dependent drivers with your Kunit Framework. I tried but failed, then I switched to unit level testing in user space and designed one Unit Level Testing Framework(ULT) and successfully submitted to my company . My framework has very less impact on user space code and hence least chance of hung/ kernel panic.

But I am still curious in your Kunit framework, if you can help me then I can start from the point where I left earlier (i.e., testing hardware dependent modules ). And I am comfortable to communicate with the new users working on your framework

Awesome! I will try to put something together.

Thanks!
 
--
You received this message because you are subscribed to the Google Groups "KUnit Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kunit-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kunit-dev/CAMLjmaixnjmJBV%2B44gPkFpG_YHtgcuCMxTt65LwD6WcSTpDhHQ%40mail.gmail.com.

Mausam Yadav

unread,
Sep 5, 2019, 1:04:19 AM9/5/19
to Brendan Higgins, kuni...@googlegroups.com
Thanks
Reply all
Reply to author
Forward
0 new messages