[U-Boot] u-boot-usb/master sandbox unit test failure

Marek,
The latest u-boot-usb master branch breaks the following unit tests for the sandbox target (as run by test/py):
8 failed ... test_ut[ut_dm_blk_usb] ... test_ut[ut_dm_usb_flash] ... test_ut[ut_dm_usb_keyb] ... test_ut[ut_dm_usb_multi] ... test_ut[ut_dm_usb_remove] ... test_ut[ut_dm_usb_tree] ... test_ut[ut_dm_usb_tree_remove] ... test_ut[ut_dm_usb_tree_reorder]
The first failure is:
=> ut dm blk_usb Test: dm_test_blk_usb: blk.c USB0: scanning bus 1 for devices... usb_setup_descriptor: invalid max packet size failed, error -5 /var/lib/jenkins/workspace/u-boot-denx_uboot_usb-master-build/src/u-boot/test/dm/blk.c:78, dm_test_blk_usb(): 0 == uclass_get_device(UCLASS_MASS_STORAGE, 0, &usb_dev): Expected 0, got -19 Test: dm_test_blk_usb: blk.c (flat tree) USB0: scanning bus 1 for devices... usb_setup_descriptor: invalid max packet size failed, error -5 /var/lib/jenkins/workspace/u-boot-denx_uboot_usb-master-build/src/u-boot/test/dm/blk.c:78, dm_test_blk_usb(): 0 == uclass_get_device(UCLASS_MASS_STORAGE, 0, &usb_dev): Expected 0, got -19 Failures: 2
The others all look essentially the same.
It looks like this was introduced sometime on Saturday (US time, ignoring my Jenkins polling delay), and the two subsequent pushes on Sunday and Monday didn't solve this.

On 09/25/2017 06:13 PM, Stephen Warren wrote:
Marek,
+CC Bin
I will drop the xhci patchset and hope to get a fixed one from him.
The latest u-boot-usb master branch breaks the following unit tests for the sandbox target (as run by test/py):
8 failed ... test_ut[ut_dm_blk_usb] ... test_ut[ut_dm_usb_flash] ... test_ut[ut_dm_usb_keyb] ... test_ut[ut_dm_usb_multi] ... test_ut[ut_dm_usb_remove] ... test_ut[ut_dm_usb_tree] ... test_ut[ut_dm_usb_tree_remove] ... test_ut[ut_dm_usb_tree_reorder]
The first failure is:
=> ut dm blk_usb Test: dm_test_blk_usb: blk.c USB0: scanning bus 1 for devices... usb_setup_descriptor: invalid max packet size failed, error -5 /var/lib/jenkins/workspace/u-boot-denx_uboot_usb-master-build/src/u-boot/test/dm/blk.c:78, dm_test_blk_usb(): 0 == uclass_get_device(UCLASS_MASS_STORAGE, 0, &usb_dev): Expected 0, got -19 Test: dm_test_blk_usb: blk.c (flat tree) USB0: scanning bus 1 for devices... usb_setup_descriptor: invalid max packet size failed, error -5 /var/lib/jenkins/workspace/u-boot-denx_uboot_usb-master-build/src/u-boot/test/dm/blk.c:78, dm_test_blk_usb(): 0 == uclass_get_device(UCLASS_MASS_STORAGE, 0, &usb_dev): Expected 0, got -19 Failures: 2
The others all look essentially the same.
It looks like this was introduced sometime on Saturday (US time, ignoring my Jenkins polling delay), and the two subsequent pushes on Sunday and Monday didn't solve this.

