All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] Driver model test breakages
@ 2015-12-11  2:05 Simon Glass
  2015-12-11  5:31 ` Thomas Chou
                   ` (2 more replies)
  0 siblings, 3 replies; 28+ messages in thread
From: Simon Glass @ 2015-12-11  2:05 UTC (permalink / raw)
  To: u-boot

Hi,

The following three commits causes breakages in the driver model tests:

4efad20a      sf: Update status reg check in spi_flash_cmd_wait_ready
45b47734     net/arp: account for ARP delay, avoid duplicate packets on timeout
9961a0b6    sandbox: add a sandbox timer and basic test

Can you please take a look? You can run them with ./test/dm/test-dm.sh

The last one looks a bit complicated - I suspect it will be harder to
fix. I am going to try to come up with some ideas...

Regards,
Simon

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] Driver model test breakages
  2015-12-11  2:05 [U-Boot] Driver model test breakages Simon Glass
@ 2015-12-11  5:31 ` Thomas Chou
  2015-12-19 23:07   ` Simon Glass
  2015-12-19 23:13 ` Simon Glass
  2015-12-21 22:46 ` Joe Hershberger
  2 siblings, 1 reply; 28+ messages in thread
From: Thomas Chou @ 2015-12-11  5:31 UTC (permalink / raw)
  To: u-boot

Hi Simon,

On 2015?12?11? 10:05, Simon Glass wrote:
> Hi,
>
> The following three commits causes breakages in the driver model tests:
>
> 4efad20a      sf: Update status reg check in spi_flash_cmd_wait_ready
> 45b47734     net/arp: account for ARP delay, avoid duplicate packets on timeout
> 9961a0b6    sandbox: add a sandbox timer and basic test
>
> Can you please take a look? You can run them with ./test/dm/test-dm.sh
>
> The last one looks a bit complicated - I suspect it will be harder to
> fix. I am going to try to come up with some ideas...
>
> Regards,
> Simon
>

I didn't add a timer to test.dts. Please check if the dm timer fixed 
with this patch.
##############################################
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
index b6d9a15..2e0d320 100644
--- a/arch/sandbox/dts/test.dts
+++ b/arch/sandbox/dts/test.dts
@@ -279,6 +279,11 @@
  			0x38 8>;
  	};

+	timer {
+		compatible = "sandbox,timer";
+		clock-frequency = <1000000>;
+	};
+
  	uart0: serial {
  		compatible = "sandbox,serial";
  		u-boot,dm-pre-reloc;
################################################

My test stopped at,
Test: dm_test_net_retry

How do I bypass this?

Best regards,
Thomas

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [U-Boot] Driver model test breakages
  2015-12-11  5:31 ` Thomas Chou
@ 2015-12-19 23:07   ` Simon Glass
  0 siblings, 0 replies; 28+ messages in thread
From: Simon Glass @ 2015-12-19 23:07 UTC (permalink / raw)
  To: u-boot

Hi Thomas,

On 10 December 2015 at 22:31, Thomas Chou <thomas@wytron.com.tw> wrote:
> Hi Simon,
>
>
> On 2015?12?11? 10:05, Simon Glass wrote:
>>
>> Hi,
>>
>> The following three commits causes breakages in the driver model tests:
>>
>> 4efad20a      sf: Update status reg check in spi_flash_cmd_wait_ready
>> 45b47734     net/arp: account for ARP delay, avoid duplicate packets on
>> timeout
>> 9961a0b6    sandbox: add a sandbox timer and basic test
>>
>> Can you please take a look? You can run them with ./test/dm/test-dm.sh
>>
>> The last one looks a bit complicated - I suspect it will be harder to
>> fix. I am going to try to come up with some ideas...
>>
>> Regards,
>> Simon
>>
>
> I didn't add a timer to test.dts. Please check if the dm timer fixed with
> this patch.
> ##############################################
> diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
> index b6d9a15..2e0d320 100644
> --- a/arch/sandbox/dts/test.dts
> +++ b/arch/sandbox/dts/test.dts
> @@ -279,6 +279,11 @@
>                         0x38 8>;
>         };
>
> +       timer {
> +               compatible = "sandbox,timer";
> +               clock-frequency = <1000000>;
> +       };
> +
>         uart0: serial {
>                 compatible = "sandbox,serial";
>                 u-boot,dm-pre-reloc;
> ################################################
>
> My test stopped at,
> Test: dm_test_net_retry
>
> How do I bypass this?

You can comment out the test declaration in test/dm/eth.c.

Regards,
Simon

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] Driver model test breakages
  2015-12-11  2:05 [U-Boot] Driver model test breakages Simon Glass
  2015-12-11  5:31 ` Thomas Chou
@ 2015-12-19 23:13 ` Simon Glass
  2015-12-21 22:14   ` Joe Hershberger
  2015-12-21 22:46 ` Joe Hershberger
  2 siblings, 1 reply; 28+ messages in thread
From: Simon Glass @ 2015-12-19 23:13 UTC (permalink / raw)
  To: u-boot

+Thomas

Hi,

On 10 December 2015 at 19:05, Simon Glass <sjg@chromium.org> wrote:
> Hi,
>

I've pushed a few patches to u-boot-dm/next.

> The following three commits causes breakages in the driver model tests:
>
> 4efad20a      sf: Update status reg check in spi_flash_cmd_wait_ready

Jagan this is still broken - any ideas please?

> 45b47734     net/arp: account for ARP delay, avoid duplicate packets on timeout

This is still broken - Joe do you have any ideas? The release is coming soonish.

> 9961a0b6    sandbox: add a sandbox timer and basic test

This seems to be fixed - thanks Thomas!

>
> Can you please take a look? You can run them with ./test/dm/test-dm.sh
>

Regards,
Simon

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] Driver model test breakages
  2015-12-19 23:13 ` Simon Glass
@ 2015-12-21 22:14   ` Joe Hershberger
  2015-12-21 22:17     ` Joe Hershberger
  0 siblings, 1 reply; 28+ messages in thread
From: Joe Hershberger @ 2015-12-21 22:14 UTC (permalink / raw)
  To: u-boot

>> 45b47734     net/arp: account for ARP delay, avoid duplicate packets on timeout
>
> This is still broken - Joe do you have any ideas? The release is coming soonish.

This was the first commit that caused the timeout to not get skipped,
however it would time out and proceed.

What caused the test to start hanging indefinitely is this commit:

159fb22 (sandbox: add a sandbox timer and basic test)

I'm still looking into why.

-Joe

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] Driver model test breakages
  2015-12-21 22:14   ` Joe Hershberger
@ 2015-12-21 22:17     ` Joe Hershberger
  2015-12-21 22:25       ` Joe Hershberger
  2015-12-21 23:01       ` Simon Glass
  0 siblings, 2 replies; 28+ messages in thread
From: Joe Hershberger @ 2015-12-21 22:17 UTC (permalink / raw)
  To: u-boot

On Mon, Dec 21, 2015 at 4:14 PM, Joe Hershberger
<joe.hershberger@gmail.com> wrote:
>>> 45b47734     net/arp: account for ARP delay, avoid duplicate packets on timeout
>>
>> This is still broken - Joe do you have any ideas? The release is coming soonish.
>
> This was the first commit that caused the timeout to not get skipped,
> however it would time out and proceed.
>
> What caused the test to start hanging indefinitely is this commit:
>
> 159fb22 (sandbox: add a sandbox timer and basic test)

That's actually the incorrect hash - should be 9961a0b

> I'm still looking into why.
>
> -Joe

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] Driver model test breakages
  2015-12-21 22:17     ` Joe Hershberger
@ 2015-12-21 22:25       ` Joe Hershberger
  2015-12-21 23:01       ` Simon Glass
  1 sibling, 0 replies; 28+ messages in thread
From: Joe Hershberger @ 2015-12-21 22:25 UTC (permalink / raw)
  To: u-boot

Hi Simon and Thomas,

On Mon, Dec 21, 2015 at 4:17 PM, Joe Hershberger
<joe.hershberger@gmail.com> wrote:
> On Mon, Dec 21, 2015 at 4:14 PM, Joe Hershberger
> <joe.hershberger@gmail.com> wrote:
>>>> 45b47734     net/arp: account for ARP delay, avoid duplicate packets on timeout
>>>
>>> This is still broken - Joe do you have any ideas? The release is coming soonish.
>>
>> This was the first commit that caused the timeout to not get skipped,
>> however it would time out and proceed.
>>
>> What caused the test to start hanging indefinitely is this commit:
>>
>> 159fb22 (sandbox: add a sandbox timer and basic test)
>
> That's actually the incorrect hash - should be 9961a0b
>
>> I'm still looking into why.

It seems to be the same repair needed for the timer test. Simply need
to add the timer to test.dts.

-Joe

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] Driver model test breakages
  2015-12-11  2:05 [U-Boot] Driver model test breakages Simon Glass
  2015-12-11  5:31 ` Thomas Chou
  2015-12-19 23:13 ` Simon Glass
@ 2015-12-21 22:46 ` Joe Hershberger
  2015-12-22  2:12   ` Bin Meng
  2 siblings, 1 reply; 28+ messages in thread
From: Joe Hershberger @ 2015-12-21 22:46 UTC (permalink / raw)
  To: u-boot

Hi Simon and Bin

On Thu, Dec 10, 2015 at 8:05 PM, Simon Glass <sjg@chromium.org> wrote:
> Hi,
>
> The following three commits causes breakages in the driver model tests:
>
> 4efad20a      sf: Update status reg check in spi_flash_cmd_wait_ready
> 45b47734     net/arp: account for ARP delay, avoid duplicate packets on timeout
> 9961a0b6    sandbox: add a sandbox timer and basic test
>
> Can you please take a look? You can run them with ./test/dm/test-dm.sh

It appears that ac1d313 (net: eth: Check return value in various
places) breaks the eth_rotate test.

Looking into it. Bin, do you have any ideas?

-Joe

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] Driver model test breakages
  2015-12-21 22:17     ` Joe Hershberger
  2015-12-21 22:25       ` Joe Hershberger
@ 2015-12-21 23:01       ` Simon Glass
  1 sibling, 0 replies; 28+ messages in thread
From: Simon Glass @ 2015-12-21 23:01 UTC (permalink / raw)
  To: u-boot

Hi Joe,

On 21 December 2015 at 15:17, Joe Hershberger <joe.hershberger@gmail.com> wrote:
> On Mon, Dec 21, 2015 at 4:14 PM, Joe Hershberger
> <joe.hershberger@gmail.com> wrote:
>>>> 45b47734     net/arp: account for ARP delay, avoid duplicate packets on timeout
>>>
>>> This is still broken - Joe do you have any ideas? The release is coming soonish.
>>
>> This was the first commit that caused the timeout to not get skipped,
>> however it would time out and proceed.
>>
>> What caused the test to start hanging indefinitely is this commit:
>>
>> 159fb22 (sandbox: add a sandbox timer and basic test)
>
> That's actually the incorrect hash - should be 9961a0b
>
>> I'm still looking into why.

OK, it could be fixed in u-boot-dm/master - there was no timer enabled
in sandbox!

Regards,
Simon

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] Driver model test breakages
  2015-12-21 22:46 ` Joe Hershberger
@ 2015-12-22  2:12   ` Bin Meng
  2015-12-22  2:32     ` Joe Hershberger
  0 siblings, 1 reply; 28+ messages in thread
From: Bin Meng @ 2015-12-22  2:12 UTC (permalink / raw)
  To: u-boot

Hi Joe, Simon,

On Tue, Dec 22, 2015 at 6:46 AM, Joe Hershberger
<joe.hershberger@gmail.com> wrote:
> Hi Simon and Bin
>
> On Thu, Dec 10, 2015 at 8:05 PM, Simon Glass <sjg@chromium.org> wrote:
>> Hi,
>>
>> The following three commits causes breakages in the driver model tests:
>>
>> 4efad20a      sf: Update status reg check in spi_flash_cmd_wait_ready
>> 45b47734     net/arp: account for ARP delay, avoid duplicate packets on timeout
>> 9961a0b6    sandbox: add a sandbox timer and basic test
>>
>> Can you please take a look? You can run them with ./test/dm/test-dm.sh
>
> It appears that ac1d313 (net: eth: Check return value in various
> places) breaks the eth_rotate test.
>
> Looking into it. Bin, do you have any ideas?

I will look into this.

BTW: I applied the following two patches [1][2] to the tree based on
dm/master, and got a segmentation fault:

Test: dm_test_usb_keyb
./test/dm/test-dm.sh: line 14: 24902 Segmentation fault
./sandbox/u-boot -d ./sandbox/arch/sandbox/dts/test.dtb -c "ut dm"

[1] http://patchwork.ozlabs.org/patch/555597/
[2] http://patchwork.ozlabs.org/patch/559783/

