Skip to contentSkip to conversation

Is it possiable to run dm test in local u-boot console?

DISCUSSION [email protected] 2 participants 4 messages Dec 23, 2022 – Jan 9, 2023

lore
Share & tools
lore
#0 lore raw

Hi Maintainers,
I'm an engineer who is porting u-boot in my project. Now we find almost dm cases in folder test/dm depend on SANDBOX, is it possiable to run them in local uboot console directly? A big challenge is that there are various hardware peripherals, I have no idea to handle it.

Thanks,
Treeman

[email protected]

#1 lore raw

Hi Treeman,

Quoted 7 lines · On Thu, 22 Dec 2022 at 18:20, [email protected] <[email protected]> wrote:

Hi Maintainers,
I'm an engineer who is porting u-boot in my project. Now we find almost dm cases in folder test/dm depend on SANDBOX, is it possiable to run them in local uboot console directly? A big challenge is that there are various hardware peripherals, I have no idea to handle it.

Many of the tests are designed to run on sandbox, since they use peripheral emulators. There is one board (snow) that is set up to run quite a few tests, but not those that need particular peripherals, of course.

Many boards run tests in CI using QEMU and it is possible to run those tests on a real board using the test harness.

If your board has reliable drivers and they have been tested, then there is not much point in running the unit tests. If they pass on sandbox then the logic is sound and you are really just checking for compiler bugs, which is probably not a good use of time.

I suppose you have seen the documentation [1]

Which board are you using?

Regards,
Simon

[1] https://u-boot.readthedocs.io/en/latest/develop/testing.html

#2 lore raw

Hi Simon,
Thanks for your kindly reply.
I can understand the design perpose now.
I just think the test module is a clean environment to do unit test. Since we're handling a SoC project,
we'd like to do IP verification in bare metal environment,
the test framework of u-boot is a good choice, it's clean, flexible and modularized. Many thanks to the maintainers, including you.
Maybe we can develop our own cases based on dm.

BRs,
Treeman

[email protected]

From: Simon Glass
Date: 2023-01-07 23:52
To: [email protected]
CC: u-boot
Subject: Re: Is it possiable to run dm test in local u-boot console? Hi Treeman,

Quoted 7 lines · On Thu, 22 Dec 2022 at 18:20, [email protected] <[email protected]> wrote:

Hi Maintainers,
I'm an engineer who is porting u-boot in my project. Now we find almost dm cases in folder test/dm depend on SANDBOX, is it possiable to run them in local uboot console directly? A big challenge is that there are various hardware peripherals, I have no idea to handle it.

Many of the tests are designed to run on sandbox, since they use peripheral emulators. There is one board (snow) that is set up to run quite a few tests, but not those that need particular peripherals, of course.

Many boards run tests in CI using QEMU and it is possible to run those tests on a real board using the test harness.

If your board has reliable drivers and they have been tested, then there is not much point in running the unit tests. If they pass on sandbox then the logic is sound and you are really just checking for compiler bugs, which is probably not a good use of time.

I suppose you have seen the documentation [1]

Which board are you using?

Regards,
Simon

[1] https://u-boot.readthedocs.io/en/latest/develop/testing.html

#3 lore raw

Hi Treeman,

Quoted 10 lines · On Sun, 8 Jan 2023 at 20:06, [email protected] <[email protected]> wrote:

Hi Simon,
Thanks for your kindly reply.
I can understand the design perpose now.
I just think the test module is a clean environment to do unit test. Since we're handling a SoC project,
we'd like to do IP verification in bare metal environment,
the test framework of u-boot is a good choice, it's clean, flexible and modularized. Many thanks to the maintainers, including you.
Maybe we can develop our own cases based on dm.

OK, I hope it goes well.

Regards,
Simon

Quoted 45 lines

BRs,
Treeman
________________________________
[email protected]

From: Simon Glass
Date: 2023-01-07 23:52
To: [email protected]
CC: u-boot
Subject: Re: Is it possiable to run dm test in local u-boot console? Hi Treeman,

Quoted 7 lines · On Thu, 22 Dec 2022 at 18:20, [email protected] <[email protected]> wrote:

Hi Maintainers,
I'm an engineer who is porting u-boot in my project. Now we find almost dm cases in folder test/dm depend on SANDBOX, is it possiable to run them in local uboot console directly? A big challenge is that there are various hardware peripherals, I have no idea to handle it.

Many of the tests are designed to run on sandbox, since they use peripheral emulators. There is one board (snow) that is set up to run quite a few tests, but not those that need particular peripherals, of course.

Many boards run tests in CI using QEMU and it is possible to run those tests on a real board using the test harness.

If your board has reliable drivers and they have been tested, then there is not much point in running the unit tests. If they pass on sandbox then the logic is sound and you are really just checking for compiler bugs, which is probably not a good use of time.

I suppose you have seen the documentation [1]

Which board are you using?

Regards,
Simon

[1] https://u-boot.readthedocs.io/en/latest/develop/testing.html