On 09/25/2017 10:40 AM, Marek Vasut wrote:
On 09/25/2017 06:13 PM, Stephen Warren wrote:
Marek,
+CC Bin
I will drop the xhci patchset and hope to get a fixed one from him.
The latest branch content (0184c6fb34b4 "usb: dwc2: Align size of invalidating dcache before starting DMA") passes the tests.
The latest u-boot-usb master branch breaks the following unit tests for the sandbox target (as run by test/py):
8 failed ... test_ut[ut_dm_blk_usb] ... test_ut[ut_dm_usb_flash] ... test_ut[ut_dm_usb_keyb] ... test_ut[ut_dm_usb_multi] ... test_ut[ut_dm_usb_remove] ... test_ut[ut_dm_usb_tree] ... test_ut[ut_dm_usb_tree_remove] ... test_ut[ut_dm_usb_tree_reorder]
The first failure is:
=> ut dm blk_usb Test: dm_test_blk_usb: blk.c USB0: scanning bus 1 for devices... usb_setup_descriptor: invalid max packet size failed, error -5 /var/lib/jenkins/workspace/u-boot-denx_uboot_usb-master-build/src/u-boot/test/dm/blk.c:78, dm_test_blk_usb(): 0 == uclass_get_device(UCLASS_MASS_STORAGE, 0, &usb_dev): Expected 0, got -19 Test: dm_test_blk_usb: blk.c (flat tree) USB0: scanning bus 1 for devices... usb_setup_descriptor: invalid max packet size failed, error -5 /var/lib/jenkins/workspace/u-boot-denx_uboot_usb-master-build/src/u-boot/test/dm/blk.c:78, dm_test_blk_usb(): 0 == uclass_get_device(UCLASS_MASS_STORAGE, 0, &usb_dev): Expected 0, got -19 Failures: 2
The others all look essentially the same.
It looks like this was introduced sometime on Saturday (US time, ignoring my Jenkins polling delay), and the two subsequent pushes on Sunday and Monday didn't solve this.

Hi Stephen,
On Tue, Sep 26, 2017 at 1:11 AM, Stephen Warren swarren@wwwdotorg.org wrote:
On 09/25/2017 10:40 AM, Marek Vasut wrote:
On 09/25/2017 06:13 PM, Stephen Warren wrote:
Marek,
+CC Bin
I will drop the xhci patchset and hope to get a fixed one from him.
The latest branch content (0184c6fb34b4 "usb: dwc2: Align size of invalidating dcache before starting DMA") passes the tests.
My tests shows that 'ut dm usb_flash' fails, and should have failed for quite a long time.
$ ./u-boot -d arch/sandbox/dts/test.dtb
U-Boot 2017.09-00337-g0184c6f (Sep 26 2017 - 17:29:31 +0800)
Model: sandbox DRAM: 128 MiB MMC: ** First descriptor is NOT a primary desc on 0:1 ** ** First descriptor is NOT a primary desc on 1:1 ** ** First descriptor is NOT a primary desc on 2:1 ** mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD) Using default environment
In: serial Out: vidconsole Err: vidconsole Model: sandbox SCSI: Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000 IDE: Bus 0: not available => ut dm usb_flash Test: dm_test_usb_flash: usb.c test/dm/usb.c:53, dm_test_usb_flash(): 2 == blk_dread(dev_desc, 0, 2, cmp): Expected 2, got 0 Test: dm_test_usb_flash: usb.c (flat tree) test/dm/usb.c:48, dm_test_usb_flash(): 0 == blk_get_device_by_str("usb", "0", &dev_desc): Expected 0, got -2 Failures: 2
The latest u-boot-usb master branch breaks the following unit tests for the sandbox target (as run by test/py):
8 failed ... test_ut[ut_dm_blk_usb] ... test_ut[ut_dm_usb_flash] ... test_ut[ut_dm_usb_keyb] ... test_ut[ut_dm_usb_multi] ... test_ut[ut_dm_usb_remove] ... test_ut[ut_dm_usb_tree] ... test_ut[ut_dm_usb_tree_remove] ... test_ut[ut_dm_usb_tree_reorder]
I've fixed all test failures except 'ut dm usb_flash'.
Regards, Bin