Regards,
Bin

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] Driver model test breakages
  2015-12-22  2:12   ` Bin Meng
@ 2015-12-22  2:32     ` Joe Hershberger
  2015-12-22  2:36       ` Bin Meng
  0 siblings, 1 reply; 28+ messages in thread
From: Joe Hershberger @ 2015-12-22  2:32 UTC (permalink / raw)
  To: u-boot

Hi Bin,

On Mon, Dec 21, 2015 at 8:12 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
> Hi Joe, Simon,
>
> On Tue, Dec 22, 2015 at 6:46 AM, Joe Hershberger
> <joe.hershberger@gmail.com> wrote:
>> Hi Simon and Bin
>>
>> On Thu, Dec 10, 2015 at 8:05 PM, Simon Glass <sjg@chromium.org> wrote:
>>> Hi,
>>>
>>> The following three commits causes breakages in the driver model tests:
>>>
>>> 4efad20a      sf: Update status reg check in spi_flash_cmd_wait_ready
>>> 45b47734     net/arp: account for ARP delay, avoid duplicate packets on timeout
>>> 9961a0b6    sandbox: add a sandbox timer and basic test
>>>
>>> Can you please take a look? You can run them with ./test/dm/test-dm.sh
>>
>> It appears that ac1d313 (net: eth: Check return value in various
>> places) breaks the eth_rotate test.
>>
>> Looking into it. Bin, do you have any ideas?
>
> I will look into this.
>
> BTW: I applied the following two patches [1][2] to the tree based on
> dm/master, and got a segmentation fault:
>
> Test: dm_test_usb_keyb
> ./test/dm/test-dm.sh: line 14: 24902 Segmentation fault
> ./sandbox/u-boot -d ./sandbox/arch/sandbox/dts/test.dtb -c "ut dm"
>
> [1] http://patchwork.ozlabs.org/patch/555597/
> [2] http://patchwork.ozlabs.org/patch/559783/

Interesting. I haven't tested on top of dm/master, but I tested it
based on origin/master and the issue is resolved.

-Joe

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] Driver model test breakages
  2015-12-22  2:32     ` Joe Hershberger
@ 2015-12-22  2:36       ` Bin Meng
  2015-12-22  2:39         ` Joe Hershberger
  2015-12-22  2:46         ` Joe Hershberger
  0 siblings, 2 replies; 28+ messages in thread
From: Bin Meng @ 2015-12-22  2:36 UTC (permalink / raw)
  To: u-boot

Hi Joe,

On Tue, Dec 22, 2015 at 10:32 AM, Joe Hershberger
<joe.hershberger@gmail.com> wrote:
> Hi Bin,
>
> On Mon, Dec 21, 2015 at 8:12 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>> Hi Joe, Simon,
>>
>> On Tue, Dec 22, 2015 at 6:46 AM, Joe Hershberger
>> <joe.hershberger@gmail.com> wrote:
>>> Hi Simon and Bin
>>>
>>> On Thu, Dec 10, 2015 at 8:05 PM, Simon Glass <sjg@chromium.org> wrote:
>>>> Hi,
>>>>
>>>> The following three commits causes breakages in the driver model tests:
>>>>
>>>> 4efad20a      sf: Update status reg check in spi_flash_cmd_wait_ready
>>>> 45b47734     net/arp: account for ARP delay, avoid duplicate packets on timeout
>>>> 9961a0b6    sandbox: add a sandbox timer and basic test
>>>>
>>>> Can you please take a look? You can run them with ./test/dm/test-dm.sh
>>>
>>> It appears that ac1d313 (net: eth: Check return value in various
>>> places) breaks the eth_rotate test.
>>>
>>> Looking into it. Bin, do you have any ideas?
>>
>> I will look into this.
>>
>> BTW: I applied the following two patches [1][2] to the tree based on
>> dm/master, and got a segmentation fault:
>>
>> Test: dm_test_usb_keyb
>> ./test/dm/test-dm.sh: line 14: 24902 Segmentation fault
>> ./sandbox/u-boot -d ./sandbox/arch/sandbox/dts/test.dtb -c "ut dm"
>>
>> [1] http://patchwork.ozlabs.org/patch/555597/
>> [2] http://patchwork.ozlabs.org/patch/559783/
>
> Interesting. I haven't tested on top of dm/master, but I tested it
> based on origin/master and the issue is resolved.
>

Which issue is resolved? I just tested on top of origin/master with
the above two patches, still the same segmentation fault.

> -Joe

Regards,
Bin

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] Driver model test breakages
  2015-12-22  2:36       ` Bin Meng
@ 2015-12-22  2:39         ` Joe Hershberger
  2015-12-22  3:00           ` Bin Meng
  2015-12-22  2:46         ` Joe Hershberger
  1 sibling, 1 reply; 28+ messages in thread
From: Joe Hershberger @ 2015-12-22  2:39 UTC (permalink / raw)
  To: u-boot

On Mon, Dec 21, 2015 at 8:36 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
> Hi Joe,
>
> On Tue, Dec 22, 2015 at 10:32 AM, Joe Hershberger
> <joe.hershberger@gmail.com> wrote:
>> Hi Bin,
>>
>> On Mon, Dec 21, 2015 at 8:12 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>> Hi Joe, Simon,
>>>
>>> On Tue, Dec 22, 2015 at 6:46 AM, Joe Hershberger
>>> <joe.hershberger@gmail.com> wrote:
>>>> Hi Simon and Bin
>>>>
>>>> On Thu, Dec 10, 2015 at 8:05 PM, Simon Glass <sjg@chromium.org> wrote:
>>>>> Hi,
>>>>>
>>>>> The following three commits causes breakages in the driver model tests:
>>>>>
>>>>> 4efad20a      sf: Update status reg check in spi_flash_cmd_wait_ready
>>>>> 45b47734     net/arp: account for ARP delay, avoid duplicate packets on timeout
>>>>> 9961a0b6    sandbox: add a sandbox timer and basic test
>>>>>
>>>>> Can you please take a look? You can run them with ./test/dm/test-dm.sh
>>>>
>>>> It appears that ac1d313 (net: eth: Check return value in various
>>>> places) breaks the eth_rotate test.
>>>>
>>>> Looking into it. Bin, do you have any ideas?
>>>
>>> I will look into this.
>>>
>>> BTW: I applied the following two patches [1][2] to the tree based on
>>> dm/master, and got a segmentation fault:
>>>
>>> Test: dm_test_usb_keyb
>>> ./test/dm/test-dm.sh: line 14: 24902 Segmentation fault
>>> ./sandbox/u-boot -d ./sandbox/arch/sandbox/dts/test.dtb -c "ut dm"
>>>
>>> [1] http://patchwork.ozlabs.org/patch/555597/
>>> [2] http://patchwork.ozlabs.org/patch/559783/
>>
>> Interesting. I haven't tested on top of dm/master, but I tested it
>> based on origin/master and the issue is resolved.
>>
>
> Which issue is resolved? I just tested on top of origin/master with
> the above two patches, still the same segmentation fault.

The net_retry dm test hang that Simon reported.

-Joe

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] Driver model test breakages
  2015-12-22  2:36       ` Bin Meng
  2015-12-22  2:39         ` Joe Hershberger
@ 2015-12-22  2:46         ` Joe Hershberger
  1 sibling, 0 replies; 28+ messages in thread
From: Joe Hershberger @ 2015-12-22  2:46 UTC (permalink / raw)
  To: u-boot

Hi Bin,

On Mon, Dec 21, 2015 at 8:36 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
> Hi Joe,
>
> On Tue, Dec 22, 2015 at 10:32 AM, Joe Hershberger
> <joe.hershberger@gmail.com> wrote:
>> Hi Bin,
>>
>> On Mon, Dec 21, 2015 at 8:12 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>> Hi Joe, Simon,
>>>
>>> On Tue, Dec 22, 2015 at 6:46 AM, Joe Hershberger
>>> <joe.hershberger@gmail.com> wrote:
>>>> Hi Simon and Bin
>>>>
>>>> On Thu, Dec 10, 2015 at 8:05 PM, Simon Glass <sjg@chromium.org> wrote:
>>>>> Hi,
>>>>>
>>>>> The following three commits causes breakages in the driver model tests:
>>>>>
>>>>> 4efad20a      sf: Update status reg check in spi_flash_cmd_wait_ready
>>>>> 45b47734     net/arp: account for ARP delay, avoid duplicate packets on timeout
>>>>> 9961a0b6    sandbox: add a sandbox timer and basic test
>>>>>
>>>>> Can you please take a look? You can run them with ./test/dm/test-dm.sh
>>>>
>>>> It appears that ac1d313 (net: eth: Check return value in various
>>>> places) breaks the eth_rotate test.
>>>>
>>>> Looking into it. Bin, do you have any ideas?
>>>
>>> I will look into this.
>>>
>>> BTW: I applied the following two patches [1][2] to the tree based on
>>> dm/master, and got a segmentation fault:
>>>
>>> Test: dm_test_usb_keyb
>>> ./test/dm/test-dm.sh: line 14: 24902 Segmentation fault
>>> ./sandbox/u-boot -d ./sandbox/arch/sandbox/dts/test.dtb -c "ut dm"
>>>
>>> [1] http://patchwork.ozlabs.org/patch/555597/
>>> [2] http://patchwork.ozlabs.org/patch/559783/
>>
>> Interesting. I haven't tested on top of dm/master, but I tested it
>> based on origin/master and the issue is resolved.
>>
>
> Which issue is resolved? I just tested on top of origin/master with
> the above two patches, still the same segmentation fault.

I also see the seg fault now.  I'll track down the source.

-Joe

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] Driver model test breakages
  2015-12-22  2:39         ` Joe Hershberger
@ 2015-12-22  3:00           ` Bin Meng
  2015-12-22  3:08             ` Joe Hershberger
  0 siblings, 1 reply; 28+ messages in thread
From: Bin Meng @ 2015-12-22  3:00 UTC (permalink / raw)
  To: u-boot

Hi Joe,

On Tue, Dec 22, 2015 at 10:39 AM, Joe Hershberger
<joe.hershberger@gmail.com> wrote:
> On Mon, Dec 21, 2015 at 8:36 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>> Hi Joe,
>>
>> On Tue, Dec 22, 2015 at 10:32 AM, Joe Hershberger
>> <joe.hershberger@gmail.com> wrote:
>>> Hi Bin,
>>>
>>> On Mon, Dec 21, 2015 at 8:12 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>> Hi Joe, Simon,
>>>>
>>>> On Tue, Dec 22, 2015 at 6:46 AM, Joe Hershberger
>>>> <joe.hershberger@gmail.com> wrote:
>>>>> Hi Simon and Bin
>>>>>
>>>>> On Thu, Dec 10, 2015 at 8:05 PM, Simon Glass <sjg@chromium.org> wrote:
>>>>>> Hi,
>>>>>>
>>>>>> The following three commits causes breakages in the driver model tests:
>>>>>>
>>>>>> 4efad20a      sf: Update status reg check in spi_flash_cmd_wait_ready
>>>>>> 45b47734     net/arp: account for ARP delay, avoid duplicate packets on timeout
>>>>>> 9961a0b6    sandbox: add a sandbox timer and basic test
>>>>>>
>>>>>> Can you please take a look? You can run them with ./test/dm/test-dm.sh
>>>>>
>>>>> It appears that ac1d313 (net: eth: Check return value in various
>>>>> places) breaks the eth_rotate test.
>>>>>
>>>>> Looking into it. Bin, do you have any ideas?
>>>>
>>>> I will look into this.
>>>>
>>>> BTW: I applied the following two patches [1][2] to the tree based on
>>>> dm/master, and got a segmentation fault:
>>>>
>>>> Test: dm_test_usb_keyb
>>>> ./test/dm/test-dm.sh: line 14: 24902 Segmentation fault
>>>> ./sandbox/u-boot -d ./sandbox/arch/sandbox/dts/test.dtb -c "ut dm"
>>>>
>>>> [1] http://patchwork.ozlabs.org/patch/555597/
>>>> [2] http://patchwork.ozlabs.org/patch/559783/
>>>
>>> Interesting. I haven't tested on top of dm/master, but I tested it
>>> based on origin/master and the issue is resolved.
>>>
>>
>> Which issue is resolved? I just tested on top of origin/master with
>> the above two patches, still the same segmentation fault.
>
> The net_retry dm test hang that Simon reported.
>

The segmentation fault happens after "Test: dm_test_usb_keyb". It
seems to be a new issue.

I am looking into _dm_test_eth_rotate1 failure, but I don't understand
the comments here.

/* If ethrotate is no, then we should fail on a bad MAC */
setenv("ethact", "eth at 10004000");
setenv("ethrotate", "no");
ut_asserteq(-EINVAL, net_loop(PING));
ut_asserteq_str("eth at 10004000", getenv("ethact"));

Does 'bad MAC' mean no MAC address? For eth at 10004000, it does have a
MAC address defined in the env variable in sandbox.h.

I also tested manually with the same test sequence from U-Boot shell,
it can pass. I am still looking into it.

=> setenv ethact eth at 10004000;setenv ethrotate no;ping 1.1.1.1
Using eth at 10004000 device
host 1.1.1.1 is alive
=> printenv ethact
ethact=eth at 10004000

Regards,
Bin

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] Driver model test breakages
  2015-12-22  3:00           ` Bin Meng
@ 2015-12-22  3:08             ` Joe Hershberger
  2015-12-22  3:17               ` Joe Hershberger
  2015-12-22  4:04               ` Bin Meng
  0 siblings, 2 replies; 28+ messages in thread
From: Joe Hershberger @ 2015-12-22  3:08 UTC (permalink / raw)
  To: u-boot

Hi Bin,

On Mon, Dec 21, 2015 at 9:00 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
> Hi Joe,
>
> On Tue, Dec 22, 2015 at 10:39 AM, Joe Hershberger
> <joe.hershberger@gmail.com> wrote:
>> On Mon, Dec 21, 2015 at 8:36 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>> Hi Joe,
>>>
>>> On Tue, Dec 22, 2015 at 10:32 AM, Joe Hershberger
>>> <joe.hershberger@gmail.com> wrote:
>>>> Hi Bin,
>>>>
>>>> On Mon, Dec 21, 2015 at 8:12 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>> Hi Joe, Simon,
>>>>>
>>>>> On Tue, Dec 22, 2015 at 6:46 AM, Joe Hershberger
>>>>> <joe.hershberger@gmail.com> wrote:
>>>>>> Hi Simon and Bin
>>>>>>
>>>>>> On Thu, Dec 10, 2015 at 8:05 PM, Simon Glass <sjg@chromium.org> wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> The following three commits causes breakages in the driver model tests:
>>>>>>>
>>>>>>> 4efad20a      sf: Update status reg check in spi_flash_cmd_wait_ready
>>>>>>> 45b47734     net/arp: account for ARP delay, avoid duplicate packets on timeout
>>>>>>> 9961a0b6    sandbox: add a sandbox timer and basic test
>>>>>>>
>>>>>>> Can you please take a look? You can run them with ./test/dm/test-dm.sh
>>>>>>
>>>>>> It appears that ac1d313 (net: eth: Check return value in various
>>>>>> places) breaks the eth_rotate test.
>>>>>>
>>>>>> Looking into it. Bin, do you have any ideas?
>>>>>
>>>>> I will look into this.
>>>>>
>>>>> BTW: I applied the following two patches [1][2] to the tree based on
>>>>> dm/master, and got a segmentation fault:
>>>>>
>>>>> Test: dm_test_usb_keyb
>>>>> ./test/dm/test-dm.sh: line 14: 24902 Segmentation fault
>>>>> ./sandbox/u-boot -d ./sandbox/arch/sandbox/dts/test.dtb -c "ut dm"
>>>>>
>>>>> [1] http://patchwork.ozlabs.org/patch/555597/
>>>>> [2] http://patchwork.ozlabs.org/patch/559783/
>>>>
>>>> Interesting. I haven't tested on top of dm/master, but I tested it
>>>> based on origin/master and the issue is resolved.
>>>>
>>>
>>> Which issue is resolved? I just tested on top of origin/master with
>>> the above two patches, still the same segmentation fault.
>>
>> The net_retry dm test hang that Simon reported.
>>
>
> The segmentation fault happens after "Test: dm_test_usb_keyb". It
> seems to be a new issue.

I agree it's a new issue that was masked by the net_retry hang.

> I am looking into _dm_test_eth_rotate1 failure, but I don't understand
> the comments here.
>
> /* If ethrotate is no, then we should fail on a bad MAC */
> setenv("ethact", "eth at 10004000");
> setenv("ethrotate", "no");
> ut_asserteq(-EINVAL, net_loop(PING));
> ut_asserteq_str("eth at 10004000", getenv("ethact"));
>
> Does 'bad MAC' mean no MAC address? For eth at 10004000, it does have a
> MAC address defined in the env variable in sandbox.h.

I think if you look at dm_test_eth_rotate(), the eth1addr is deleted
before the test. Later, ethaddr is deleted before the second part of
the test.

> I also tested manually with the same test sequence from U-Boot shell,
> it can pass. I am still looking into it.

It's not as though it hangs or something, but it now fails to return
the error code that it used to before your patch.

Test: dm_test_eth_rotate
../test/dm/eth.c:160, _dm_test_eth_rotate1(): -EINVAL ==
net_loop(PING): Expected -22, got 0

Thanks,
-Joe

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] Driver model test breakages
  2015-12-22  3:08             ` Joe Hershberger
@ 2015-12-22  3:17               ` Joe Hershberger
  2015-12-22 19:14                 ` Joe Hershberger
  2015-12-22  4:04               ` Bin Meng
  1 sibling, 1 reply; 28+ messages in thread
From: Joe Hershberger @ 2015-12-22  3:17 UTC (permalink / raw)
  To: u-boot

Hi Bin and Simon,

On Mon, Dec 21, 2015 at 9:08 PM, Joe Hershberger
<joe.hershberger@gmail.com> wrote:
> Hi Bin,
>
> On Mon, Dec 21, 2015 at 9:00 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>> Hi Joe,
>>
>> On Tue, Dec 22, 2015 at 10:39 AM, Joe Hershberger
>> <joe.hershberger@gmail.com> wrote:
>>> On Mon, Dec 21, 2015 at 8:36 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>> Hi Joe,
>>>>
>>>> On Tue, Dec 22, 2015 at 10:32 AM, Joe Hershberger
>>>> <joe.hershberger@gmail.com> wrote:
>>>>> Hi Bin,
>>>>>
>>>>> On Mon, Dec 21, 2015 at 8:12 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>>> Hi Joe, Simon,
>>>>>>
>>>>>> On Tue, Dec 22, 2015 at 6:46 AM, Joe Hershberger
>>>>>> <joe.hershberger@gmail.com> wrote:
>>>>>>> Hi Simon and Bin
>>>>>>>
>>>>>>> On Thu, Dec 10, 2015 at 8:05 PM, Simon Glass <sjg@chromium.org> wrote:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> The following three commits causes breakages in the driver model tests:
>>>>>>>>
>>>>>>>> 4efad20a      sf: Update status reg check in spi_flash_cmd_wait_ready
>>>>>>>> 45b47734     net/arp: account for ARP delay, avoid duplicate packets on timeout
>>>>>>>> 9961a0b6    sandbox: add a sandbox timer and basic test
>>>>>>>>
>>>>>>>> Can you please take a look? You can run them with ./test/dm/test-dm.sh
>>>>>>>
>>>>>>> It appears that ac1d313 (net: eth: Check return value in various
>>>>>>> places) breaks the eth_rotate test.
>>>>>>>
>>>>>>> Looking into it. Bin, do you have any ideas?
>>>>>>
>>>>>> I will look into this.
>>>>>>
>>>>>> BTW: I applied the following two patches [1][2] to the tree based on
>>>>>> dm/master, and got a segmentation fault:
>>>>>>
>>>>>> Test: dm_test_usb_keyb
>>>>>> ./test/dm/test-dm.sh: line 14: 24902 Segmentation fault
>>>>>> ./sandbox/u-boot -d ./sandbox/arch/sandbox/dts/test.dtb -c "ut dm"
>>>>>>
>>>>>> [1] http://patchwork.ozlabs.org/patch/555597/
>>>>>> [2] http://patchwork.ozlabs.org/patch/559783/
>>>>>
>>>>> Interesting. I haven't tested on top of dm/master, but I tested it
>>>>> based on origin/master and the issue is resolved.
>>>>>
>>>>
>>>> Which issue is resolved? I just tested on top of origin/master with
>>>> the above two patches, still the same segmentation fault.
>>>
>>> The net_retry dm test hang that Simon reported.
>>>
>>
>> The segmentation fault happens after "Test: dm_test_usb_keyb". It
>> seems to be a new issue.
>
> I agree it's a new issue that was masked by the net_retry hang.

It appears, not too surprisingly, that d77a7d8 (dm: test: usb:
sandbox: Add keyboard tests for sandbox) is the source of the seg
fault.

Simon?

>> I am looking into _dm_test_eth_rotate1 failure, but I don't understand
>> the comments here.
>>
>> /* If ethrotate is no, then we should fail on a bad MAC */
>> setenv("ethact", "eth at 10004000");
>> setenv("ethrotate", "no");
>> ut_asserteq(-EINVAL, net_loop(PING));
>> ut_asserteq_str("eth at 10004000", getenv("ethact"));
>>
>> Does 'bad MAC' mean no MAC address? For eth at 10004000, it does have a
>> MAC address defined in the env variable in sandbox.h.
>
> I think if you look at dm_test_eth_rotate(), the eth1addr is deleted
> before the test. Later, ethaddr is deleted before the second part of
> the test.
>
>> I also tested manually with the same test sequence from U-Boot shell,
>> it can pass. I am still looking into it.
>
> It's not as though it hangs or something, but it now fails to return
> the error code that it used to before your patch.
>
> Test: dm_test_eth_rotate
> ../test/dm/eth.c:160, _dm_test_eth_rotate1(): -EINVAL ==
> net_loop(PING): Expected -22, got 0
>
> Thanks,
> -Joe

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] Driver model test breakages
  2015-12-22  3:08             ` Joe Hershberger
  2015-12-22  3:17               ` Joe Hershberger
@ 2015-12-22  4:04               ` Bin Meng
  2015-12-22  4:50                 ` Bin Meng
  1 sibling, 1 reply; 28+ messages in thread
From: Bin Meng @ 2015-12-22  4:04 UTC (permalink / raw)
  To: u-boot

Hi Joe,

On Tue, Dec 22, 2015 at 11:08 AM, Joe Hershberger
<joe.hershberger@gmail.com> wrote:
> Hi Bin,
>
> On Mon, Dec 21, 2015 at 9:00 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>> Hi Joe,
>>
>> On Tue, Dec 22, 2015 at 10:39 AM, Joe Hershberger
>> <joe.hershberger@gmail.com> wrote:
>>> On Mon, Dec 21, 2015 at 8:36 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>> Hi Joe,
>>>>
>>>> On Tue, Dec 22, 2015 at 10:32 AM, Joe Hershberger
>>>> <joe.hershberger@gmail.com> wrote:
>>>>> Hi Bin,
>>>>>
>>>>> On Mon, Dec 21, 2015 at 8:12 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>>> Hi Joe, Simon,
>>>>>>
>>>>>> On Tue, Dec 22, 2015 at 6:46 AM, Joe Hershberger
>>>>>> <joe.hershberger@gmail.com> wrote:
>>>>>>> Hi Simon and Bin
>>>>>>>
>>>>>>> On Thu, Dec 10, 2015 at 8:05 PM, Simon Glass <sjg@chromium.org> wrote:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> The following three commits causes breakages in the driver model tests:
>>>>>>>>
>>>>>>>> 4efad20a      sf: Update status reg check in spi_flash_cmd_wait_ready
>>>>>>>> 45b47734     net/arp: account for ARP delay, avoid duplicate packets on timeout
>>>>>>>> 9961a0b6    sandbox: add a sandbox timer and basic test
>>>>>>>>
>>>>>>>> Can you please take a look? You can run them with ./test/dm/test-dm.sh
>>>>>>>
>>>>>>> It appears that ac1d313 (net: eth: Check return value in various
>>>>>>> places) breaks the eth_rotate test.
>>>>>>>
>>>>>>> Looking into it. Bin, do you have any ideas?
>>>>>>
>>>>>> I will look into this.
>>>>>>
>>>>>> BTW: I applied the following two patches [1][2] to the tree based on
>>>>>> dm/master, and got a segmentation fault:
>>>>>>
>>>>>> Test: dm_test_usb_keyb
>>>>>> ./test/dm/test-dm.sh: line 14: 24902 Segmentation fault
>>>>>> ./sandbox/u-boot -d ./sandbox/arch/sandbox/dts/test.dtb -c "ut dm"
>>>>>>
>>>>>> [1] http://patchwork.ozlabs.org/patch/555597/
>>>>>> [2] http://patchwork.ozlabs.org/patch/559783/
>>>>>
>>>>> Interesting. I haven't tested on top of dm/master, but I tested it
>>>>> based on origin/master and the issue is resolved.
>>>>>
>>>>
>>>> Which issue is resolved? I just tested on top of origin/master with
>>>> the above two patches, still the same segmentation fault.
>>>
>>> The net_retry dm test hang that Simon reported.
>>>
>>
>> The segmentation fault happens after "Test: dm_test_usb_keyb". It
>> seems to be a new issue.
>
> I agree it's a new issue that was masked by the net_retry hang.
>
>> I am looking into _dm_test_eth_rotate1 failure, but I don't understand
>> the comments here.
>>
>> /* If ethrotate is no, then we should fail on a bad MAC */
>> setenv("ethact", "eth at 10004000");
>> setenv("ethrotate", "no");
>> ut_asserteq(-EINVAL, net_loop(PING));
>> ut_asserteq_str("eth at 10004000", getenv("ethact"));
>>
>> Does 'bad MAC' mean no MAC address? For eth at 10004000, it does have a
>> MAC address defined in the env variable in sandbox.h.
>
> I think if you look at dm_test_eth_rotate(), the eth1addr is deleted
> before the test. Later, ethaddr is deleted before the second part of
> the test.
>
>> I also tested manually with the same test sequence from U-Boot shell,
>> it can pass. I am still looking into it.
>
> It's not as though it hangs or something, but it now fails to return
> the error code that it used to before your patch.
>
> Test: dm_test_eth_rotate
> ../test/dm/eth.c:160, _dm_test_eth_rotate1(): -EINVAL ==
> net_loop(PING): Expected -22, got 0
>

During debug I've noticed another strange issue:

Sometimes the sandbox's setenv() does not successfully set the
environment variable to the expected value. This occurs from time to
time, even with the same u-boot image. Do you have any idea about
this?

Regards,
Bin

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] Driver model test breakages
  2015-12-22  4:04               ` Bin Meng