On Tue, Sep 26, 2017 at 5:32 PM, Bin Meng bmeng.cn@gmail.com wrote:
Hi Stephen,
On Tue, Sep 26, 2017 at 1:11 AM, Stephen Warren swarren@wwwdotorg.org wrote:
On 09/25/2017 10:40 AM, Marek Vasut wrote:
On 09/25/2017 06:13 PM, Stephen Warren wrote:
Marek,
+CC Bin
I will drop the xhci patchset and hope to get a fixed one from him.
The latest branch content (0184c6fb34b4 "usb: dwc2: Align size of invalidating dcache before starting DMA") passes the tests.
My tests shows that 'ut dm usb_flash' fails, and should have failed for quite a long time.
$ ./u-boot -d arch/sandbox/dts/test.dtb
U-Boot 2017.09-00337-g0184c6f (Sep 26 2017 - 17:29:31 +0800)
Model: sandbox DRAM: 128 MiB MMC: ** First descriptor is NOT a primary desc on 0:1 ** ** First descriptor is NOT a primary desc on 1:1 ** ** First descriptor is NOT a primary desc on 2:1 ** mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD) Using default environment
In: serial Out: vidconsole Err: vidconsole Model: sandbox SCSI: Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000 IDE: Bus 0: not available => ut dm usb_flash Test: dm_test_usb_flash: usb.c test/dm/usb.c:53, dm_test_usb_flash(): 2 == blk_dread(dev_desc, 0, 2, cmp): Expected 2, got 0 Test: dm_test_usb_flash: usb.c (flat tree) test/dm/usb.c:48, dm_test_usb_flash(): 0 == blk_get_device_by_str("usb", "0", &dev_desc): Expected 0, got -2 Failures: 2
The latest u-boot-usb master branch breaks the following unit tests for the sandbox target (as run by test/py):
8 failed ... test_ut[ut_dm_blk_usb] ... test_ut[ut_dm_usb_flash] ... test_ut[ut_dm_usb_keyb] ... test_ut[ut_dm_usb_multi] ... test_ut[ut_dm_usb_remove] ... test_ut[ut_dm_usb_tree] ... test_ut[ut_dm_usb_tree_remove] ... test_ut[ut_dm_usb_tree_reorder]
I've fixed all test failures except 'ut dm usb_flash'.
Looks I was jumping to conclusions. Previously I was just marking sandbox as an exception in the 'usb_stop', and all tests were passed. But I feel that's inconsistent. Now with a proper fix for sandbox, the 'usb remove' test no longer passed because I was trying to delete the "/usb@1/hub/hub-emul/flash-stick@1" node from device tree but a follow-up 'usb_init()' will fail. I am new to the sandbox emulator and still investigating this. Any hints?
Regards, Bin

+Simon,
On Tue, Sep 26, 2017 at 10:14 PM, Bin Meng bmeng.cn@gmail.com wrote:
On Tue, Sep 26, 2017 at 5:32 PM, Bin Meng bmeng.cn@gmail.com wrote:
Hi Stephen,
On Tue, Sep 26, 2017 at 1:11 AM, Stephen Warren swarren@wwwdotorg.org wrote:
On 09/25/2017 10:40 AM, Marek Vasut wrote:
On 09/25/2017 06:13 PM, Stephen Warren wrote:
Marek,
+CC Bin
I will drop the xhci patchset and hope to get a fixed one from him.
The latest branch content (0184c6fb34b4 "usb: dwc2: Align size of invalidating dcache before starting DMA") passes the tests.
My tests shows that 'ut dm usb_flash' fails, and should have failed for quite a long time.
$ ./u-boot -d arch/sandbox/dts/test.dtb
U-Boot 2017.09-00337-g0184c6f (Sep 26 2017 - 17:29:31 +0800)
Model: sandbox DRAM: 128 MiB MMC: ** First descriptor is NOT a primary desc on 0:1 ** ** First descriptor is NOT a primary desc on 1:1 ** ** First descriptor is NOT a primary desc on 2:1 ** mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD) Using default environment
In: serial Out: vidconsole Err: vidconsole Model: sandbox SCSI: Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000 IDE: Bus 0: not available => ut dm usb_flash Test: dm_test_usb_flash: usb.c test/dm/usb.c:53, dm_test_usb_flash(): 2 == blk_dread(dev_desc, 0, 2, cmp): Expected 2, got 0 Test: dm_test_usb_flash: usb.c (flat tree) test/dm/usb.c:48, dm_test_usb_flash(): 0 == blk_get_device_by_str("usb", "0", &dev_desc): Expected 0, got -2 Failures: 2
The latest u-boot-usb master branch breaks the following unit tests for the sandbox target (as run by test/py):
8 failed ... test_ut[ut_dm_blk_usb] ... test_ut[ut_dm_usb_flash] ... test_ut[ut_dm_usb_keyb] ... test_ut[ut_dm_usb_multi] ... test_ut[ut_dm_usb_remove] ... test_ut[ut_dm_usb_tree] ... test_ut[ut_dm_usb_tree_remove] ... test_ut[ut_dm_usb_tree_reorder]
I've fixed all test failures except 'ut dm usb_flash'.
Looks I was jumping to conclusions. Previously I was just marking sandbox as an exception in the 'usb_stop', and all tests were passed. But I feel that's inconsistent. Now with a proper fix for sandbox, the 'usb remove' test no longer passed because I was trying to delete the "/usb@1/hub/hub-emul/flash-stick@1" node from device tree but a follow-up 'usb_init()' will fail. I am new to the sandbox emulator and still investigating this. Any hints?
Please check my WIP patch @ http://git.denx.de/?p=u-boot/u-boot-x86.git;a=commitdiff;h=e8481c91c295027f7... for fixing sandbox 'usb remove' issues.
Below are my test logs on Sandbox:
=> usb start starting USB... USB0: scanning bus 1 for devices... 5 USB Device(s) found scanning usb for storage devices... 3 Storage Device(s) found => usb stop stopping USB.. => fdt addr -c The address of the fdt is 0x5986ba0 => fdt addr 0x5986ba0 => fdt rm "/usb@1/hub/hub-emul/flash-stick@1" => usb start starting USB... USB0: scanning bus 1 for devices... USB device not accepting new address (error=80000000) failed, error -2 scanning usb for storage devices... 0 Storage Device(s) found
Any hints?
Regards, Bin