@ 2015-12-22  4:50                 ` Bin Meng
  2015-12-22  6:43                   ` Bin Meng
  0 siblings, 1 reply; 28+ messages in thread
From: Bin Meng @ 2015-12-22  4:50 UTC (permalink / raw)
  To: u-boot

On Tue, Dec 22, 2015 at 12:04 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
> Hi Joe,
>
> On Tue, Dec 22, 2015 at 11:08 AM, Joe Hershberger
> <joe.hershberger@gmail.com> wrote:
>> Hi Bin,
>>
>> On Mon, Dec 21, 2015 at 9:00 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>> Hi Joe,
>>>
>>> On Tue, Dec 22, 2015 at 10:39 AM, Joe Hershberger
>>> <joe.hershberger@gmail.com> wrote:
>>>> On Mon, Dec 21, 2015 at 8:36 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>> Hi Joe,
>>>>>
>>>>> On Tue, Dec 22, 2015 at 10:32 AM, Joe Hershberger
>>>>> <joe.hershberger@gmail.com> wrote:
>>>>>> Hi Bin,
>>>>>>
>>>>>> On Mon, Dec 21, 2015 at 8:12 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>>>> Hi Joe, Simon,
>>>>>>>
>>>>>>> On Tue, Dec 22, 2015 at 6:46 AM, Joe Hershberger
>>>>>>> <joe.hershberger@gmail.com> wrote:
>>>>>>>> Hi Simon and Bin
>>>>>>>>
>>>>>>>> On Thu, Dec 10, 2015 at 8:05 PM, Simon Glass <sjg@chromium.org> wrote:
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> The following three commits causes breakages in the driver model tests:
>>>>>>>>>
>>>>>>>>> 4efad20a      sf: Update status reg check in spi_flash_cmd_wait_ready
>>>>>>>>> 45b47734     net/arp: account for ARP delay, avoid duplicate packets on timeout
>>>>>>>>> 9961a0b6    sandbox: add a sandbox timer and basic test
>>>>>>>>>
>>>>>>>>> Can you please take a look? You can run them with ./test/dm/test-dm.sh
>>>>>>>>
>>>>>>>> It appears that ac1d313 (net: eth: Check return value in various
>>>>>>>> places) breaks the eth_rotate test.
>>>>>>>>
>>>>>>>> Looking into it. Bin, do you have any ideas?
>>>>>>>
>>>>>>> I will look into this.
>>>>>>>
>>>>>>> BTW: I applied the following two patches [1][2] to the tree based on
>>>>>>> dm/master, and got a segmentation fault:
>>>>>>>
>>>>>>> Test: dm_test_usb_keyb
>>>>>>> ./test/dm/test-dm.sh: line 14: 24902 Segmentation fault
>>>>>>> ./sandbox/u-boot -d ./sandbox/arch/sandbox/dts/test.dtb -c "ut dm"
>>>>>>>
>>>>>>> [1] http://patchwork.ozlabs.org/patch/555597/
>>>>>>> [2] http://patchwork.ozlabs.org/patch/559783/
>>>>>>
>>>>>> Interesting. I haven't tested on top of dm/master, but I tested it
>>>>>> based on origin/master and the issue is resolved.
>>>>>>
>>>>>
>>>>> Which issue is resolved? I just tested on top of origin/master with
>>>>> the above two patches, still the same segmentation fault.
>>>>
>>>> The net_retry dm test hang that Simon reported.
>>>>
>>>
>>> The segmentation fault happens after "Test: dm_test_usb_keyb". It
>>> seems to be a new issue.
>>
>> I agree it's a new issue that was masked by the net_retry hang.
>>
>>> I am looking into _dm_test_eth_rotate1 failure, but I don't understand
>>> the comments here.
>>>
>>> /* If ethrotate is no, then we should fail on a bad MAC */
>>> setenv("ethact", "eth at 10004000");
>>> setenv("ethrotate", "no");
>>> ut_asserteq(-EINVAL, net_loop(PING));
>>> ut_asserteq_str("eth at 10004000", getenv("ethact"));
>>>
>>> Does 'bad MAC' mean no MAC address? For eth at 10004000, it does have a
>>> MAC address defined in the env variable in sandbox.h.
>>
>> I think if you look at dm_test_eth_rotate(), the eth1addr is deleted
>> before the test. Later, ethaddr is deleted before the second part of
>> the test.
>>
>>> I also tested manually with the same test sequence from U-Boot shell,
>>> it can pass. I am still looking into it.
>>
>> It's not as though it hangs or something, but it now fails to return
>> the error code that it used to before your patch.
>>
>> Test: dm_test_eth_rotate
>> ../test/dm/eth.c:160, _dm_test_eth_rotate1(): -EINVAL ==
>> net_loop(PING): Expected -22, got 0
>>
>
> During debug I've noticed another strange issue:
>
> Sometimes the sandbox's setenv() does not successfully set the
> environment variable to the expected value. This occurs from time to
> time, even with the same u-boot image. Do you have any idea about
> this?
>

I may have been dazed that I looked the wrong message line. The issue
is complicated. My commit just exposed an existing issue that have
been in the dm eth codes from the beginning, that the eth_set_dev()
logic is not controlled by the env variable "ethrotate". If the
"ethact" is set to an eth device which cannot be probed (eg: no valid
ethaddr) and "ethrotate" is set to "no" (like in this test case), the
"ethact" will still point to the first probable eth device, in this
sandbox case, eth at 10002000.

I am still figuring out where to fix. Joe, you might want to have a look?

Regards,
Bin

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] Driver model test breakages
  2015-12-22  4:50                 ` Bin Meng
@ 2015-12-22  6:43                   ` Bin Meng
  2015-12-22 19:04                     ` Joe Hershberger
  0 siblings, 1 reply; 28+ messages in thread
From: Bin Meng @ 2015-12-22  6:43 UTC (permalink / raw)
  To: u-boot

Hi Joe,

On Tue, Dec 22, 2015 at 12:50 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
> On Tue, Dec 22, 2015 at 12:04 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>> Hi Joe,
>>
>> On Tue, Dec 22, 2015 at 11:08 AM, Joe Hershberger
>> <joe.hershberger@gmail.com> wrote:
>>> Hi Bin,
>>>
>>> On Mon, Dec 21, 2015 at 9:00 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>> Hi Joe,
>>>>
>>>> On Tue, Dec 22, 2015 at 10:39 AM, Joe Hershberger
>>>> <joe.hershberger@gmail.com> wrote:
>>>>> On Mon, Dec 21, 2015 at 8:36 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>>> Hi Joe,
>>>>>>
>>>>>> On Tue, Dec 22, 2015 at 10:32 AM, Joe Hershberger
>>>>>> <joe.hershberger@gmail.com> wrote:
>>>>>>> Hi Bin,
>>>>>>>
>>>>>>> On Mon, Dec 21, 2015 at 8:12 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>>>>> Hi Joe, Simon,
>>>>>>>>
>>>>>>>> On Tue, Dec 22, 2015 at 6:46 AM, Joe Hershberger
>>>>>>>> <joe.hershberger@gmail.com> wrote:
>>>>>>>>> Hi Simon and Bin
>>>>>>>>>
>>>>>>>>> On Thu, Dec 10, 2015 at 8:05 PM, Simon Glass <sjg@chromium.org> wrote:
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> The following three commits causes breakages in the driver model tests:
>>>>>>>>>>
>>>>>>>>>> 4efad20a      sf: Update status reg check in spi_flash_cmd_wait_ready
>>>>>>>>>> 45b47734     net/arp: account for ARP delay, avoid duplicate packets on timeout
>>>>>>>>>> 9961a0b6    sandbox: add a sandbox timer and basic test
>>>>>>>>>>
>>>>>>>>>> Can you please take a look? You can run them with ./test/dm/test-dm.sh
>>>>>>>>>
>>>>>>>>> It appears that ac1d313 (net: eth: Check return value in various
>>>>>>>>> places) breaks the eth_rotate test.
>>>>>>>>>
>>>>>>>>> Looking into it. Bin, do you have any ideas?
>>>>>>>>
>>>>>>>> I will look into this.
>>>>>>>>
>>>>>>>> BTW: I applied the following two patches [1][2] to the tree based on
>>>>>>>> dm/master, and got a segmentation fault:
>>>>>>>>
>>>>>>>> Test: dm_test_usb_keyb
>>>>>>>> ./test/dm/test-dm.sh: line 14: 24902 Segmentation fault
>>>>>>>> ./sandbox/u-boot -d ./sandbox/arch/sandbox/dts/test.dtb -c "ut dm"
>>>>>>>>
>>>>>>>> [1] http://patchwork.ozlabs.org/patch/555597/
>>>>>>>> [2] http://patchwork.ozlabs.org/patch/559783/
>>>>>>>
>>>>>>> Interesting. I haven't tested on top of dm/master, but I tested it
>>>>>>> based on origin/master and the issue is resolved.
>>>>>>>
>>>>>>
>>>>>> Which issue is resolved? I just tested on top of origin/master with
>>>>>> the above two patches, still the same segmentation fault.
>>>>>
>>>>> The net_retry dm test hang that Simon reported.
>>>>>
>>>>
>>>> The segmentation fault happens after "Test: dm_test_usb_keyb". It
>>>> seems to be a new issue.
>>>
>>> I agree it's a new issue that was masked by the net_retry hang.
>>>
>>>> I am looking into _dm_test_eth_rotate1 failure, but I don't understand
>>>> the comments here.
>>>>
>>>> /* If ethrotate is no, then we should fail on a bad MAC */
>>>> setenv("ethact", "eth at 10004000");
>>>> setenv("ethrotate", "no");
>>>> ut_asserteq(-EINVAL, net_loop(PING));
>>>> ut_asserteq_str("eth at 10004000", getenv("ethact"));
>>>>
>>>> Does 'bad MAC' mean no MAC address? For eth at 10004000, it does have a
>>>> MAC address defined in the env variable in sandbox.h.
>>>
>>> I think if you look at dm_test_eth_rotate(), the eth1addr is deleted
>>> before the test. Later, ethaddr is deleted before the second part of
>>> the test.
>>>
>>>> I also tested manually with the same test sequence from U-Boot shell,
>>>> it can pass. I am still looking into it.
>>>
>>> It's not as though it hangs or something, but it now fails to return
>>> the error code that it used to before your patch.
>>>
>>> Test: dm_test_eth_rotate
>>> ../test/dm/eth.c:160, _dm_test_eth_rotate1(): -EINVAL ==
>>> net_loop(PING): Expected -22, got 0
>>>
>>
>> During debug I've noticed another strange issue:
>>
>> Sometimes the sandbox's setenv() does not successfully set the
>> environment variable to the expected value. This occurs from time to
>> time, even with the same u-boot image. Do you have any idea about
>> this?
>>
>
> I may have been dazed that I looked the wrong message line. The issue
> is complicated. My commit just exposed an existing issue that have
> been in the dm eth codes from the beginning, that the eth_set_dev()
> logic is not controlled by the env variable "ethrotate". If the
> "ethact" is set to an eth device which cannot be probed (eg: no valid
> ethaddr) and "ethrotate" is set to "no" (like in this test case), the
> "ethact" will still point to the first probable eth device, in this
> sandbox case, eth at 10002000.
>
> I am still figuring out where to fix. Joe, you might want to have a look?
>

Please check the following two patches for dm_eth_rorate test.

http://patchwork.ozlabs.org/patch/559882/
http://patchwork.ozlabs.org/patch/559883/

Regards,
Bin

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] Driver model test breakages
  2015-12-22  6:43                   ` Bin Meng
@ 2015-12-22 19:04                     ` Joe Hershberger
  0 siblings, 0 replies; 28+ messages in thread
From: Joe Hershberger @ 2015-12-22 19:04 UTC (permalink / raw)
  To: u-boot

Hi Bin,

On Tue, Dec 22, 2015 at 12:43 AM, Bin Meng <bmeng.cn@gmail.com> wrote:
> Hi Joe,
>
> On Tue, Dec 22, 2015 at 12:50 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>> On Tue, Dec 22, 2015 at 12:04 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>> Hi Joe,
>>>
>>> On Tue, Dec 22, 2015 at 11:08 AM, Joe Hershberger
>>> <joe.hershberger@gmail.com> wrote:
>>>> Hi Bin,
>>>>
>>>> On Mon, Dec 21, 2015 at 9:00 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>> Hi Joe,
>>>>>
>>>>> On Tue, Dec 22, 2015 at 10:39 AM, Joe Hershberger
>>>>> <joe.hershberger@gmail.com> wrote:
>>>>>> On Mon, Dec 21, 2015 at 8:36 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>>>> Hi Joe,
>>>>>>>
>>>>>>> On Tue, Dec 22, 2015 at 10:32 AM, Joe Hershberger
>>>>>>> <joe.hershberger@gmail.com> wrote:
>>>>>>>> Hi Bin,
>>>>>>>>
>>>>>>>> On Mon, Dec 21, 2015 at 8:12 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>>>>>> Hi Joe, Simon,
>>>>>>>>>
>>>>>>>>> On Tue, Dec 22, 2015 at 6:46 AM, Joe Hershberger
>>>>>>>>> <joe.hershberger@gmail.com> wrote:
>>>>>>>>>> Hi Simon and Bin
>>>>>>>>>>
>>>>>>>>>> On Thu, Dec 10, 2015 at 8:05 PM, Simon Glass <sjg@chromium.org> wrote:
>>>>>>>>>>> Hi,
>>>>>>>>>>>
>>>>>>>>>>> The following three commits causes breakages in the driver model tests:
>>>>>>>>>>>
>>>>>>>>>>> 4efad20a      sf: Update status reg check in spi_flash_cmd_wait_ready
>>>>>>>>>>> 45b47734     net/arp: account for ARP delay, avoid duplicate packets on timeout
>>>>>>>>>>> 9961a0b6    sandbox: add a sandbox timer and basic test
>>>>>>>>>>>
>>>>>>>>>>> Can you please take a look? You can run them with ./test/dm/test-dm.sh
>>>>>>>>>>
>>>>>>>>>> It appears that ac1d313 (net: eth: Check return value in various
>>>>>>>>>> places) breaks the eth_rotate test.
>>>>>>>>>>
>>>>>>>>>> Looking into it. Bin, do you have any ideas?
>>>>>>>>>
>>>>>>>>> I will look into this.
>>>>>>>>>
>>>>>>>>> BTW: I applied the following two patches [1][2] to the tree based on
>>>>>>>>> dm/master, and got a segmentation fault:
>>>>>>>>>
>>>>>>>>> Test: dm_test_usb_keyb
>>>>>>>>> ./test/dm/test-dm.sh: line 14: 24902 Segmentation fault
>>>>>>>>> ./sandbox/u-boot -d ./sandbox/arch/sandbox/dts/test.dtb -c "ut dm"
>>>>>>>>>
>>>>>>>>> [1] http://patchwork.ozlabs.org/patch/555597/
>>>>>>>>> [2] http://patchwork.ozlabs.org/patch/559783/
>>>>>>>>
>>>>>>>> Interesting. I haven't tested on top of dm/master, but I tested it
>>>>>>>> based on origin/master and the issue is resolved.
>>>>>>>>
>>>>>>>
>>>>>>> Which issue is resolved? I just tested on top of origin/master with
>>>>>>> the above two patches, still the same segmentation fault.
>>>>>>
>>>>>> The net_retry dm test hang that Simon reported.
>>>>>>
>>>>>
>>>>> The segmentation fault happens after "Test: dm_test_usb_keyb". It
>>>>> seems to be a new issue.
>>>>
>>>> I agree it's a new issue that was masked by the net_retry hang.
>>>>
>>>>> I am looking into _dm_test_eth_rotate1 failure, but I don't understand
>>>>> the comments here.
>>>>>
>>>>> /* If ethrotate is no, then we should fail on a bad MAC */
>>>>> setenv("ethact", "eth at 10004000");
>>>>> setenv("ethrotate", "no");
>>>>> ut_asserteq(-EINVAL, net_loop(PING));
>>>>> ut_asserteq_str("eth at 10004000", getenv("ethact"));
>>>>>
>>>>> Does 'bad MAC' mean no MAC address? For eth at 10004000, it does have a
>>>>> MAC address defined in the env variable in sandbox.h.
>>>>
>>>> I think if you look at dm_test_eth_rotate(), the eth1addr is deleted
>>>> before the test. Later, ethaddr is deleted before the second part of
>>>> the test.
>>>>
>>>>> I also tested manually with the same test sequence from U-Boot shell,
>>>>> it can pass. I am still looking into it.
>>>>
>>>> It's not as though it hangs or something, but it now fails to return
>>>> the error code that it used to before your patch.
>>>>
>>>> Test: dm_test_eth_rotate
>>>> ../test/dm/eth.c:160, _dm_test_eth_rotate1(): -EINVAL ==
>>>> net_loop(PING): Expected -22, got 0
>>>>
>>>
>>> During debug I've noticed another strange issue:
>>>
>>> Sometimes the sandbox's setenv() does not successfully set the
>>> environment variable to the expected value. This occurs from time to
>>> time, even with the same u-boot image. Do you have any idea about
>>> this?
>>>
>>
>> I may have been dazed that I looked the wrong message line. The issue
>> is complicated. My commit just exposed an existing issue that have
>> been in the dm eth codes from the beginning, that the eth_set_dev()
>> logic is not controlled by the env variable "ethrotate". If the
>> "ethact" is set to an eth device which cannot be probed (eg: no valid
>> ethaddr) and "ethrotate" is set to "no" (like in this test case), the
>> "ethact" will still point to the first probable eth device, in this
>> sandbox case, eth at 10002000.
>>
>> I am still figuring out where to fix. Joe, you might want to have a look?
>>
>
> Please check the following two patches for dm_eth_rorate test.
>
> http://patchwork.ozlabs.org/patch/559882/
> http://patchwork.ozlabs.org/patch/559883/

These seem reasonable and also fix the test. I'm surprised the
behavior happened to work before without this explicit check.

Thanks,
-Joe

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] Driver model test breakages
  2015-12-22  3:17               ` Joe Hershberger
@ 2015-12-22 19:14                 ` Joe Hershberger
  2015-12-22 19:39                   ` Joe Hershberger
  0 siblings, 1 reply; 28+ messages in thread
From: Joe Hershberger @ 2015-12-22 19:14 UTC (permalink / raw)
  To: u-boot

Hi Simon,

On Mon, Dec 21, 2015 at 9:17 PM, Joe Hershberger
<joe.hershberger@gmail.com> wrote:
> Hi Bin and Simon,
>
> On Mon, Dec 21, 2015 at 9:08 PM, Joe Hershberger
> <joe.hershberger@gmail.com> wrote:
>> Hi Bin,
>>
>> On Mon, Dec 21, 2015 at 9:00 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>> Hi Joe,
>>>
>>> On Tue, Dec 22, 2015 at 10:39 AM, Joe Hershberger
>>> <joe.hershberger@gmail.com> wrote:
>>>> On Mon, Dec 21, 2015 at 8:36 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>> Hi Joe,
>>>>>
>>>>> On Tue, Dec 22, 2015 at 10:32 AM, Joe Hershberger
>>>>> <joe.hershberger@gmail.com> wrote:
>>>>>> Hi Bin,
>>>>>>
>>>>>> On Mon, Dec 21, 2015 at 8:12 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>>>> Hi Joe, Simon,
>>>>>>>
>>>>>>> On Tue, Dec 22, 2015 at 6:46 AM, Joe Hershberger
>>>>>>> <joe.hershberger@gmail.com> wrote:
>>>>>>>> Hi Simon and Bin
>>>>>>>>
>>>>>>>> On Thu, Dec 10, 2015 at 8:05 PM, Simon Glass <sjg@chromium.org> wrote:
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> The following three commits causes breakages in the driver model tests:
>>>>>>>>>
>>>>>>>>> 4efad20a      sf: Update status reg check in spi_flash_cmd_wait_ready
>>>>>>>>> 45b47734     net/arp: account for ARP delay, avoid duplicate packets on timeout
>>>>>>>>> 9961a0b6    sandbox: add a sandbox timer and basic test
>>>>>>>>>
>>>>>>>>> Can you please take a look? You can run them with ./test/dm/test-dm.sh
>>>>>>>>
>>>>>>>> It appears that ac1d313 (net: eth: Check return value in various
>>>>>>>> places) breaks the eth_rotate test.
>>>>>>>>
>>>>>>>> Looking into it. Bin, do you have any ideas?
>>>>>>>
>>>>>>> I will look into this.
>>>>>>>
>>>>>>> BTW: I applied the following two patches [1][2] to the tree based on
>>>>>>> dm/master, and got a segmentation fault:
>>>>>>>
>>>>>>> Test: dm_test_usb_keyb
>>>>>>> ./test/dm/test-dm.sh: line 14: 24902 Segmentation fault
>>>>>>> ./sandbox/u-boot -d ./sandbox/arch/sandbox/dts/test.dtb -c "ut dm"
>>>>>>>
>>>>>>> [1] http://patchwork.ozlabs.org/patch/555597/
>>>>>>> [2] http://patchwork.ozlabs.org/patch/559783/
>>>>>>
>>>>>> Interesting. I haven't tested on top of dm/master, but I tested it
>>>>>> based on origin/master and the issue is resolved.
>>>>>>
>>>>>
>>>>> Which issue is resolved? I just tested on top of origin/master with
>>>>> the above two patches, still the same segmentation fault.
>>>>
>>>> The net_retry dm test hang that Simon reported.
>>>>
>>>
>>> The segmentation fault happens after "Test: dm_test_usb_keyb". It
>>> seems to be a new issue.
>>
>> I agree it's a new issue that was masked by the net_retry hang.
>
> It appears, not too surprisingly, that d77a7d8 (dm: test: usb:
> sandbox: Add keyboard tests for sandbox) is the source of the seg
> fault.
>
> Simon?

In looking for the seg fault in the usb kbd test, I found that the
udev ptr passed to usb uclass is garbage, so the usb_ops is null, so
we crash. Do you have a quick explanation for how this emulated USB is
supposed to work? I haven't looked at it before. I'll keep digging
until you can provide some insight.

-Joe

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] Driver model test breakages
  2015-12-22 19:14                 ` Joe Hershberger
@ 2015-12-22 19:39                   ` Joe Hershberger
  2016-01-03 19:52                     ` Simon Glass
  0 siblings, 1 reply; 28+ messages in thread
From: Joe Hershberger @ 2015-12-22 19:39 UTC (permalink / raw)
  To: u-boot

Hi Simon,

On Tue, Dec 22, 2015 at 1:14 PM, Joe Hershberger
<joe.hershberger@gmail.com> wrote:
> Hi Simon,
>
> On Mon, Dec 21, 2015 at 9:17 PM, Joe Hershberger
> <joe.hershberger@gmail.com> wrote:
>> Hi Bin and Simon,
>>
>> On Mon, Dec 21, 2015 at 9:08 PM, Joe Hershberger
>> <joe.hershberger@gmail.com> wrote:
>>> Hi Bin,
>>>
>>> On Mon, Dec 21, 2015 at 9:00 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>> Hi Joe,
>>>>
>>>> On Tue, Dec 22, 2015 at 10:39 AM, Joe Hershberger
>>>> <joe.hershberger@gmail.com> wrote:
>>>>> On Mon, Dec 21, 2015 at 8:36 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>>> Hi Joe,
>>>>>>
>>>>>> On Tue, Dec 22, 2015 at 10:32 AM, Joe Hershberger
>>>>>> <joe.hershberger@gmail.com> wrote:
>>>>>>> Hi Bin,
>>>>>>>
>>>>>>> On Mon, Dec 21, 2015 at 8:12 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>>>>> Hi Joe, Simon,
>>>>>>>>
>>>>>>>> On Tue, Dec 22, 2015 at 6:46 AM, Joe Hershberger
>>>>>>>> <joe.hershberger@gmail.com> wrote:
>>>>>>>>> Hi Simon and Bin
>>>>>>>>>
>>>>>>>>> On Thu, Dec 10, 2015 at 8:05 PM, Simon Glass <sjg@chromium.org> wrote:
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> The following three commits causes breakages in the driver model tests:
>>>>>>>>>>
>>>>>>>>>> 4efad20a      sf: Update status reg check in spi_flash_cmd_wait_ready
>>>>>>>>>> 45b47734     net/arp: account for ARP delay, avoid duplicate packets on timeout
>>>>>>>>>> 9961a0b6    sandbox: add a sandbox timer and basic test
>>>>>>>>>>
>>>>>>>>>> Can you please take a look? You can run them with ./test/dm/test-dm.sh
>>>>>>>>>
>>>>>>>>> It appears that ac1d313 (net: eth: Check return value in various
>>>>>>>>> places) breaks the eth_rotate test.
>>>>>>>>>
>>>>>>>>> Looking into it. Bin, do you have any ideas?
>>>>>>>>
>>>>>>>> I will look into this.
>>>>>>>>
>>>>>>>> BTW: I applied the following two patches [1][2] to the tree based on
>>>>>>>> dm/master, and got a segmentation fault:
>>>>>>>>
>>>>>>>> Test: dm_test_usb_keyb
>>>>>>>> ./test/dm/test-dm.sh: line 14: 24902 Segmentation fault
>>>>>>>> ./sandbox/u-boot -d ./sandbox/arch/sandbox/dts/test.dtb -c "ut dm"
>>>>>>>>
>>>>>>>> [1] http://patchwork.ozlabs.org/patch/555597/
>>>>>>>> [2] http://patchwork.ozlabs.org/patch/559783/
>>>>>>>
>>>>>>> Interesting. I haven't tested on top of dm/master, but I tested it
>>>>>>> based on origin/master and the issue is resolved.
>>>>>>>
>>>>>>
>>>>>> Which issue is resolved? I just tested on top of origin/master with
>>>>>> the above two patches, still the same segmentation fault.
>>>>>
>>>>> The net_retry dm test hang that Simon reported.
>>>>>
>>>>
>>>> The segmentation fault happens after "Test: dm_test_usb_keyb". It
>>>> seems to be a new issue.
>>>
>>> I agree it's a new issue that was masked by the net_retry hang.
>>
>> It appears, not too surprisingly, that d77a7d8 (dm: test: usb:
>> sandbox: Add keyboard tests for sandbox) is the source of the seg
>> fault.
>>
>> Simon?
>
> In looking for the seg fault in the usb kbd test, I found that the
> udev ptr passed to usb uclass is garbage, so the usb_ops is null, so
> we crash. Do you have a quick explanation for how this emulated USB is
> supposed to work? I haven't looked at it before. I'll keep digging
> until you can provide some insight.

Actually the controller passed in is OK and the driver ptr is OK, but
the ops ptr is NULL. Seems odd.

-Joe

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] Driver model test breakages
  2015-12-22 19:39                   ` Joe Hershberger