Hi,
On Tue, Sep 26, 2017 at 11:27 PM, Bin Meng bmeng.cn@gmail.com wrote:
+Simon,
On Tue, Sep 26, 2017 at 10:14 PM, Bin Meng bmeng.cn@gmail.com wrote:
On Tue, Sep 26, 2017 at 5:32 PM, Bin Meng bmeng.cn@gmail.com wrote:
Hi Stephen,
On Tue, Sep 26, 2017 at 1:11 AM, Stephen Warren swarren@wwwdotorg.org wrote:
On 09/25/2017 10:40 AM, Marek Vasut wrote:
On 09/25/2017 06:13 PM, Stephen Warren wrote:
Marek,
+CC Bin
I will drop the xhci patchset and hope to get a fixed one from him.
The latest branch content (0184c6fb34b4 "usb: dwc2: Align size of invalidating dcache before starting DMA") passes the tests.
My tests shows that 'ut dm usb_flash' fails, and should have failed for quite a long time.
$ ./u-boot -d arch/sandbox/dts/test.dtb
U-Boot 2017.09-00337-g0184c6f (Sep 26 2017 - 17:29:31 +0800)
Model: sandbox DRAM: 128 MiB MMC: ** First descriptor is NOT a primary desc on 0:1 ** ** First descriptor is NOT a primary desc on 1:1 ** ** First descriptor is NOT a primary desc on 2:1 ** mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD) Using default environment
In: serial Out: vidconsole Err: vidconsole Model: sandbox SCSI: Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000 IDE: Bus 0: not available => ut dm usb_flash Test: dm_test_usb_flash: usb.c test/dm/usb.c:53, dm_test_usb_flash(): 2 == blk_dread(dev_desc, 0, 2, cmp): Expected 2, got 0 Test: dm_test_usb_flash: usb.c (flat tree) test/dm/usb.c:48, dm_test_usb_flash(): 0 == blk_get_device_by_str("usb", "0", &dev_desc): Expected 0, got -2 Failures: 2
The latest u-boot-usb master branch breaks the following unit tests for the sandbox target (as run by test/py):
8 failed ... test_ut[ut_dm_blk_usb] ... test_ut[ut_dm_usb_flash] ... test_ut[ut_dm_usb_keyb] ... test_ut[ut_dm_usb_multi] ... test_ut[ut_dm_usb_remove] ... test_ut[ut_dm_usb_tree] ... test_ut[ut_dm_usb_tree_remove] ... test_ut[ut_dm_usb_tree_reorder]
I've fixed all test failures except 'ut dm usb_flash'.
Looks I was jumping to conclusions. Previously I was just marking sandbox as an exception in the 'usb_stop', and all tests were passed. But I feel that's inconsistent. Now with a proper fix for sandbox, the 'usb remove' test no longer passed because I was trying to delete the "/usb@1/hub/hub-emul/flash-stick@1" node from device tree but a follow-up 'usb_init()' will fail. I am new to the sandbox emulator and still investigating this. Any hints?
Please check my WIP patch @ http://git.denx.de/?p=u-boot/u-boot-x86.git;a=commitdiff;h=e8481c91c295027f7... for fixing sandbox 'usb remove' issues.
Below are my test logs on Sandbox:
=> usb start starting USB... USB0: scanning bus 1 for devices... 5 USB Device(s) found scanning usb for storage devices... 3 Storage Device(s) found => usb stop stopping USB.. => fdt addr -c The address of the fdt is 0x5986ba0 => fdt addr 0x5986ba0 => fdt rm "/usb@1/hub/hub-emul/flash-stick@1" => usb start starting USB... USB0: scanning bus 1 for devices... USB device not accepting new address (error=80000000) failed, error -2 scanning usb for storage devices... 0 Storage Device(s) found
Any hints?
Any suggestions would be appreciated. I don't think I was the first one who wanted to test deleting some nodes from the device tree, and redo the fdt scan stuff.
Regards, Bin