@ 2016-01-03 19:52                     ` Simon Glass
  2016-01-04  5:12                       ` Jagan Teki
  0 siblings, 1 reply; 28+ messages in thread
From: Simon Glass @ 2016-01-03 19:52 UTC (permalink / raw)
  To: u-boot

Hi Jagan,

On 22 December 2015 at 12:39, Joe Hershberger <joe.hershberger@gmail.com> wrote:
> Hi Simon,
>
> On Tue, Dec 22, 2015 at 1:14 PM, Joe Hershberger
> <joe.hershberger@gmail.com> wrote:
>> Hi Simon,
>>
>> On Mon, Dec 21, 2015 at 9:17 PM, Joe Hershberger
>> <joe.hershberger@gmail.com> wrote:
>>> Hi Bin and Simon,
>>>
>>> On Mon, Dec 21, 2015 at 9:08 PM, Joe Hershberger
>>> <joe.hershberger@gmail.com> wrote:
>>>> Hi Bin,
>>>>
>>>> On Mon, Dec 21, 2015 at 9:00 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>> Hi Joe,
>>>>>
>>>>> On Tue, Dec 22, 2015 at 10:39 AM, Joe Hershberger
>>>>> <joe.hershberger@gmail.com> wrote:
>>>>>> On Mon, Dec 21, 2015 at 8:36 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>>>> Hi Joe,
>>>>>>>
>>>>>>> On Tue, Dec 22, 2015 at 10:32 AM, Joe Hershberger
>>>>>>> <joe.hershberger@gmail.com> wrote:
>>>>>>>> Hi Bin,
>>>>>>>>
>>>>>>>> On Mon, Dec 21, 2015 at 8:12 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>>>>>> Hi Joe, Simon,
>>>>>>>>>
>>>>>>>>> On Tue, Dec 22, 2015 at 6:46 AM, Joe Hershberger
>>>>>>>>> <joe.hershberger@gmail.com> wrote:
>>>>>>>>>> Hi Simon and Bin
>>>>>>>>>>
>>>>>>>>>> On Thu, Dec 10, 2015 at 8:05 PM, Simon Glass <sjg@chromium.org> wrote:
>>>>>>>>>>> Hi,
>>>>>>>>>>>
>>>>>>>>>>> The following three commits causes breakages in the driver model tests:
>>>>>>>>>>>
>>>>>>>>>>> 4efad20a      sf: Update status reg check in spi_flash_cmd_wait_ready
>>>>>>>>>>> 45b47734     net/arp: account for ARP delay, avoid duplicate packets on timeout
>>>>>>>>>>> 9961a0b6    sandbox: add a sandbox timer and basic test
>>>>>>>>>>>
>>>>>>>>>>> Can you please take a look? You can run them with ./test/dm/test-dm.sh
>>>>>>>>>>
>>>>>>>>>> It appears that ac1d313 (net: eth: Check return value in various
>>>>>>>>>> places) breaks the eth_rotate test.
>>>>>>>>>>
>>>>>>>>>> Looking into it. Bin, do you have any ideas?
>>>>>>>>>
>>>>>>>>> I will look into this.
>>>>>>>>>
>>>>>>>>> BTW: I applied the following two patches [1][2] to the tree based on
>>>>>>>>> dm/master, and got a segmentation fault:
>>>>>>>>>
>>>>>>>>> Test: dm_test_usb_keyb
>>>>>>>>> ./test/dm/test-dm.sh: line 14: 24902 Segmentation fault
>>>>>>>>> ./sandbox/u-boot -d ./sandbox/arch/sandbox/dts/test.dtb -c "ut dm"
>>>>>>>>>
>>>>>>>>> [1] http://patchwork.ozlabs.org/patch/555597/
>>>>>>>>> [2] http://patchwork.ozlabs.org/patch/559783/
>>>>>>>>
>>>>>>>> Interesting. I haven't tested on top of dm/master, but I tested it
>>>>>>>> based on origin/master and the issue is resolved.
>>>>>>>>
>>>>>>>
>>>>>>> Which issue is resolved? I just tested on top of origin/master with
>>>>>>> the above two patches, still the same segmentation fault.
>>>>>>
>>>>>> The net_retry dm test hang that Simon reported.
>>>>>>
>>>>>
>>>>> The segmentation fault happens after "Test: dm_test_usb_keyb". It
>>>>> seems to be a new issue.
>>>>
>>>> I agree it's a new issue that was masked by the net_retry hang.
>>>
>>> It appears, not too surprisingly, that d77a7d8 (dm: test: usb:
>>> sandbox: Add keyboard tests for sandbox) is the source of the seg
>>> fault.
>>>
>>> Simon?
>>
>> In looking for the seg fault in the usb kbd test, I found that the
>> udev ptr passed to usb uclass is garbage, so the usb_ops is null, so
>> we crash. Do you have a quick explanation for how this emulated USB is
>> supposed to work? I haven't looked at it before. I'll keep digging
>> until you can provide some insight.
>
> Actually the controller passed in is OK and the driver ptr is OK, but
> the ops ptr is NULL. Seems odd.

Jagan, do you have any thoughts on the SPI flash crash with
test/dm/test0dm,sh? It is still broken and the release is almost upon
us. This means that SPI flash is not working correct at present.


Regards,
Simon

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] Driver model test breakages
  2016-01-03 19:52                     ` Simon Glass
@ 2016-01-04  5:12                       ` Jagan Teki
  2016-01-04  6:09                         ` Bin Meng
  0 siblings, 1 reply; 28+ messages in thread
From: Jagan Teki @ 2016-01-04  5:12 UTC (permalink / raw)
  To: u-boot

Hi Simon,

On 4 January 2016 at 01:22, Simon Glass <sjg@chromium.org> wrote:
> Hi Jagan,
>
> On 22 December 2015 at 12:39, Joe Hershberger <joe.hershberger@gmail.com> wrote:
>> Hi Simon,
>>
>> On Tue, Dec 22, 2015 at 1:14 PM, Joe Hershberger
>> <joe.hershberger@gmail.com> wrote:
>>> Hi Simon,
>>>
>>> On Mon, Dec 21, 2015 at 9:17 PM, Joe Hershberger
>>> <joe.hershberger@gmail.com> wrote:
>>>> Hi Bin and Simon,
>>>>
>>>> On Mon, Dec 21, 2015 at 9:08 PM, Joe Hershberger
>>>> <joe.hershberger@gmail.com> wrote:
>>>>> Hi Bin,
>>>>>
>>>>> On Mon, Dec 21, 2015 at 9:00 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>>> Hi Joe,
>>>>>>
>>>>>> On Tue, Dec 22, 2015 at 10:39 AM, Joe Hershberger
>>>>>> <joe.hershberger@gmail.com> wrote:
>>>>>>> On Mon, Dec 21, 2015 at 8:36 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>>>>> Hi Joe,
>>>>>>>>
>>>>>>>> On Tue, Dec 22, 2015 at 10:32 AM, Joe Hershberger
>>>>>>>> <joe.hershberger@gmail.com> wrote:
>>>>>>>>> Hi Bin,
>>>>>>>>>
>>>>>>>>> On Mon, Dec 21, 2015 at 8:12 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>>>>>>> Hi Joe, Simon,
>>>>>>>>>>
>>>>>>>>>> On Tue, Dec 22, 2015 at 6:46 AM, Joe Hershberger
>>>>>>>>>> <joe.hershberger@gmail.com> wrote:
>>>>>>>>>>> Hi Simon and Bin
>>>>>>>>>>>
>>>>>>>>>>> On Thu, Dec 10, 2015 at 8:05 PM, Simon Glass <sjg@chromium.org> wrote:
>>>>>>>>>>>> Hi,
>>>>>>>>>>>>
>>>>>>>>>>>> The following three commits causes breakages in the driver model tests:
>>>>>>>>>>>>
>>>>>>>>>>>> 4efad20a      sf: Update status reg check in spi_flash_cmd_wait_ready
>>>>>>>>>>>> 45b47734     net/arp: account for ARP delay, avoid duplicate packets on timeout
>>>>>>>>>>>> 9961a0b6    sandbox: add a sandbox timer and basic test
>>>>>>>>>>>>
>>>>>>>>>>>> Can you please take a look? You can run them with ./test/dm/test-dm.sh
>>>>>>>>>>>
>>>>>>>>>>> It appears that ac1d313 (net: eth: Check return value in various
>>>>>>>>>>> places) breaks the eth_rotate test.
>>>>>>>>>>>
>>>>>>>>>>> Looking into it. Bin, do you have any ideas?
>>>>>>>>>>
>>>>>>>>>> I will look into this.
>>>>>>>>>>
>>>>>>>>>> BTW: I applied the following two patches [1][2] to the tree based on
>>>>>>>>>> dm/master, and got a segmentation fault:
>>>>>>>>>>
>>>>>>>>>> Test: dm_test_usb_keyb
>>>>>>>>>> ./test/dm/test-dm.sh: line 14: 24902 Segmentation fault
>>>>>>>>>> ./sandbox/u-boot -d ./sandbox/arch/sandbox/dts/test.dtb -c "ut dm"
>>>>>>>>>>
>>>>>>>>>> [1] http://patchwork.ozlabs.org/patch/555597/
>>>>>>>>>> [2] http://patchwork.ozlabs.org/patch/559783/
>>>>>>>>>
>>>>>>>>> Interesting. I haven't tested on top of dm/master, but I tested it
>>>>>>>>> based on origin/master and the issue is resolved.
>>>>>>>>>
>>>>>>>>
>>>>>>>> Which issue is resolved? I just tested on top of origin/master with
>>>>>>>> the above two patches, still the same segmentation fault.
>>>>>>>
>>>>>>> The net_retry dm test hang that Simon reported.
>>>>>>>
>>>>>>
>>>>>> The segmentation fault happens after "Test: dm_test_usb_keyb". It
>>>>>> seems to be a new issue.
>>>>>
>>>>> I agree it's a new issue that was masked by the net_retry hang.
>>>>
>>>> It appears, not too surprisingly, that d77a7d8 (dm: test: usb:
>>>> sandbox: Add keyboard tests for sandbox) is the source of the seg
>>>> fault.
>>>>
>>>> Simon?
>>>
>>> In looking for the seg fault in the usb kbd test, I found that the
>>> udev ptr passed to usb uclass is garbage, so the usb_ops is null, so
>>> we crash. Do you have a quick explanation for how this emulated USB is
>>> supposed to work? I haven't looked at it before. I'll keep digging
>>> until you can provide some insight.
>>
>> Actually the controller passed in is OK and the driver ptr is OK, but
>> the ops ptr is NULL. Seems odd.
>
> Jagan, do you have any thoughts on the SPI flash crash with
> test/dm/test0dm,sh? It is still broken and the release is almost upon
> us. This means that SPI flash is not working correct at present.

Sorry, that I couldn't find this mail as it moved some where.

And I never ran these dm tests before tried now - please see below.

Test: dm_test_rtc_set_get
Test: dm_test_spi_find
../test/dm/spi.c:63, dm_test_spi_find(): -ENOENT ==
spi_get_bus_and_cs(busnum, cs, speed, mode, "spi_flash_std", "name",
&bus, &slave): Expected -2, got -22
Test: dm_test_spi_flash
./test/dm/test-dm.sh: line 14: 14628 Segmentation fault      (core
dumped) ./sandbox/u-boot -d ./sandbox/arch/sandbox/dts/test.dtb -c "ut
dm"

these are the issues? from you mail how come these issues related to

4efad20a      sf: Update status reg check in spi_flash_cmd_wait_ready

Because this particular change is respective to spi_flash core and the
drivers/mtd/spi/sandbox is not using I suppose.

Please let me know your inputs.

thanks!
-- 
Jagan.

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] Driver model test breakages
  2016-01-04  5:12                       ` Jagan Teki
@ 2016-01-04  6:09                         ` Bin Meng
  2016-01-06  0:24                           ` Simon Glass
  0 siblings, 1 reply; 28+ messages in thread
From: Bin Meng @ 2016-01-04  6:09 UTC (permalink / raw)
  To: u-boot

Hi Jagan,

On Mon, Jan 4, 2016 at 1:12 PM, Jagan Teki <jteki@openedev.com> wrote:
> Hi Simon,
>
> On 4 January 2016 at 01:22, Simon Glass <sjg@chromium.org> wrote:
>> Hi Jagan,
>>
>> On 22 December 2015 at 12:39, Joe Hershberger <joe.hershberger@gmail.com> wrote:
>>> Hi Simon,
>>>
>>> On Tue, Dec 22, 2015 at 1:14 PM, Joe Hershberger
>>> <joe.hershberger@gmail.com> wrote:
>>>> Hi Simon,
>>>>
>>>> On Mon, Dec 21, 2015 at 9:17 PM, Joe Hershberger
>>>> <joe.hershberger@gmail.com> wrote:
>>>>> Hi Bin and Simon,
>>>>>
>>>>> On Mon, Dec 21, 2015 at 9:08 PM, Joe Hershberger
>>>>> <joe.hershberger@gmail.com> wrote:
>>>>>> Hi Bin,
>>>>>>
>>>>>> On Mon, Dec 21, 2015 at 9:00 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>>>> Hi Joe,
>>>>>>>
>>>>>>> On Tue, Dec 22, 2015 at 10:39 AM, Joe Hershberger
>>>>>>> <joe.hershberger@gmail.com> wrote:
>>>>>>>> On Mon, Dec 21, 2015 at 8:36 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>>>>>> Hi Joe,
>>>>>>>>>
>>>>>>>>> On Tue, Dec 22, 2015 at 10:32 AM, Joe Hershberger
>>>>>>>>> <joe.hershberger@gmail.com> wrote:
>>>>>>>>>> Hi Bin,
>>>>>>>>>>
>>>>>>>>>> On Mon, Dec 21, 2015 at 8:12 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>>>>>>>> Hi Joe, Simon,
>>>>>>>>>>>
>>>>>>>>>>> On Tue, Dec 22, 2015 at 6:46 AM, Joe Hershberger
>>>>>>>>>>> <joe.hershberger@gmail.com> wrote:
>>>>>>>>>>>> Hi Simon and Bin
>>>>>>>>>>>>
>>>>>>>>>>>> On Thu, Dec 10, 2015 at 8:05 PM, Simon Glass <sjg@chromium.org> wrote:
>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>
>>>>>>>>>>>>> The following three commits causes breakages in the driver model tests:
>>>>>>>>>>>>>
>>>>>>>>>>>>> 4efad20a      sf: Update status reg check in spi_flash_cmd_wait_ready
>>>>>>>>>>>>> 45b47734     net/arp: account for ARP delay, avoid duplicate packets on timeout
>>>>>>>>>>>>> 9961a0b6    sandbox: add a sandbox timer and basic test
>>>>>>>>>>>>>
>>>>>>>>>>>>> Can you please take a look? You can run them with ./test/dm/test-dm.sh
>>>>>>>>>>>>
>>>>>>>>>>>> It appears that ac1d313 (net: eth: Check return value in various
>>>>>>>>>>>> places) breaks the eth_rotate test.
>>>>>>>>>>>>
>>>>>>>>>>>> Looking into it. Bin, do you have any ideas?
>>>>>>>>>>>
>>>>>>>>>>> I will look into this.
>>>>>>>>>>>
>>>>>>>>>>> BTW: I applied the following two patches [1][2] to the tree based on
>>>>>>>>>>> dm/master, and got a segmentation fault:
>>>>>>>>>>>
>>>>>>>>>>> Test: dm_test_usb_keyb
>>>>>>>>>>> ./test/dm/test-dm.sh: line 14: 24902 Segmentation fault
>>>>>>>>>>> ./sandbox/u-boot -d ./sandbox/arch/sandbox/dts/test.dtb -c "ut dm"
>>>>>>>>>>>
>>>>>>>>>>> [1] http://patchwork.ozlabs.org/patch/555597/
>>>>>>>>>>> [2] http://patchwork.ozlabs.org/patch/559783/
>>>>>>>>>>
>>>>>>>>>> Interesting. I haven't tested on top of dm/master, but I tested it
>>>>>>>>>> based on origin/master and the issue is resolved.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Which issue is resolved? I just tested on top of origin/master with
>>>>>>>>> the above two patches, still the same segmentation fault.
>>>>>>>>
>>>>>>>> The net_retry dm test hang that Simon reported.
>>>>>>>>
>>>>>>>
>>>>>>> The segmentation fault happens after "Test: dm_test_usb_keyb". It
>>>>>>> seems to be a new issue.
>>>>>>
>>>>>> I agree it's a new issue that was masked by the net_retry hang.
>>>>>
>>>>> It appears, not too surprisingly, that d77a7d8 (dm: test: usb:
>>>>> sandbox: Add keyboard tests for sandbox) is the source of the seg
>>>>> fault.
>>>>>
>>>>> Simon?
>>>>
>>>> In looking for the seg fault in the usb kbd test, I found that the
>>>> udev ptr passed to usb uclass is garbage, so the usb_ops is null, so
>>>> we crash. Do you have a quick explanation for how this emulated USB is
>>>> supposed to work? I haven't looked at it before. I'll keep digging
>>>> until you can provide some insight.
>>>
>>> Actually the controller passed in is OK and the driver ptr is OK, but
>>> the ops ptr is NULL. Seems odd.
>>
>> Jagan, do you have any thoughts on the SPI flash crash with
>> test/dm/test0dm,sh? It is still broken and the release is almost upon
>> us. This means that SPI flash is not working correct at present.
>
> Sorry, that I couldn't find this mail as it moved some where.
>
> And I never ran these dm tests before tried now - please see below.
>
> Test: dm_test_rtc_set_get
> Test: dm_test_spi_find
> ../test/dm/spi.c:63, dm_test_spi_find(): -ENOENT ==
> spi_get_bus_and_cs(busnum, cs, speed, mode, "spi_flash_std", "name",
> &bus, &slave): Expected -2, got -22
> Test: dm_test_spi_flash
> ./test/dm/test-dm.sh: line 14: 14628 Segmentation fault      (core
> dumped) ./sandbox/u-boot -d ./sandbox/arch/sandbox/dts/test.dtb -c "ut
> dm"
>

Please ignore the 'Segmentation fault' issue. Simon got it fixed in
other patches.

> these are the issues? from you mail how come these issues related to
>
> 4efad20a      sf: Update status reg check in spi_flash_cmd_wait_ready
>

I believe Simon pinpointed this commit via 'git bisect'. You should be
able to use 'git bisect' to get the same result.

> Because this particular change is respective to spi_flash core and the
> drivers/mtd/spi/sandbox is not using I suppose.
>
> Please let me know your inputs.
>
> thanks!
> --

Regards,
Bin

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] Driver model test breakages
  2016-01-04  6:09                         ` Bin Meng
@ 2016-01-06  0:24                           ` Simon Glass
  2016-01-15  1:34                             ` Simon Glass
  0 siblings, 1 reply; 28+ messages in thread
From: Simon Glass @ 2016-01-06  0:24 UTC (permalink / raw)
  To: u-boot

Hi Jagan,

On 3 January 2016 at 23:09, Bin Meng <bmeng.cn@gmail.com> wrote:
>
> Hi Jagan,
>
> On Mon, Jan 4, 2016 at 1:12 PM, Jagan Teki <jteki@openedev.com> wrote:
> > Hi Simon,
> >
> > On 4 January 2016 at 01:22, Simon Glass <sjg@chromium.org> wrote:
> >> Hi Jagan,
> >>
> >> On 22 December 2015 at 12:39, Joe Hershberger <joe.hershberger@gmail.com> wrote:
> >>> Hi Simon,
> >>>
> >>> On Tue, Dec 22, 2015 at 1:14 PM, Joe Hershberger
> >>> <joe.hershberger@gmail.com> wrote:
> >>>> Hi Simon,
> >>>>
> >>>> On Mon, Dec 21, 2015 at 9:17 PM, Joe Hershberger
> >>>> <joe.hershberger@gmail.com> wrote:
> >>>>> Hi Bin and Simon,
> >>>>>
> >>>>> On Mon, Dec 21, 2015 at 9:08 PM, Joe Hershberger
> >>>>> <joe.hershberger@gmail.com> wrote:
> >>>>>> Hi Bin,
> >>>>>>
> >>>>>> On Mon, Dec 21, 2015 at 9:00 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
> >>>>>>> Hi Joe,
> >>>>>>>
> >>>>>>> On Tue, Dec 22, 2015 at 10:39 AM, Joe Hershberger
> >>>>>>> <joe.hershberger@gmail.com> wrote:
> >>>>>>>> On Mon, Dec 21, 2015 at 8:36 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
> >>>>>>>>> Hi Joe,
> >>>>>>>>>
> >>>>>>>>> On Tue, Dec 22, 2015 at 10:32 AM, Joe Hershberger
> >>>>>>>>> <joe.hershberger@gmail.com> wrote:
> >>>>>>>>>> Hi Bin,
> >>>>>>>>>>
> >>>>>>>>>> On Mon, Dec 21, 2015 at 8:12 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
> >>>>>>>>>>> Hi Joe, Simon,
> >>>>>>>>>>>
> >>>>>>>>>>> On Tue, Dec 22, 2015 at 6:46 AM, Joe Hershberger
> >>>>>>>>>>> <joe.hershberger@gmail.com> wrote:
> >>>>>>>>>>>> Hi Simon and Bin
> >>>>>>>>>>>>
> >>>>>>>>>>>> On Thu, Dec 10, 2015 at 8:05 PM, Simon Glass <sjg@chromium.org> wrote:
> >>>>>>>>>>>>> Hi,
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> The following three commits causes breakages in the driver model tests:
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> 4efad20a      sf: Update status reg check in spi_flash_cmd_wait_ready
> >>>>>>>>>>>>> 45b47734     net/arp: account for ARP delay, avoid duplicate packets on timeout
> >>>>>>>>>>>>> 9961a0b6    sandbox: add a sandbox timer and basic test
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> Can you please take a look? You can run them with ./test/dm/test-dm.sh
> >>>>>>>>>>>>
> >>>>>>>>>>>> It appears that ac1d313 (net: eth: Check return value in various
> >>>>>>>>>>>> places) breaks the eth_rotate test.
> >>>>>>>>>>>>
> >>>>>>>>>>>> Looking into it. Bin, do you have any ideas?
> >>>>>>>>>>>
> >>>>>>>>>>> I will look into this.
> >>>>>>>>>>>
> >>>>>>>>>>> BTW: I applied the following two patches [1][2] to the tree based on
> >>>>>>>>>>> dm/master, and got a segmentation fault:
> >>>>>>>>>>>
> >>>>>>>>>>> Test: dm_test_usb_keyb
> >>>>>>>>>>> ./test/dm/test-dm.sh: line 14: 24902 Segmentation fault
> >>>>>>>>>>> ./sandbox/u-boot -d ./sandbox/arch/sandbox/dts/test.dtb -c "ut dm"
> >>>>>>>>>>>
> >>>>>>>>>>> [1] http://patchwork.ozlabs.org/patch/555597/
> >>>>>>>>>>> [2] http://patchwork.ozlabs.org/patch/559783/
> >>>>>>>>>>
> >>>>>>>>>> Interesting. I haven't tested on top of dm/master, but I tested it
> >>>>>>>>>> based on origin/master and the issue is resolved.
> >>>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> Which issue is resolved? I just tested on top of origin/master with
> >>>>>>>>> the above two patches, still the same segmentation fault.
> >>>>>>>>
> >>>>>>>> The net_retry dm test hang that Simon reported.
> >>>>>>>>
> >>>>>>>
> >>>>>>> The segmentation fault happens after "Test: dm_test_usb_keyb". It
> >>>>>>> seems to be a new issue.
> >>>>>>
> >>>>>> I agree it's a new issue that was masked by the net_retry hang.
> >>>>>
> >>>>> It appears, not too surprisingly, that d77a7d8 (dm: test: usb:
> >>>>> sandbox: Add keyboard tests for sandbox) is the source of the seg
> >>>>> fault.
> >>>>>
> >>>>> Simon?
> >>>>
> >>>> In looking for the seg fault in the usb kbd test, I found that the
> >>>> udev ptr passed to usb uclass is garbage, so the usb_ops is null, so
> >>>> we crash. Do you have a quick explanation for how this emulated USB is
> >>>> supposed to work? I haven't looked at it before. I'll keep digging
> >>>> until you can provide some insight.
> >>>
> >>> Actually the controller passed in is OK and the driver ptr is OK, but
> >>> the ops ptr is NULL. Seems odd.
> >>
> >> Jagan, do you have any thoughts on the SPI flash crash with
> >> test/dm/test0dm,sh? It is still broken and the release is almost upon
> >> us. This means that SPI flash is not working correct at present.
> >
> > Sorry, that I couldn't find this mail as it moved some where.
> >
> > And I never ran these dm tests before tried now - please see below.
> >
> > Test: dm_test_rtc_set_get
> > Test: dm_test_spi_find
> > ../test/dm/spi.c:63, dm_test_spi_find(): -ENOENT ==
> > spi_get_bus_and_cs(busnum, cs, speed, mode, "spi_flash_std", "name",
> > &bus, &slave): Expected -2, got -22
> > Test: dm_test_spi_flash
> > ./test/dm/test-dm.sh: line 14: 14628 Segmentation fault      (core
> > dumped) ./sandbox/u-boot -d ./sandbox/arch/sandbox/dts/test.dtb -c "ut
> > dm"
> >
>
> Please ignore the 'Segmentation fault' issue. Simon got it fixed in
> other patches.

Please see u-boot-dm/master. There are also patches in this series
which I have not applied yet:

http://patchwork.ozlabs.org/patch/562195/

Also you can disable any tests you don't want by commenting out things
in the Makefile. Unfortunately you can't run the SPI tests by
themselves (with 'ut dm <testname>') unless you create the test file
manually.

Please let me know if you come up with a fix.

>
> > these are the issues? from you mail how come these issues related to
> >
> > 4efad20a      sf: Update status reg check in spi_flash_cmd_wait_ready
> >
>
> I believe Simon pinpointed this commit via 'git bisect'. You should be
> able to use 'git bisect' to get the same result.
>
> > Because this particular change is respective to spi_flash core and the
> > drivers/mtd/spi/sandbox is not using I suppose.
> >
> > Please let me know your inputs.
> >
> > thanks!
> > --

Regards,
Simon

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [U-Boot] Driver model test breakages
  2016-01-06  0:24                           ` Simon Glass