On 09/25/2017 11:11 AM, Stephen Warren wrote:
On 09/25/2017 10:40 AM, Marek Vasut wrote:
On 09/25/2017 06:13 PM, Stephen Warren wrote:
Marek,
+CC Bin
I will drop the xhci patchset and hope to get a fixed one from him.
The latest branch content (0184c6fb34b4 "usb: dwc2: Align size of invalidating dcache before starting DMA") passes the tests.
The latest u-boot-usb master branch breaks the following unit tests for the sandbox target (as run by test/py):
However, the problem has re-appeared today.
8 failed ... test_ut[ut_dm_blk_usb] ... test_ut[ut_dm_usb_flash] ... test_ut[ut_dm_usb_keyb] ... test_ut[ut_dm_usb_multi] ... test_ut[ut_dm_usb_remove] ... test_ut[ut_dm_usb_tree] ... test_ut[ut_dm_usb_tree_remove] ... test_ut[ut_dm_usb_tree_reorder]
The first failure is:
=> ut dm blk_usb Test: dm_test_blk_usb: blk.c USB0: scanning bus 1 for devices... usb_setup_descriptor: invalid max packet size failed, error -5 /var/lib/jenkins/workspace/u-boot-denx_uboot_usb-master-build/src/u-boot/test/dm/blk.c:78,
dm_test_blk_usb(): 0 == uclass_get_device(UCLASS_MASS_STORAGE, 0, &usb_dev): Expected 0, got -19 Test: dm_test_blk_usb: blk.c (flat tree) USB0: scanning bus 1 for devices... usb_setup_descriptor: invalid max packet size failed, error -5 /var/lib/jenkins/workspace/u-boot-denx_uboot_usb-master-build/src/u-boot/test/dm/blk.c:78,
dm_test_blk_usb(): 0 == uclass_get_device(UCLASS_MASS_STORAGE, 0, &usb_dev): Expected 0, got -19 Failures: 2
The others all look essentially the same.
It looks like this was introduced sometime on Saturday (US time, ignoring my Jenkins polling delay), and the two subsequent pushes on Sunday and Monday didn't solve this.

On 09/28/2017 05:57 PM, Stephen Warren wrote:
On 09/25/2017 11:11 AM, Stephen Warren wrote:
On 09/25/2017 10:40 AM, Marek Vasut wrote:
On 09/25/2017 06:13 PM, Stephen Warren wrote:
Marek,
+CC Bin
I will drop the xhci patchset and hope to get a fixed one from him.
The latest branch content (0184c6fb34b4 "usb: dwc2: Align size of invalidating dcache before starting DMA") passes the tests.
The latest u-boot-usb master branch breaks the following unit tests for the sandbox target (as run by test/py):
However, the problem has re-appeared today.
Thanks for the heads up, I pushed a new branch and waiting for Bin to fix things up.
You can also monitor the progress here https://travis-ci.org/marex/u-boot-usb/branches
participants (3)
-
Bin Meng
-
Marek Vasut
-
Stephen Warren