@ 2016-01-15  1:34                             ` Simon Glass
  0 siblings, 0 replies; 28+ messages in thread
From: Simon Glass @ 2016-01-15  1:34 UTC (permalink / raw)
  To: u-boot

Hi Jagan,

On 5 January 2016 at 17:24, Simon Glass <sjg@chromium.org> wrote:
> Hi Jagan,
>
> On 3 January 2016 at 23:09, Bin Meng <bmeng.cn@gmail.com> wrote:
>>
>> Hi Jagan,
>>
>> On Mon, Jan 4, 2016 at 1:12 PM, Jagan Teki <jteki@openedev.com> wrote:
>> > Hi Simon,
>> >
>> > On 4 January 2016 at 01:22, Simon Glass <sjg@chromium.org> wrote:
>> >> Hi Jagan,
>> >>
>> >> On 22 December 2015 at 12:39, Joe Hershberger <joe.hershberger@gmail.com> wrote:
>> >>> Hi Simon,
>> >>>
>> >>> On Tue, Dec 22, 2015 at 1:14 PM, Joe Hershberger
>> >>> <joe.hershberger@gmail.com> wrote:
>> >>>> Hi Simon,
>> >>>>
>> >>>> On Mon, Dec 21, 2015 at 9:17 PM, Joe Hershberger
>> >>>> <joe.hershberger@gmail.com> wrote:
>> >>>>> Hi Bin and Simon,
>> >>>>>
>> >>>>> On Mon, Dec 21, 2015 at 9:08 PM, Joe Hershberger
>> >>>>> <joe.hershberger@gmail.com> wrote:
>> >>>>>> Hi Bin,
>> >>>>>>
>> >>>>>> On Mon, Dec 21, 2015 at 9:00 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>> >>>>>>> Hi Joe,
>> >>>>>>>
>> >>>>>>> On Tue, Dec 22, 2015 at 10:39 AM, Joe Hershberger
>> >>>>>>> <joe.hershberger@gmail.com> wrote:
>> >>>>>>>> On Mon, Dec 21, 2015 at 8:36 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>> >>>>>>>>> Hi Joe,
>> >>>>>>>>>
>> >>>>>>>>> On Tue, Dec 22, 2015 at 10:32 AM, Joe Hershberger
>> >>>>>>>>> <joe.hershberger@gmail.com> wrote:
>> >>>>>>>>>> Hi Bin,
>> >>>>>>>>>>
>> >>>>>>>>>> On Mon, Dec 21, 2015 at 8:12 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
>> >>>>>>>>>>> Hi Joe, Simon,
>> >>>>>>>>>>>
>> >>>>>>>>>>> On Tue, Dec 22, 2015 at 6:46 AM, Joe Hershberger
>> >>>>>>>>>>> <joe.hershberger@gmail.com> wrote:
>> >>>>>>>>>>>> Hi Simon and Bin
>> >>>>>>>>>>>>
>> >>>>>>>>>>>> On Thu, Dec 10, 2015 at 8:05 PM, Simon Glass <sjg@chromium.org> wrote:
>> >>>>>>>>>>>>> Hi,
>> >>>>>>>>>>>>>
>> >>>>>>>>>>>>> The following three commits causes breakages in the driver model tests:
>> >>>>>>>>>>>>>
>> >>>>>>>>>>>>> 4efad20a      sf: Update status reg check in spi_flash_cmd_wait_ready
>> >>>>>>>>>>>>> 45b47734     net/arp: account for ARP delay, avoid duplicate packets on timeout
>> >>>>>>>>>>>>> 9961a0b6    sandbox: add a sandbox timer and basic test
>> >>>>>>>>>>>>>
>> >>>>>>>>>>>>> Can you please take a look? You can run them with ./test/dm/test-dm.sh
>> >>>>>>>>>>>>
>> >>>>>>>>>>>> It appears that ac1d313 (net: eth: Check return value in various
>> >>>>>>>>>>>> places) breaks the eth_rotate test.
>> >>>>>>>>>>>>
>> >>>>>>>>>>>> Looking into it. Bin, do you have any ideas?
>> >>>>>>>>>>>
>> >>>>>>>>>>> I will look into this.
>> >>>>>>>>>>>
>> >>>>>>>>>>> BTW: I applied the following two patches [1][2] to the tree based on
>> >>>>>>>>>>> dm/master, and got a segmentation fault:
>> >>>>>>>>>>>
>> >>>>>>>>>>> Test: dm_test_usb_keyb
>> >>>>>>>>>>> ./test/dm/test-dm.sh: line 14: 24902 Segmentation fault
>> >>>>>>>>>>> ./sandbox/u-boot -d ./sandbox/arch/sandbox/dts/test.dtb -c "ut dm"
>> >>>>>>>>>>>
>> >>>>>>>>>>> [1] http://patchwork.ozlabs.org/patch/555597/
>> >>>>>>>>>>> [2] http://patchwork.ozlabs.org/patch/559783/
>> >>>>>>>>>>
>> >>>>>>>>>> Interesting. I haven't tested on top of dm/master, but I tested it
>> >>>>>>>>>> based on origin/master and the issue is resolved.
>> >>>>>>>>>>
>> >>>>>>>>>
>> >>>>>>>>> Which issue is resolved? I just tested on top of origin/master with
>> >>>>>>>>> the above two patches, still the same segmentation fault.
>> >>>>>>>>
>> >>>>>>>> The net_retry dm test hang that Simon reported.
>> >>>>>>>>
>> >>>>>>>
>> >>>>>>> The segmentation fault happens after "Test: dm_test_usb_keyb". It
>> >>>>>>> seems to be a new issue.
>> >>>>>>
>> >>>>>> I agree it's a new issue that was masked by the net_retry hang.
>> >>>>>
>> >>>>> It appears, not too surprisingly, that d77a7d8 (dm: test: usb:
>> >>>>> sandbox: Add keyboard tests for sandbox) is the source of the seg
>> >>>>> fault.
>> >>>>>
>> >>>>> Simon?
>> >>>>
>> >>>> In looking for the seg fault in the usb kbd test, I found that the
>> >>>> udev ptr passed to usb uclass is garbage, so the usb_ops is null, so
>> >>>> we crash. Do you have a quick explanation for how this emulated USB is
>> >>>> supposed to work? I haven't looked at it before. I'll keep digging
>> >>>> until you can provide some insight.
>> >>>
>> >>> Actually the controller passed in is OK and the driver ptr is OK, but
>> >>> the ops ptr is NULL. Seems odd.
>> >>
>> >> Jagan, do you have any thoughts on the SPI flash crash with
>> >> test/dm/test0dm,sh? It is still broken and the release is almost upon
>> >> us. This means that SPI flash is not working correct at present.
>> >
>> > Sorry, that I couldn't find this mail as it moved some where.
>> >
>> > And I never ran these dm tests before tried now - please see below.
>> >
>> > Test: dm_test_rtc_set_get
>> > Test: dm_test_spi_find
>> > ../test/dm/spi.c:63, dm_test_spi_find(): -ENOENT ==
>> > spi_get_bus_and_cs(busnum, cs, speed, mode, "spi_flash_std", "name",
>> > &bus, &slave): Expected -2, got -22
>> > Test: dm_test_spi_flash
>> > ./test/dm/test-dm.sh: line 14: 14628 Segmentation fault      (core
>> > dumped) ./sandbox/u-boot -d ./sandbox/arch/sandbox/dts/test.dtb -c "ut
>> > dm"
>> >
>>
>> Please ignore the 'Segmentation fault' issue. Simon got it fixed in
>> other patches.
>
> Please see u-boot-dm/master. There are also patches in this series
> which I have not applied yet:
>
> http://patchwork.ozlabs.org/patch/562195/
>
> Also you can disable any tests you don't want by commenting out things
> in the Makefile. Unfortunately you can't run the SPI tests by
> themselves (with 'ut dm <testname>') unless you create the test file
> manually.
>
> Please let me know if you come up with a fix.
>
>>
>> > these are the issues? from you mail how come these issues related to
>> >
>> > 4efad20a      sf: Update status reg check in spi_flash_cmd_wait_ready
>> >
>>
>> I believe Simon pinpointed this commit via 'git bisect'. You should be
>> able to use 'git bisect' to get the same result.
>>
>> > Because this particular change is respective to spi_flash core and the
>> > drivers/mtd/spi/sandbox is not using I suppose.
>> >
>> > Please let me know your inputs.
>> >
>> > thanks!
>> > --

Any progress on this please? The tests are disabled for now.

Regards,
Simon

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2016-01-15  1:34 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-11  2:05 [U-Boot] Driver model test breakages Simon Glass
2015-12-11  5:31 ` Thomas Chou
2015-12-19 23:07   ` Simon Glass
2015-12-19 23:13 ` Simon Glass
2015-12-21 22:14   ` Joe Hershberger
2015-12-21 22:17     ` Joe Hershberger
2015-12-21 22:25       ` Joe Hershberger
2015-12-21 23:01       ` Simon Glass
2015-12-21 22:46 ` Joe Hershberger
2015-12-22  2:12   ` Bin Meng
2015-12-22  2:32     ` Joe Hershberger
2015-12-22  2:36       ` Bin Meng
2015-12-22  2:39         ` Joe Hershberger
2015-12-22  3:00           ` Bin Meng
2015-12-22  3:08             ` Joe Hershberger
2015-12-22  3:17               ` Joe Hershberger
2015-12-22 19:14                 ` Joe Hershberger
2015-12-22 19:39                   ` Joe Hershberger
2016-01-03 19:52                     ` Simon Glass
2016-01-04  5:12                       ` Jagan Teki
2016-01-04  6:09                         ` Bin Meng
2016-01-06  0:24                           ` Simon Glass
2016-01-15  1:34                             ` Simon Glass
2015-12-22  4:04               ` Bin Meng
2015-12-22  4:50                 ` Bin Meng
2015-12-22  6:43                   ` Bin Meng
2015-12-22 19:04                     ` Joe Hershberger
2015-12-22  2:46         ` Joe Hershberger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.